:root {
  color-scheme: light;
  --paper: #f7f8f4;
  --ink: #1d2522;
  --muted: #66706a;
  --line: #d8ded6;
  --surface: #ffffff;
  --leaf: #2f6f54;
  --berry: #b64235;
  --blue: #245d8c;
  --gold: #d6a932;
  --fox: #d9783a;
  --night: #26364b;
  --shadow: 0 18px 60px rgba(31, 42, 36, 0.10);
}

* {
  box-sizing: border-box;
}

body.pravljice-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

body.has-pravljice-reader-open {
  overflow: hidden;
}

body.has-pravljice-audio-open {
  padding-bottom: 118px;
}

.pravljice-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.pravljice-header,
.pravljice-section-title,
.pravljice-story-row,
.pravljice-detail,
.pravljice-neighbors {
  display: flex;
  align-items: center;
}

.pravljice-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 10px 0 24px;
}

.pravljice-header > .pravljice-brand,
.pravljice-reader-page__header > .pravljice-brand {
  grid-column: 1;
  justify-self: start;
}

.pravljice-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.pravljice-brand__mark {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 1px solid rgba(214, 169, 50, 0.78);
  border-radius: 999px;
  background: #fff8e7 url("../img/waltey/favicon.svg") center / 92% no-repeat;
  box-shadow: 0 8px 24px rgba(52, 45, 28, 0.14), 0 0 0 4px rgba(214, 169, 50, 0.10);
  color: transparent;
  font-size: 0;
}

.pravljice-sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.pravljice-chat-widget {
  display: grid;
  grid-column: 2;
  justify-self: center;
  position: relative;
  justify-items: center;
}

.pravljice-chat-toggle {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--ink);
  cursor: pointer;
  padding: 5px;
  box-shadow: 0 10px 26px rgba(31, 42, 36, 0.10);
}

.pravljice-chat-toggle img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
}

.pravljice-chat-toggle:hover,
.pravljice-chat-toggle:focus-visible,
.pravljice-chat-toggle[aria-expanded="true"] {
  border-color: var(--berry);
  outline: none;
  transform: translateY(-1px);
}

.pravljice-chat-toggle[aria-busy="true"] {
  cursor: progress;
  opacity: 0.72;
}

.pravljice-chat-popover[hidden] {
  display: none;
}

.pravljice-chat-popover {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.pravljice-chat-popover__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 27, 24, 0.38);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.pravljice-chat-popover__panel {
  position: absolute;
  top: max(82px, env(safe-area-inset-top));
  left: 50%;
  right: auto;
  display: grid;
  width: min(430px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 112px));
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.97);
  box-shadow: 0 28px 90px rgba(15, 22, 19, 0.32);
  overflow: hidden;
  transform: translateX(-50%);
}

.pravljice-chat-popover__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.pravljice-chat {
  display: grid;
  grid-template-rows: minmax(180px, 1fr) auto auto;
  min-height: 430px;
  max-height: inherit;
}

.pravljice-chat__messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 22px 18px 12px;
  scrollbar-width: thin;
}

.pravljice-chat__message {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  border: 1px solid rgba(31, 42, 36, 0.10);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.pravljice-chat__message--bot {
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.pravljice-chat__message--user {
  justify-self: end;
  background: var(--ink);
  color: var(--surface);
}

.pravljice-chat__message--answer {
  display: grid;
  gap: 10px;
  width: auto;
  max-width: 100%;
}

.pravljice-chat__message--answer p {
  margin: 0;
}

.pravljice-chat__sources {
  display: grid;
  gap: 8px;
}

.pravljice-chat__source {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(31, 42, 36, 0.10);
  padding-top: 8px;
}

.pravljice-chat__source-title {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.22;
  text-decoration: none;
}

.pravljice-chat__source-title:hover,
.pravljice-chat__source-title:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pravljice-chat__source-meta,
.pravljice-chat__source-tags {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pravljice-chat__source-read {
  justify-self: start;
  color: var(--berry);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.pravljice-chat__form {
  border-top: 1px solid rgba(31, 42, 36, 0.10);
  padding: 12px;
}

.pravljice-chat__form label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pravljice-chat__field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.pravljice-chat__field input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.pravljice-chat__field input:focus {
  border-color: var(--blue);
  outline: none;
}

.pravljice-chat__field button,
.pravljice-chat__prompts button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 9px 11px;
}

.pravljice-chat__field button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.pravljice-chat__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid rgba(31, 42, 36, 0.08);
  padding: 0 12px 12px;
}

.pravljice-chat__prompts button {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.pravljice-list-widget {
  display: contents;
}

.pravljice-list-toggle {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  padding: 8px 11px;
  box-shadow: 0 10px 26px rgba(31, 42, 36, 0.08);
}

.pravljice-list-toggle:hover,
.pravljice-list-toggle:focus-visible,
.pravljice-list-toggle[aria-expanded="true"] {
  border-color: var(--blue);
  outline: none;
  transform: translateY(-1px);
}

.pravljice-list-toggle strong {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.pravljice-list-popover[hidden] {
  display: none;
}

.pravljice-list-popover {
  position: fixed;
  inset: 0;
  z-index: 82;
}

.pravljice-list-popover__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 27, 24, 0.34);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.pravljice-list-popover__panel {
  position: absolute;
  top: max(82px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(500px, calc(100vw - 32px));
  max-height: min(780px, calc(100dvh - 112px));
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.98);
  box-shadow: 0 28px 90px rgba(15, 22, 19, 0.32);
  overflow: hidden;
}

.pravljice-list-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(31, 42, 36, 0.10);
  padding: 18px;
}

.pravljice-list-popover__header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.08;
}

.pravljice-list-popover__close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.pravljice-list-popover__empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 16px 18px;
}

.pravljice-list-popover__empty[hidden] {
  display: none;
}

.pravljice-list-items {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  margin: 0;
  padding: 12px 18px 18px;
  scrollbar-width: thin;
}

.pravljice-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(31, 42, 36, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
}

.pravljice-list-item__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pravljice-list-item__title {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.18;
  text-decoration: none;
}

.pravljice-list-item__title:hover,
.pravljice-list-item__title:focus-visible {
  color: var(--blue);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pravljice-list-item__meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pravljice-list-item__controls {
  display: flex;
  gap: 5px;
}

.pravljice-list-item__controls button,
.pravljice-list-popover__actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 9px;
}

.pravljice-list-item__controls button:disabled,
.pravljice-list-popover__actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

.pravljice-list-popover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid rgba(31, 42, 36, 0.10);
  padding: 12px 18px;
}

.pravljice-list-popover__profile {
  align-self: center;
  margin-right: auto;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pravljice-list-popover__actions button[data-pravljice-list-export] {
  background: var(--ink);
  color: var(--surface);
}

.pravljice-ai-mark {
  display: inline-grid;
  min-width: 24px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(255, 248, 231, 0.38);
  border-radius: 999px;
  background: rgba(214, 169, 50, 0.18);
  color: currentColor;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.pravljice-topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pravljice-header__actions {
  display: flex;
  grid-column: 3;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  flex-wrap: wrap;
  gap: 8px;
}

.pravljice-topnav a,
.pravljice-actions a,
.pravljice-pages a,
.pravljice-pages span,
.pravljice-story-row__open,
.pravljice-story-row__play,
.pravljice-story-row__add {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}

.pravljice-story-row__add {
  cursor: pointer;
  font-family: inherit;
}

.pravljice-story-row__add.is-added {
  border-color: rgba(47, 111, 84, 0.34);
  background: rgba(47, 111, 84, 0.10);
  color: var(--leaf);
}

.pravljice-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 32px;
  align-items: stretch;
  padding: 34px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pravljice-hero__copy {
  align-self: center;
  max-width: 760px;
}

.pravljice-kicker {
  margin: 0 0 8px;
  color: var(--berry);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pravljice-hero h1,
.pravljice-detail h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: 0;
}

.pravljice-hero__subtitle {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.pravljice-hero__intro,
.pravljice-detail__description,
.pravljice-story-row p {
  color: var(--muted);
}

.pravljice-hero__intro {
  max-width: 68ch;
  margin: 14px 0 0;
  font-size: 18px;
}

.pravljice-guide {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(38, 54, 75, 0.96), rgba(36, 93, 140, 0.80) 58%, rgba(47, 111, 84, 0.92));
  box-shadow: var(--shadow);
  color: #fff8e7;
  padding: 20px;
}

.pravljice-guide p {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  z-index: 3;
  margin: 0;
  max-width: 30ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.3;
}

.pravljice-guide__sky span {
  position: absolute;
  display: block;
  width: 54px;
  height: 2px;
  background: rgba(255, 248, 231, 0.72);
  transform: rotate(-18deg);
}

.pravljice-guide__sky span:nth-child(1) {
  top: 34px;
  right: 44px;
}

.pravljice-guide__sky span:nth-child(2) {
  top: 86px;
  left: 46px;
  width: 34px;
}

.pravljice-guide__sky span:nth-child(3) {
  top: 132px;
  right: 96px;
  width: 42px;
}

.pravljice-guide__fox {
  position: absolute;
  left: 42px;
  bottom: 62px;
  width: 168px;
  height: 148px;
}

.pravljice-guide__face {
  position: absolute;
  left: 42px;
  top: 30px;
  width: 108px;
  height: 92px;
  border-radius: 48px 48px 42px 42px;
  background: var(--fox);
  box-shadow: inset 0 -22px #fff8e7;
}

.pravljice-guide__face::before,
.pravljice-guide__face::after {
  content: "";
  position: absolute;
  top: 36px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--night);
}

.pravljice-guide__face::before {
  left: 31px;
}

.pravljice-guide__face::after {
  right: 31px;
}

.pravljice-guide__ear {
  position: absolute;
  top: 2px;
  width: 54px;
  height: 64px;
  background: var(--fox);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.pravljice-guide__ear--left {
  left: 34px;
  transform: rotate(-18deg);
}

.pravljice-guide__ear--right {
  right: 6px;
  transform: rotate(18deg);
}

.pravljice-guide__tail {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 88px;
  height: 114px;
  border-radius: 80px 80px 12px 80px;
  background: linear-gradient(160deg, var(--fox) 0 58%, #fff8e7 59% 100%);
  transform: rotate(28deg);
}

.pravljice-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(130px, 0.55fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
  box-shadow: 0 10px 32px rgba(31, 42, 36, 0.06);
}

.pravljice-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pravljice-filters input,
.pravljice-filters select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
}

.pravljice-filters button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--leaf);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  padding: 0 18px;
}

.pravljice-sources,
.pravljice-tags,
.pravljice-results,
.pravljice-reading {
  margin-top: 34px;
}

.pravljice-section-title {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pravljice-section-title h2,
.pravljice-text h2,
.pravljice-tag-group h3,
.pravljice-source-card__title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.pravljice-section-title span,
.pravljice-section-title a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.pravljice-source-controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.pravljice-source-controls button {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  pointer-events: auto;
  box-shadow: 0 12px 28px rgba(31, 42, 36, 0.16);
}

.pravljice-source-controls button:hover,
.pravljice-source-controls button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-source-controls button:disabled {
  cursor: default;
  opacity: 0.35;
}

.pravljice-source-carousel {
  position: relative;
}

.pravljice-source-map {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  aspect-ratio: 1200 / 420;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(99, 76, 38, 0.05)),
    #e7d6b6;
  margin-bottom: 16px;
  box-shadow: 0 12px 38px rgba(31, 42, 36, 0.06);
}

.pravljice-source-map__atlas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.98;
}

.pravljice-source-map__map {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 260ms ease;
}

.pravljice-source-map.is-map-ready .pravljice-source-map__map {
  opacity: 1;
}

.pravljice-source-map.is-map-ready .pravljice-source-map__atlas {
  opacity: 0;
  pointer-events: none;
}

.pravljice-source-map .maplibregl-ctrl-attrib {
  border-radius: 6px 0 0;
  background: rgba(255, 248, 231, 0.84);
  color: rgba(29, 37, 34, 0.72);
  font-size: 10px;
}

.pravljice-source-map .maplibregl-ctrl-attrib a {
  color: rgba(29, 37, 34, 0.82);
}

.pravljice-source-map .maplibregl-ctrl-top-right {
  top: 12px;
  right: 12px;
}

.pravljice-source-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(31, 42, 36, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 231, 0.9);
  box-shadow: 0 10px 28px rgba(31, 42, 36, 0.14);
}

.pravljice-source-map .maplibregl-ctrl-group button {
  width: 38px;
  height: 38px;
}

.pravljice-source-map .maplibregl-ctrl-group button + button {
  border-top-color: rgba(31, 42, 36, 0.12);
}

.pravljice-source-map .maplibregl-popup-content {
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.96);
  box-shadow: 0 14px 36px rgba(31, 42, 36, 0.18);
  color: var(--ink);
  padding: 10px 12px;
}

.pravljice-source-map .maplibregl-popup-tip {
  border-top-color: rgba(255, 248, 231, 0.96);
  border-bottom-color: rgba(255, 248, 231, 0.96);
}

.pravljice-map-popup {
  display: grid;
  gap: 3px;
  max-width: 210px;
}

.pravljice-map-popup__title {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.12;
}

.pravljice-map-popup__meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.pravljice-source-track {
  display: grid;
  grid-auto-columns: clamp(240px, 24vw, 330px);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 62px 14px;
  scroll-padding: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.pravljice-source-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 250px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--night);
  color: #fff8e7;
  text-decoration: none;
  padding: 0;
  box-shadow: 0 12px 38px rgba(31, 42, 36, 0.06);
  scroll-snap-align: start;
}

.pravljice-source-card:nth-child(3n + 2) {
  border-top-color: var(--berry);
}

.pravljice-source-card:nth-child(3n + 3) {
  border-top-color: var(--blue);
}

.pravljice-source-card__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(214, 169, 50, 0.24), rgba(36, 93, 140, 0.16));
  transition: transform 180ms ease;
}

.pravljice-source-card__image--fallback {
  display: grid;
  place-items: center;
  color: #fff8e7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 800;
}

.pravljice-source-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(29, 37, 34, 0.04) 0%, rgba(29, 37, 34, 0.34) 42%, rgba(29, 37, 34, 0.88) 100%);
  transition: background 180ms ease;
}

.pravljice-source-card__content {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pravljice-source-card__count {
  display: inline-flex;
  margin: 0 0 10px;
  border: 1px solid rgba(255, 248, 231, 0.42);
  border-radius: 999px;
  background: rgba(29, 37, 34, 0.34);
  color: rgba(255, 248, 231, 0.92);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.pravljice-source-card__title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.05;
}

.pravljice-source-card__author {
  display: block;
  margin-top: 6px;
  color: rgba(255, 248, 231, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.pravljice-source-card__description {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
  margin-top: 10px;
  color: rgba(255, 248, 231, 0.92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.pravljice-source-card__profile {
  display: inline-flex;
  margin-top: 12px;
  border-bottom: 2px solid rgba(255, 248, 231, 0.72);
  color: #fff8e7;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.pravljice-source-card__profile:hover,
.pravljice-source-card__profile:focus-visible {
  border-bottom-color: var(--gold);
  color: #ffffff;
  outline: none;
}

.pravljice-source-card:hover .pravljice-source-card__image,
.pravljice-source-card:focus-visible .pravljice-source-card__image {
  transform: scale(1.035);
}

.pravljice-source-card:hover .pravljice-source-card__shade,
.pravljice-source-card:focus-visible .pravljice-source-card__shade {
  background:
    linear-gradient(180deg, rgba(29, 37, 34, 0.12) 0%, rgba(29, 37, 34, 0.42) 34%, rgba(29, 37, 34, 0.94) 100%);
}

.pravljice-source-card:hover .pravljice-source-card__description,
.pravljice-source-card:focus-visible .pravljice-source-card__description {
  max-height: 90px;
  opacity: 1;
  transform: translateY(0);
}

.pravljice-source-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (hover: none) {
  .pravljice-source-card__description {
    max-height: 90px;
    opacity: 1;
    transform: translateY(0);
  }
}

.pravljice-content-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: start;
}

.pravljice-tag-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pravljice-tag-group {
  border-top: 3px solid var(--blue);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 0 4px;
}

.pravljice-tag-group.is-expanded {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
}

.pravljice-tag-group:nth-child(3n + 2) {
  border-top-color: var(--berry);
}

.pravljice-tag-group:nth-child(3n + 3) {
  border-top-color: var(--gold);
}

.pravljice-tag-group--length {
  border-top-color: var(--blue);
}

.pravljice-tag-group h3 {
  margin-bottom: 10px;
}

.pravljice-tag-group__terms,
.pravljice-inline-tags,
.pravljice-actions,
.pravljice-detail__meta,
.pravljice-story-row__metrics,
.pravljice-tag-group__extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pravljice-tag-group__terms a,
.pravljice-inline-tags a,
.pravljice-detail__meta span,
.pravljice-tag-group__extra a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 5px 9px;
}

.pravljice-tag-group__terms a.is-active,
.pravljice-tag-group__extra a.is-active {
  border-color: var(--berry);
  background: var(--berry);
  color: #ffffff;
}

.pravljice-tag-group__terms a span,
.pravljice-tag-group__extra a span {
  color: var(--muted);
  font-size: 12px;
}

.pravljice-tag-group__terms a.is-active span,
.pravljice-tag-group__extra a.is-active span {
  color: rgba(255, 255, 255, 0.78);
}

.pravljice-tag-group__extra {
  margin-top: 8px;
}

.pravljice-tag-group__extra[hidden] {
  display: none;
}

.pravljice-tag-group__more-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.pravljice-tag-group.is-expanded .pravljice-tag-group__more-link {
  position: sticky;
  bottom: 0;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 6px 5px 0;
}

.pravljice-tag-group__more-link:hover,
.pravljice-tag-group__more-link:focus-visible {
  color: var(--berry);
}

.pravljice-story-list {
  display: grid;
  gap: 12px;
}

.pravljice-story-row {
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
}

.pravljice-story-row__image,
.pravljice-story-row__initial {
  flex: 0 0 118px;
  width: 118px;
  min-height: 132px;
  border-radius: 6px;
  object-fit: cover;
}

.pravljice-story-row__initial {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214, 169, 50, 0.35), rgba(36, 93, 140, 0.16));
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 44px;
  font-weight: 800;
}

.pravljice-story-row__body {
  min-width: 0;
  flex: 1;
}

.pravljice-story-row__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pravljice-story-row h3 {
  margin: 5px 0 4px;
  font-size: 22px;
  line-height: 1.2;
}

.pravljice-story-row h3 a {
  color: var(--ink);
  text-decoration: none;
}

.pravljice-story-row__subtitle {
  margin: 0 0 8px;
  font-weight: 700;
}

.pravljice-story-row__metrics {
  margin: 8px 0 0;
}

.pravljice-story-row__metrics span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247, 248, 244, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.pravljice-story-row p {
  margin: 7px 0 0;
  max-width: 78ch;
}

.pravljice-story-row__open {
  align-self: center;
}

.pravljice-story-row__actions {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  align-self: center;
  justify-items: stretch;
}

.pravljice-story-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--berry);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.pravljice-story-like [data-pravljice-like-icon] {
  font-size: 28px;
}

.pravljice-story-like:hover,
.pravljice-story-like:focus-visible {
  border-color: var(--berry);
  outline: 2px solid var(--berry);
  outline-offset: 2px;
}

.pravljice-story-like[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--berry);
  background: #fff8df;
}

.pravljice-story-like:disabled {
  cursor: wait;
  opacity: 0.65;
}

.pravljice-story-like--detail {
  width: 100%;
  gap: 10px;
  margin-top: 10px;
  font-weight: 800;
}

.pravljice-story-like--row {
  width: 42px;
  justify-self: end;
}

.pravljice-story-row__play {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  font-family: inherit;
}

.pravljice-story-row__play:hover,
.pravljice-story-row__play:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  outline: none;
}

.pravljice-story-row__play.is-loading {
  cursor: progress;
  opacity: 0.78;
}

.pravljice-story-row__play.is-playing {
  background: var(--berry);
  border-color: var(--berry);
}

.pravljice-story-row__play.is-error {
  background: var(--fox);
  border-color: var(--fox);
}

.pravljice-story-row__play-icon {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  flex: 0 0 14px;
  font-size: 14px;
  line-height: 1;
}

.pravljice-audio-player {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(240px, 0.9fr);
  gap: 12px 16px;
  align-items: center;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid rgba(31, 42, 36, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 58px rgba(31, 42, 36, 0.18);
  color: var(--ink);
  padding: 12px;
  backdrop-filter: blur(16px);
}

.pravljice-audio-player[hidden] {
  display: none;
}

.pravljice-audio-player__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.pravljice-audio-player__meta > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pravljice-audio-player__meta strong,
.pravljice-audio-player__meta span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pravljice-audio-player__meta span:last-child,
.pravljice-audio-player p,
.pravljice-audio-player__timeline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pravljice-audio-player__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pravljice-audio-player__controls button {
  display: grid;
  min-width: 42px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 0 8px;
}

.pravljice-audio-player__controls button:hover,
.pravljice-audio-player__controls button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-audio-player__controls button:disabled {
  cursor: progress;
  opacity: 0.64;
}

.pravljice-audio-player__toggle {
  min-width: 46px !important;
  background: var(--ink) !important;
  color: var(--surface) !important;
}

.pravljice-audio-player__timeline {
  display: grid;
  grid-template-columns: auto minmax(100px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pravljice-audio-player__timeline input {
  width: 100%;
  accent-color: var(--berry);
}

.pravljice-audio-player__timeline input:disabled {
  opacity: 0.48;
}

.pravljice-audio-player p {
  grid-column: 1 / -1;
  margin: -4px 0 0;
}

.pravljice-audio-player p.is-failed {
  color: var(--berry);
}

.pravljice-empty {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  color: var(--muted);
}

.pravljice-pages {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pravljice-detail {
  display: block;
  max-width: 920px;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pravljice-detail__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.pravljice-detail__meta,
.pravljice-actions {
  margin-top: 16px;
}

.pravljice-actions a.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.pravljice-story-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.pravljice-story-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  align-self: start;
  width: 100%;
  min-width: 0;
}

.pravljice-story-sidebar .pravljice-detail {
  max-width: none;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
}

.pravljice-story-sidebar__image {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  margin: 0 0 18px;
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 30px rgba(31, 42, 36, 0.12);
  object-fit: cover;
}

.pravljice-story-sidebar .pravljice-detail h1 {
  max-width: 100%;
  font-size: clamp(34px, 2.5vw, 46px);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.pravljice-story-sidebar .pravljice-kicker {
  font-size: 12px;
  line-height: 1.25;
}

.pravljice-story-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 18px 0 0;
}

.pravljice-story-facts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 9px 10px;
}

.pravljice-story-facts dt,
.pravljice-story-facts dd {
  margin: 0;
}

.pravljice-story-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.pravljice-story-facts dd {
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.24;
}

.pravljice-story-sidebar .pravljice-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 18px;
}

.pravljice-story-sidebar .pravljice-actions a,
.pravljice-story-sidebar .pravljice-actions button {
  min-width: 0;
  width: 100%;
}

.pravljice-story-tags {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.pravljice-story-tags h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.pravljice-story-tag-groups {
  display: grid;
  gap: 12px;
}

.pravljice-story-tag-group {
  display: grid;
  gap: 8px;
}

.pravljice-story-tag-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.pravljice-tag-icon {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.pravljice-tag-icon .pravljice-tool-icon {
  width: 15px;
  height: 15px;
}

.pravljice-story-tag-group--character .pravljice-tag-icon,
.pravljice-story-tag-group--theme .pravljice-tag-icon,
.pravljice-story-tag-group--atu .pravljice-tag-icon {
  color: var(--berry);
}

.pravljice-story-tag-group--motif .pravljice-tag-icon,
.pravljice-story-tag-group--magic .pravljice-tag-icon,
.pravljice-story-tag-group--source .pravljice-tag-icon {
  color: #876300;
}

.pravljice-story-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pravljice-story-tag-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(31, 42, 36, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 6px 10px;
  text-decoration: none;
}

.pravljice-story-tag-pill:hover,
.pravljice-story-tag-pill:focus-visible {
  border-color: var(--blue);
  background: rgba(36, 93, 140, 0.08);
  color: var(--blue);
  outline: none;
}

.pravljice-source-page {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  min-height: 100vh;
  background: #1d2522;
}

.pravljice-source-page::before,
.pravljice-source-page::after {
  position: fixed;
  inset: 0;
  display: block;
  pointer-events: none;
  content: "";
}

.pravljice-source-page::before {
  z-index: 0;
  background-image: var(--pravljice-source-bg, linear-gradient(135deg, #d9c69e, #26364b));
  background-position: center;
  background-size: cover;
}

.pravljice-source-page::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(20, 27, 24, 0.78), rgba(20, 27, 24, 0.32) 52%, rgba(20, 27, 24, 0.72)),
    linear-gradient(180deg, rgba(20, 27, 24, 0.42), rgba(20, 27, 24, 0.84));
}

.pravljice-source-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-bottom: 80px;
}

.pravljice-source-page .pravljice-header {
  margin-top: 8px;
  border: 1px solid rgba(255, 248, 231, 0.26);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.82);
  box-shadow: 0 16px 44px rgba(20, 27, 24, 0.20);
  padding: 12px 16px;
}

.pravljice-source-profile {
  display: flex;
  flex-direction: column;
  min-height: max(460px, calc(100vh - 190px));
  min-height: max(460px, calc(100svh - 190px));
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

.pravljice-source-profile__intro,
.pravljice-source-profile__section,
.pravljice-source-toc {
  border: 1px solid rgba(255, 248, 231, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.88);
  box-shadow: 0 24px 70px rgba(20, 27, 24, 0.24);
}

.pravljice-source-profile__intro {
  width: min(780px, 100%);
  padding: clamp(24px, 4vw, 48px);
}

.pravljice-source-profile__intro h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 8vw, 112px);
  line-height: 0.92;
}

.pravljice-source-profile__author {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.pravljice-source-profile__description {
  max-width: 62ch;
  margin: 18px 0 0;
  color: #334039;
  font-size: 18px;
}

.pravljice-source-profile__edit-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pravljice-actions__staff {
  border-color: rgba(182, 66, 53, 0.44) !important;
  color: var(--berry) !important;
}

.pravljice-source-profile__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 0.72fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.pravljice-source-profile__main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.pravljice-source-profile__sections {
  display: grid;
  gap: 18px;
}

.pravljice-source-profile__section {
  background: rgba(255, 248, 231, 0.92);
}

.pravljice-source-profile__section h2 {
  font-size: 28px;
}

.pravljice-source-profile__section p,
.pravljice-source-profile__section li {
  max-width: 76ch;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.72;
}

.pravljice-source-profile__section ul,
.pravljice-source-profile__section ol {
  margin: 18px 0 0;
  padding-left: 22px;
}

.pravljice-source-toc {
  align-self: start;
  overflow: auto;
  padding: 22px;
  scrollbar-width: thin;
}

.pravljice-source-toc__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: source-toc;
  list-style: none;
}

.pravljice-source-toc__list li {
  counter-increment: source-toc;
}

.pravljice-source-toc__item {
  display: grid;
  gap: 6px;
}

.pravljice-source-toc__item > a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  border: 1px solid rgba(31, 42, 36, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink);
  padding: 11px 12px 11px 46px;
  text-decoration: none;
}

.pravljice-source-toc__item > a::before {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(31, 42, 36, 0.14);
  border-radius: 999px;
  color: var(--muted);
  content: counter(source-toc);
  font-size: 12px;
  font-weight: 800;
}

.pravljice-source-toc__item > a:hover,
.pravljice-source-toc__item > a:focus-visible {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

.pravljice-source-toc__title {
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.pravljice-source-toc__subtitle,
.pravljice-source-toc__metrics {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pravljice-source-toc__subtitle,
.pravljice-source-toc__metrics {
  grid-column: 1 / 2;
}

.pravljice-source-toc__open {
  grid-column: 2 / 3;
  grid-row: 1 / span 3;
  align-self: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.pravljice-source-toc__add {
  justify-self: end;
  border: 1px solid rgba(31, 42, 36, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.pravljice-source-toc__add:hover,
.pravljice-source-toc__add:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-source-toc__add.is-added {
  border-color: rgba(47, 111, 84, 0.34);
  background: rgba(47, 111, 84, 0.10);
  color: var(--leaf);
}

.pravljice-source-toc__empty {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.pravljice-tags--detail {
  margin-top: 24px;
}

.pravljice-tags--detail .pravljice-tag-groups {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.pravljice-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr) auto;
  gap: 16px;
  align-items: start;
  margin-top: 52px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.pravljice-footer div,
.pravljice-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.pravljice-footer__languages {
  align-items: center;
}

.pravljice-footer__languages a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
}

.pravljice-footer__languages a.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.pravljice-footer strong {
  color: var(--ink);
}

.pravljice-footer p {
  margin: 0;
  max-width: 74ch;
}

.pravljice-footer .pravljice-ai-mark {
  border-color: rgba(31, 42, 36, 0.18);
  background: rgba(214, 169, 50, 0.22);
  color: var(--ink);
}

.pravljice-footer a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.pravljice-footer a:hover,
.pravljice-footer a:focus-visible {
  color: var(--blue);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pravljice-source-page .pravljice-footer {
  border: 1px solid rgba(255, 248, 231, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.88);
  box-shadow: 0 18px 58px rgba(20, 27, 24, 0.18);
  padding: 18px;
}

.pravljice-reading {
  display: block;
}

.pravljice-reading--parallel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.pravljice-reading--story {
  min-width: 0;
}

.pravljice-reading--story:not(.pravljice-reading--parallel) .pravljice-text {
  max-width: 920px;
}

.pravljice-text {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.pravljice-source-page .pravljice-source-profile__section {
  border-color: rgba(255, 248, 231, 0.24);
  background: rgba(255, 248, 231, 0.92);
  box-shadow: 0 24px 70px rgba(20, 27, 24, 0.24);
}

.pravljice-text h2 {
  color: var(--berry);
  margin-bottom: 16px;
}

.pravljice-text p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.75;
}

.pravljice-text p + p {
  margin-top: 18px;
}

.pravljice-text--source p {
  font-size: 18px;
}

.pravljice-neighbors {
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.pravljice-neighbors a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  text-decoration: none;
}

.pravljice-neighbors small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.pravljice-related-section {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.pravljice-related-section h2,
.pravljice-book-page--related h2 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
}

.pravljice-related-stories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pravljice-related-story {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 8px;
  text-decoration: none;
}

.pravljice-related-story:hover,
.pravljice-related-story:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-related-story img,
.pravljice-related-story__initial {
  display: grid;
  width: 62px;
  height: 74px;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(214, 169, 50, 0.28), rgba(36, 93, 140, 0.24));
  object-fit: cover;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 800;
}

.pravljice-related-story__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.pravljice-related-story strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.pravljice-related-story small,
.pravljice-related-story em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.pravljice-reader-dialog {
  width: min(1180px, calc(100vw - 40px));
  max-width: none;
  height: min(92vh, 980px);
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fbfaf2;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 28px 90px rgba(15, 22, 19, 0.34);
}

.pravljice-reader-dialog::backdrop {
  background: rgba(18, 27, 23, 0.56);
  backdrop-filter: blur(4px);
}

.pravljice-reader-dialog__chrome {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(216, 222, 214, 0.86);
  background: rgba(251, 250, 242, 0.92);
  padding: 10px 12px 10px 18px;
  backdrop-filter: blur(10px);
}

.pravljice-reader-dialog__status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pravljice-reader-dialog:not(.is-loading) .pravljice-reader-dialog__status {
  visibility: hidden;
}

.pravljice-reader-dialog__close {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

.pravljice-reader-dialog__close:hover,
.pravljice-reader-dialog__close:focus-visible {
  border-color: var(--berry);
  color: var(--berry);
  outline: none;
}

.pravljice-reader-dialog__frame {
  height: calc(100% - 54px);
  overflow: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.pravljice-reader-dialog > .pravljice-audio-player {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 30;
  width: auto;
}

.pravljice-reader-page {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 16% 8%, rgba(214, 169, 50, 0.16), transparent 36%),
    linear-gradient(135deg, #f7f3e7, #e4e0d0);
}

.pravljice-reader-page__shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: min(1280px, calc(100% - 32px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 14px 0 18px;
}

.pravljice-reader-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(31, 42, 36, 0.10);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.92);
  box-shadow: 0 16px 44px rgba(31, 42, 36, 0.10);
  padding: 10px 12px;
}

.pravljice-reader-page .pravljice-book-reader[data-pravljice-page-turner] {
  height: auto;
  min-height: 0;
  border: 1px solid rgba(128, 115, 83, 0.18);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(31, 42, 36, 0.14);
}

.pravljice-book-reader {
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(214, 169, 50, 0.10), transparent 18%, transparent 82%, rgba(36, 93, 140, 0.08)),
    #fbfaf2;
}

.pravljice-book-reader:focus {
  outline: none;
}

.pravljice-book-reader__cover {
  position: relative;
  display: flex;
  min-height: 460px;
  align-items: flex-end;
  overflow: hidden;
  background: var(--night);
  color: #fff8e7;
}

.pravljice-book-reader__cover img,
.pravljice-book-reader__cover-fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pravljice-book-reader__cover-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214, 169, 50, 0.44), rgba(36, 93, 140, 0.50));
  color: rgba(255, 248, 231, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 92px;
  font-weight: 800;
}

.pravljice-book-reader__cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(29, 37, 34, 0.06) 0%, rgba(29, 37, 34, 0.30) 42%, rgba(29, 37, 34, 0.92) 100%);
}

.pravljice-book-reader__cover-copy {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 42px;
}

.pravljice-book-reader__cover-copy p,
.pravljice-book-reader__cover-copy span {
  margin: 0;
  color: rgba(255, 248, 231, 0.88);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.pravljice-book-reader__cover-copy h1 {
  margin: 8px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  line-height: 1.02;
}

.pravljice-book-reader__cover-copy .pravljice-book-reader__subtitle {
  margin: -2px 0 12px;
  color: #fff8e7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: none;
}

.pravljice-book-reader__frontmatter {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 30px;
  border-bottom: 1px solid var(--line);
}

.pravljice-book-reader__frontmatter h2,
.pravljice-book-reader__source-note h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.pravljice-book-reader__frontmatter h2 {
  font-size: 34px;
  line-height: 1.15;
}

.pravljice-book-reader__frontmatter dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.pravljice-book-reader__frontmatter dl div {
  border-top: 2px solid var(--line);
  padding-top: 9px;
}

.pravljice-book-reader__frontmatter dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pravljice-book-reader__frontmatter dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.pravljice-book-reader__source-note {
  border-left: 4px solid var(--gold);
  background: rgba(255, 255, 255, 0.56);
  padding: 16px 18px;
}

.pravljice-book-reader__source-note h3 {
  font-size: 22px;
}

.pravljice-book-reader__source-note p {
  margin: 8px 0 0;
  color: var(--muted);
}

.pravljice-book-reader__body,
.pravljice-book-reader__original {
  width: min(700px, calc(100% - 48px));
  margin: 0 auto;
}

.pravljice-book-reader__body {
  padding: 44px 0 56px;
}

.pravljice-book-reader__body p,
.pravljice-book-reader__original p {
  margin: 0;
  color: #23231e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.82;
}

.pravljice-book-reader__body p + p,
.pravljice-book-reader__original p + p {
  margin-top: 20px;
}

.pravljice-book-reader__body p:first-of-type::first-letter {
  float: left;
  margin: 9px 10px 0 0;
  color: var(--berry);
  font-size: 76px;
  line-height: 0.78;
}

.pravljice-book-reader__original {
  margin-bottom: 54px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.pravljice-book-reader__original summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.pravljice-book-reader__original div {
  margin-top: 18px;
}

.pravljice-book-reader__original p {
  color: var(--muted);
  font-size: 18px;
}

.pravljice-book-reader[data-pravljice-page-turner] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 12px, rgba(214, 169, 50, 0.15), transparent 34%),
    #f1eddf;
  padding: 16px;
}

.pravljice-book-reader__nav {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.pravljice-book-reader__nav button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(29, 37, 34, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(31, 42, 36, 0.08);
}

.pravljice-book-reader__nav button:hover,
.pravljice-book-reader__nav button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-book-reader__nav button:disabled {
  cursor: default;
  opacity: 0.35;
}

.pravljice-book-reader__nav span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pravljice-book-reader__viewport {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(128, 115, 83, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0, rgba(214, 169, 50, 0.14), transparent 42%),
    #e8e2cf;
  box-shadow:
    inset 12px 0 24px rgba(77, 62, 44, 0.05),
    inset -8px 0 18px rgba(77, 62, 44, 0.04),
    0 20px 44px rgba(31, 42, 36, 0.14);
  cursor: pointer;
  touch-action: pan-y;
}

.pravljice-book-reader__viewport::-webkit-scrollbar {
  display: none;
}

.pravljice-book-reader__pages {
  position: relative;
  height: 100%;
  min-height: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(76, 63, 41, 0.08) 0,
      transparent 18px,
      transparent calc(var(--reader-page-outer-width, 520px) - 18px),
      rgba(76, 63, 41, 0.06) var(--reader-page-outer-width, 520px),
      transparent var(--reader-page-outer-width, 520px),
      transparent calc(var(--reader-page-outer-width, 520px) + var(--reader-page-gap, 30px))
    ),
    repeating-linear-gradient(
      90deg,
      #fffdf6 0,
      #fffdf6 var(--reader-page-outer-width, 520px),
      transparent var(--reader-page-outer-width, 520px),
      transparent calc(var(--reader-page-outer-width, 520px) + var(--reader-page-gap, 30px))
    );
  column-fill: auto;
  column-gap: var(--reader-page-gap, 30px);
  column-width: var(--reader-page-outer-width, 520px);
  transition: opacity 120ms ease;
  will-change: transform;
}

.pravljice-book-page {
  position: relative;
  display: block;
  width: var(--reader-page-outer-width, 520px);
  min-width: 0;
  height: 100%;
  overflow: hidden;
  break-after: column;
  break-inside: avoid;
  background:
    linear-gradient(90deg, rgba(128, 115, 83, 0.08), transparent 12%, transparent 88%, rgba(128, 115, 83, 0.07)),
    #fffdf6;
  color: var(--ink);
  padding: var(--reader-page-padding-block, 38px) var(--reader-page-padding-inline, 42px);
  vertical-align: top;
}

.pravljice-book-page:nth-child(odd) {
  box-shadow: inset -18px 0 26px rgba(76, 63, 41, 0.07);
}

.pravljice-book-page:nth-child(even) {
  box-shadow: inset 18px 0 26px rgba(76, 63, 41, 0.07);
}

.pravljice-book-reader.is-turning .pravljice-book-reader__pages {
  opacity: 0.985;
}

.pravljice-book-page h1,
.pravljice-book-page h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.pravljice-book-page h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.12;
}

.pravljice-book-page p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.64;
  break-inside: avoid;
}

.pravljice-book-page p + p {
  margin-top: 14px;
}

.pravljice-book-page .pravljice-kicker {
  margin-bottom: 10px;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.2;
}

.pravljice-book-page--cover {
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--night);
  color: #fff8e7;
  padding: 0;
}

.pravljice-book-page--cover img,
.pravljice-book-page__cover-fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pravljice-book-page__cover-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214, 169, 50, 0.46), rgba(36, 93, 140, 0.52));
  color: rgba(255, 248, 231, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 92px;
  font-weight: 800;
}

.pravljice-book-page__cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(29, 37, 34, 0.04) 0%, rgba(29, 37, 34, 0.28) 42%, rgba(29, 37, 34, 0.92) 100%);
}

.pravljice-book-page__cover-copy {
  position: relative;
  z-index: 1;
  padding: clamp(26px, 4vw, 42px);
}

.pravljice-book-page__cover-copy p,
.pravljice-book-page__cover-copy span {
  margin: 0;
  color: rgba(255, 248, 231, 0.88);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.pravljice-book-page__cover-copy h1 {
  margin: 8px 0 12px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.02;
}

.pravljice-book-page__cover-copy .pravljice-book-page__subtitle {
  margin: -2px 0 12px;
  color: #fff8e7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: none;
}

.pravljice-book-page__cover-actions {
  display: grid;
  width: min(440px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.pravljice-book-page__cover-action {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 248, 231, 0.55);
  border-radius: 6px;
  background: rgba(18, 26, 24, 0.62);
  color: #fff8e7;
  cursor: pointer;
  font: inherit;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.pravljice-book-page__cover-action:hover,
.pravljice-book-page__cover-action:focus-visible {
  border-color: var(--gold);
  background: rgba(18, 26, 24, 0.82);
  color: #fff8e7;
  outline: none;
}

.pravljice-book-page__cover-action--play {
  background: rgba(214, 169, 50, 0.86);
  color: var(--ink);
}

.pravljice-book-page__cover-action--play.is-playing,
.pravljice-book-page__cover-action--play.is-loading {
  background: rgba(255, 248, 231, 0.92);
  color: var(--ink);
}

.pravljice-book-page--frontmatter dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.pravljice-book-page--frontmatter dl div {
  border-top: 2px solid var(--line);
  padding-top: 9px;
}

.pravljice-book-page--frontmatter dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pravljice-book-page--frontmatter dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.pravljice-book-page--source-note,
.pravljice-book-page--divider {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 5px solid var(--gold);
}

.pravljice-book-page--related {
  overflow-y: auto;
}

.pravljice-book-page--related .pravljice-related-stories {
  grid-template-columns: 1fr;
}

.pravljice-book-page--source-note p:not(.pravljice-kicker),
.pravljice-book-page--divider p:not(.pravljice-kicker) {
  margin-top: 16px;
  color: var(--muted);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
}

.pravljice-book-page--text h2 {
  margin-bottom: 22px;
}

.pravljice-book-flow {
  break-before: column;
  min-height: 100%;
  color: var(--ink);
  padding: var(--reader-page-padding-block, 38px) var(--reader-page-padding-inline, 42px);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.pravljice-book-flow h2 {
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.12;
  break-after: avoid;
}

.pravljice-book-flow p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.64;
  break-inside: avoid;
}

.pravljice-book-flow p + p {
  margin-top: 14px;
}

.pravljice-book-flow .pravljice-kicker {
  margin-bottom: 10px;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  break-after: avoid;
}

.pravljice-book-flow__paragraph--first::first-letter {
  float: left;
  margin: 9px 10px 0 0;
  color: var(--berry);
  font-size: 76px;
  font-weight: 700;
  line-height: 0.78;
}

.pravljice-book-flow--original {
  break-before: column;
}

.pravljice-book-flow--original p {
  color: #46524d;
  font-size: clamp(16px, 1.45vw, 18px);
}

.pravljice-browse {
  display: block;
}

.pravljice-browse__main {
  min-width: 0;
  padding-left: clamp(0px, calc(756px - 50vw), 80px);
}

.pravljice-shell--browse > .pravljice-header {
  padding-left: clamp(0px, calc(756px - 50vw), 80px);
}

.pravljice-toolbox {
  position: fixed;
  top: max(16px, calc(50vh - 345px));
  left: 0;
  z-index: 30;
  width: 84px;
  max-height: calc(100dvh - 32px);
  overflow: visible;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(31, 42, 36, 0.08);
  backdrop-filter: blur(14px);
}

.pravljice-toolbox__title {
  display: block;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 10px 6px;
  text-align: center;
  text-transform: uppercase;
}

.pravljice-toolbox__items {
  display: grid;
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.pravljice-toolbox__item {
  display: grid;
}

.pravljice-toolbox__item > button {
  display: grid;
  width: 100%;
  min-height: 70px;
  place-items: center;
  gap: 4px;
  border: 0;
  border-bottom: 1px solid rgba(216, 222, 214, 0.74);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  padding: 9px 4px;
  text-align: center;
}

.pravljice-toolbox__item:last-child > button {
  border-bottom: 0;
}

.pravljice-toolbox__item > button:hover,
.pravljice-toolbox__item > button:focus-visible,
.pravljice-toolbox__item > button[aria-expanded="true"] {
  background: rgba(214, 169, 50, 0.16);
  color: var(--blue);
  outline: none;
}

.pravljice-toolbox__panel[hidden] {
  display: none;
}

.pravljice-toolbox__panel {
  position: fixed;
  top: 16px;
  bottom: 16px;
  left: 96px;
  z-index: 31;
  display: grid;
  width: min(310px, calc(100vw - 112px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(31, 42, 36, 0.22);
  backdrop-filter: blur(18px);
}

.pravljice-toolbox__panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.pravljice-toolbox__panel-header > div {
  display: grid;
  gap: 2px;
}

.pravljice-toolbox__panel-header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.pravljice-toolbox__panel-header strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.1;
}

.pravljice-toolbox__panel-header button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.pravljice-toolbox__filters {
  display: grid;
  align-content: start;
  gap: 7px;
  overflow-y: auto;
  padding: 14px;
}

.pravljice-toolbox__filters a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  padding: 9px 12px 9px 15px;
  text-decoration: none;
}

.pravljice-toolbox__filters a:hover,
.pravljice-toolbox__filters a:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-toolbox__filters strong {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.pravljice-toolbox__extra[hidden] {
  display: none;
}

.pravljice-toolbox__extra:not([hidden]) {
  display: contents;
}

.pravljice-toolbox__filters > .pravljice-toolbox__more {
  justify-content: flex-start;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  padding: 8px 4px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pravljice-tool-icon {
  display: block;
  width: 25px;
  height: 25px;
}

.pravljice-sources--browse {
  margin-top: 6px;
}

.pravljice-sources--browse #viri-title {
  max-width: 880px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.08;
}

.pravljice-story-shelf,
.pravljice-map-strip {
  margin-top: 38px;
  scroll-margin-top: 20px;
}

.pravljice-story-shelf__title > div,
.pravljice-map-strip .pravljice-section-title > div {
  min-width: 0;
}

.pravljice-story-shelf__title h2,
.pravljice-map-strip h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.12;
}

.pravljice-story-shelf__category {
  display: block;
  color: var(--berry) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase;
}

.pravljice-story-shelf__title > a {
  flex: 0 0 auto;
  border-bottom: 1px solid currentColor;
  color: var(--blue);
  text-decoration: none;
}

.pravljice-story-shelf__carousel {
  position: relative;
}

.pravljice-story-shelf__track {
  display: grid;
  grid-auto-columns: clamp(170px, 18vw, 220px);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 56px 12px;
  scroll-padding-inline: 56px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.pravljice-story-shelf__controls {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.pravljice-story-shelf__controls button {
  display: grid;
  width: 46px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  pointer-events: auto;
  box-shadow: 0 12px 26px rgba(31, 42, 36, 0.14);
}

.pravljice-story-shelf__controls button:hover,
.pravljice-story-shelf__controls button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.pravljice-story-shelf__controls button:disabled {
  opacity: 0;
  pointer-events: none;
}

.pravljice-story-tile-wrap {
  position: relative;
  scroll-snap-align: start;
}

.pravljice-story-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(31, 42, 36, 0.16);
  border-radius: 6px;
  background: var(--night);
  color: #fff8e7;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(31, 42, 36, 0.12);
}

.pravljice-story-like--tile {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

.pravljice-story-tile__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 190ms ease;
}

.pravljice-story-tile__image--fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--night), var(--blue));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  font-weight: 800;
}

.pravljice-story-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 26, 24, 0.02) 35%, rgba(18, 26, 24, 0.88) 100%);
}

.pravljice-story-tile__content {
  position: absolute;
  right: 13px;
  bottom: 14px;
  left: 13px;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.pravljice-story-tile__source {
  overflow: hidden;
  color: rgba(255, 248, 231, 0.82);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pravljice-story-tile__title {
  display: -webkit-box;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.08;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pravljice-story-tile:hover .pravljice-story-tile__image,
.pravljice-story-tile:focus-visible .pravljice-story-tile__image {
  transform: scale(1.045);
}

.pravljice-story-tile:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.pravljice-map-strip .pravljice-source-map {
  min-height: 320px;
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .pravljice-browse {
    display: block;
  }

  .pravljice-browse__main {
    padding-left: 0;
  }

  .pravljice-shell--browse > .pravljice-header {
    padding-left: 0;
  }

  .pravljice-story-shelf,
  .pravljice-map-strip {
    scroll-margin-top: 140px;
  }

  .pravljice-toolbox {
    position: sticky;
    top: 0;
    left: auto;
    width: 100vw;
    max-height: none;
    margin: 0 0 16px calc(50% - 50vw);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .pravljice-toolbox__title {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0, 0, 0, 0);
  }

  .pravljice-toolbox__items {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .pravljice-toolbox__items::-webkit-scrollbar {
    display: none;
  }

  .pravljice-toolbox__item {
    flex: 0 0 76px;
  }

  .pravljice-toolbox__item > button {
    flex: 0 0 76px;
    min-height: 62px;
    border-right: 1px solid rgba(216, 222, 214, 0.74);
    border-bottom: 0;
  }

  .pravljice-toolbox__panel {
    top: 70px;
    right: 8px;
    bottom: auto;
    left: 8px;
    width: auto;
    max-height: min(62dvh, 480px);
  }

  .pravljice-story-shelf__track {
    grid-auto-columns: clamp(158px, 42vw, 205px);
  }
}

@media (max-width: 520px) {
  .pravljice-header {
    padding-bottom: 14px;
  }

  .pravljice-story-shelf,
  .pravljice-map-strip {
    margin-top: 30px;
  }

  .pravljice-story-shelf__title h2,
  .pravljice-map-strip h2 {
    font-size: 24px;
  }

  .pravljice-sources--browse .pravljice-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .pravljice-sources--browse #viri-title {
    font-size: 27px;
  }

  .pravljice-story-shelf__track {
    grid-auto-columns: minmax(150px, 50vw);
    gap: 10px;
    padding-right: 42px;
    padding-left: 42px;
    scroll-padding-inline: 42px;
  }

  .pravljice-story-shelf__controls button {
    width: 36px;
    height: 52px;
    border-radius: 6px;
  }

  .pravljice-story-tile__title {
    font-size: 18px;
  }
}

@media (max-width: 1100px) {
  .pravljice-source-track {
    grid-auto-columns: clamp(230px, 34vw, 310px);
  }

  .pravljice-story-layout {
    grid-template-columns: 1fr;
  }

  .pravljice-story-sidebar {
    position: static;
  }

  .pravljice-story-sidebar__image {
    width: min(100%, 340px);
  }

  .pravljice-story-sidebar .pravljice-actions,
  .pravljice-story-tag-groups {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .pravljice-content-grid {
    grid-template-columns: 1fr;
  }

  .pravljice-audio-player,
  .pravljice-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .pravljice-header,
  .pravljice-story-row,
  .pravljice-neighbors {
    align-items: stretch;
    flex-direction: column;
  }

  .pravljice-header,
  .pravljice-reader-page__header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .pravljice-chat-widget {
    grid-column: 2;
    justify-self: end;
  }

  .pravljice-header__actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: flex-end;
  }

  .pravljice-hero {
    grid-template-columns: 1fr;
  }

  .pravljice-hero h1,
  .pravljice-detail h1 {
    font-size: 48px;
  }

  .pravljice-filters {
    grid-template-columns: 1fr;
  }

  .pravljice-tag-groups,
  .pravljice-reading--parallel {
    grid-template-columns: 1fr;
  }

  .pravljice-source-track {
    grid-auto-columns: minmax(230px, 82vw);
  }

  .pravljice-source-profile {
    min-height: auto;
    padding-top: 0;
  }

  .pravljice-source-profile__body {
    grid-template-columns: 1fr;
  }

  .pravljice-source-toc {
    position: relative;
    top: auto;
    max-height: none;
  }

  .pravljice-source-profile__intro h1 {
    font-size: 44px;
  }

  .pravljice-story-row__image,
  .pravljice-story-row__initial {
    width: 100%;
    min-height: 72px;
    flex-basis: auto;
  }

  .pravljice-story-row__actions,
  .pravljice-story-row__open {
    text-align: center;
  }

  .pravljice-story-row__actions {
    width: 100%;
  }

  .pravljice-audio-player {
    width: calc(100% - 20px);
    gap: 10px;
  }

  .pravljice-audio-player__controls {
    justify-content: stretch;
  }

  .pravljice-audio-player__controls button {
    flex: 1;
  }

  .pravljice-reader-page__header {
    align-items: center;
  }
}

@media (max-width: 720px) {
  .pravljice-source-map {
    min-height: 300px;
    aspect-ratio: 1 / 0.86;
  }

  .pravljice-reader-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .pravljice-book-reader[data-pravljice-page-turner] {
    padding: 10px;
  }

  .pravljice-book-reader__nav {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    margin-bottom: 8px;
  }

  .pravljice-book-reader__nav button {
    width: 40px;
    height: 40px;
  }

  .pravljice-book-page {
    width: var(--reader-page-outer-width, 100%);
    padding: var(--reader-page-padding-block, 28px) var(--reader-page-padding-inline, 22px);
  }

  .pravljice-book-page--cover {
    min-height: 100%;
    padding: 0;
  }

  .pravljice-book-page--frontmatter dl {
    grid-template-columns: 1fr;
  }

  .pravljice-book-reader__cover {
    min-height: 78dvh;
  }

  .pravljice-book-reader__cover-copy {
    padding: 30px 22px;
  }

  .pravljice-book-reader__cover-copy h1 {
    font-size: 40px;
  }

  .pravljice-book-reader__frontmatter,
  .pravljice-book-reader__body,
  .pravljice-book-reader__original {
    width: min(100% - 32px, 700px);
  }

  .pravljice-book-reader__frontmatter dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .pravljice-shell {
    width: min(100% - 20px, 1320px);
    padding-top: 12px;
  }

  .pravljice-hero h1,
  .pravljice-detail h1 {
    font-size: 40px;
  }

  .pravljice-story-facts {
    grid-template-columns: 1fr;
  }

  .pravljice-hero__subtitle {
    font-size: 20px;
  }

  .pravljice-text {
    padding: 22px;
  }

  .pravljice-text p {
    font-size: 18px;
  }

  .pravljice-source-profile__intro h1 {
    font-size: 38px;
  }

  .pravljice-source-toc__item > a {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 12px;
  }

  .pravljice-source-toc__open {
    grid-column: 1 / 2;
    grid-row: auto;
    justify-self: start;
  }
}

@media all and (display-mode: standalone) {
  body.pravljice-page {
    min-height: 100svh;
  }

  .pravljice-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }
}

.pravljice-actions > .pravljice-actions__purchase {
  border: 1px solid var(--leaf);
  border-radius: 8px;
  background: var(--leaf);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  padding: 8px 12px;
}

.pravljice-actions > .pravljice-actions__purchase:hover,
.pravljice-actions > .pravljice-actions__purchase:focus-visible {
  background: #245b44;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pravljice-story-purchase {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.pravljice-story-purchase a {
  border: 1px solid var(--leaf);
  border-radius: 8px;
  background: rgba(47, 111, 84, 0.08);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  padding: 7px 10px;
  text-align: center;
  text-decoration: none;
}

.pravljice-story-purchase a:hover,
.pravljice-story-purchase a:focus-visible {
  background: var(--leaf);
  color: #fff;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pravljice-purchase-dialog {
  width: min(460px, calc(100vw - 28px));
  max-width: none;
  max-height: min(90vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf2;
  color: var(--ink);
  padding: clamp(22px, 5vw, 34px);
  box-shadow: 0 28px 90px rgba(15, 22, 19, 0.34);
}

.pravljice-purchase-dialog::backdrop {
  background: rgba(18, 27, 23, 0.58);
  backdrop-filter: blur(4px);
}

.pravljice-purchase-dialog [hidden] {
  display: none;
}

.pravljice-purchase-dialog__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.pravljice-purchase-dialog__eyebrow {
  margin: 0 0 6px;
  color: var(--leaf);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pravljice-purchase-dialog h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 6vw, 36px);
  line-height: 1.12;
}

.pravljice-purchase-dialog__book {
  margin: 8px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.pravljice-purchase-dialog__notice {
  border-left: 3px solid var(--gold);
  background: rgba(214, 169, 50, 0.12);
  margin: 0 0 20px;
  padding: 10px 12px;
  font-size: 13px;
}

.pravljice-purchase-dialog form,
.pravljice-purchase-dialog label {
  display: grid;
  gap: 6px;
}

.pravljice-purchase-dialog form {
  gap: 14px;
}

.pravljice-purchase-dialog label span {
  font-size: 13px;
  font-weight: 800;
}

.pravljice-purchase-dialog input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

.pravljice-purchase-dialog input:focus-visible,
.pravljice-purchase-dialog__close:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

.pravljice-purchase-dialog__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pravljice-purchase-dialog__submit {
  width: 100%;
  border: 1px solid var(--leaf);
  border-radius: 8px;
  background: var(--leaf);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 11px 14px;
}

.pravljice-purchase-dialog__submit:hover,
.pravljice-purchase-dialog__submit:focus-visible {
  background: #245b44;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pravljice-purchase-dialog__result p:not(.pravljice-purchase-dialog__eyebrow) {
  margin: 16px 0 22px;
}

.pravljice-sources--browse {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
  min-height: min(610px, 70vh);
  margin-top: clamp(12px, 3vw, 34px);
}

.pravljice-sources__intro {
  align-self: center;
  padding: 20px 0;
}

.pravljice-sources__eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--berry);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pravljice-sources--browse #viri-title {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.02;
}

.pravljice-sources__intro p {
  max-width: 44ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

.pravljice-sources--browse .pravljice-source-carousel {
  min-width: 0;
  overflow: hidden;
}

.pravljice-sources--browse .pravljice-source-track {
  grid-auto-columns: 100%;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 12% 16px;
  scroll-padding-inline: 12%;
  scrollbar-width: none;
}

.pravljice-sources--browse .pravljice-source-track::-webkit-scrollbar {
  display: none;
}

.pravljice-sources--browse .pravljice-source-card {
  min-height: clamp(410px, 42vw, 520px);
  scroll-snap-align: center;
  box-shadow: 0 20px 52px rgba(31, 42, 36, 0.16);
}

.pravljice-sources--browse .pravljice-source-card__content {
  right: clamp(18px, 3vw, 28px);
  bottom: clamp(18px, 3vw, 28px);
  left: clamp(18px, 3vw, 28px);
}

.pravljice-sources--browse .pravljice-source-card__title {
  font-size: clamp(29px, 3vw, 40px);
}

.pravljice-sources--browse .pravljice-source-card__description {
  max-width: 46ch;
}

.pravljice-sources--browse .pravljice-source-controls {
  inset: 0 4px 12px;
}

.pravljice-sources--browse .pravljice-source-controls button {
  width: 56px;
  height: 56px;
  font-size: 40px;
}

@media (max-width: 860px) {
  .pravljice-sources--browse {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    min-height: 0;
    margin-top: 8px;
  }

  .pravljice-sources__intro {
    padding: 8px 4px 0;
  }

  .pravljice-sources--browse #viri-title {
    max-width: 16ch;
    font-size: clamp(36px, 9vw, 50px);
  }

  .pravljice-sources__intro p {
    max-width: 58ch;
    margin-top: 18px;
  }

  .pravljice-sources--browse .pravljice-source-track {
    grid-auto-columns: 100%;
    padding-right: 9%;
    padding-left: 9%;
    scroll-padding-inline: 9%;
  }

  .pravljice-sources--browse .pravljice-source-card {
    min-height: 420px;
  }
}

@media (max-width: 520px) {
  .pravljice-sources--browse #viri-title {
    max-width: 15ch;
    font-size: 36px;
  }

  .pravljice-sources__intro p {
    font-size: 16px;
  }

  .pravljice-sources--browse .pravljice-source-card {
    min-height: 370px;
  }

  .pravljice-sources--browse .pravljice-source-card__title {
    font-size: 28px;
  }

  .pravljice-sources--browse .pravljice-source-controls button {
    width: 46px;
    height: 46px;
    font-size: 34px;
  }
}

.pravljice-results--catalog {
  margin-top: clamp(26px, 5vw, 62px);
}

.pravljice-results__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.pravljice-results__header h1 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1;
}

.pravljice-results__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pravljice-results__filters span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
}

.pravljice-results__summary {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 7px;
  align-items: baseline;
  justify-items: end;
  flex: 0 0 auto;
  color: var(--muted);
}

.pravljice-results__summary strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.pravljice-results__summary a {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pravljice-results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.pravljice-results__grid .pravljice-story-tile {
  aspect-ratio: 4 / 5;
  min-height: 0;
  scroll-snap-align: none;
  box-shadow: 0 16px 38px rgba(31, 42, 36, 0.14);
}

.pravljice-results__grid .pravljice-story-tile__content {
  right: 20px;
  bottom: 20px;
  left: 20px;
  gap: 7px;
}

.pravljice-results__grid .pravljice-story-tile__source {
  font-size: 11px;
}

.pravljice-results__grid .pravljice-story-tile__title {
  font-size: clamp(25px, 2.3vw, 34px);
  -webkit-line-clamp: 4;
}

.pravljice-results--catalog .pravljice-pages {
  margin-top: 30px;
}

@media (max-width: 700px) {
  .pravljice-results__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .pravljice-results__summary {
    justify-items: start;
  }

  .pravljice-results__grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 14px;
  }

  .pravljice-results__grid .pravljice-story-tile {
    aspect-ratio: 4 / 5;
  }
}
