.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.home {
  margin: 0;
  background: #050c28;
  color: #fff6e7;
  overflow-x: hidden;
}

body.home.admin-bar .ks-stage {
  min-height: calc(100vh - 32px);
}

.home .ks-footer {
  display: none;
}

.ks-home-mockup {
  min-height: 0;
}

.ks-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0;
  background: #050c28;
}

.ks-stage__frame {
  position: relative;
  width: min(100vw, 2048px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.ks-stage__frame--assembled {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.ks-stage__frame--assembled::before,
.ks-stage__frame--assembled::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ks-stage__frame--assembled::before {
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      #050c28 0%,
      rgba(5, 12, 40, 0.94) 7%,
      rgba(5, 12, 40, 0.76) 14%,
      rgba(5, 12, 40, 0.38) 22%,
      rgba(5, 12, 40, 0.12) 29%,
      rgba(5, 12, 40, 0) 36%
    );
}

.ks-stage__frame--assembled::after {
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(5, 12, 40, 0.78) 0%,
      rgba(5, 12, 40, 0.52) 2.2%,
      rgba(5, 12, 40, 0.24) 4.8%,
      rgba(5, 12, 40, 0.08) 6.8%,
      rgba(5, 12, 40, 0) 9%
    ),
    linear-gradient(
      270deg,
      rgba(5, 12, 40, 0.78) 0%,
      rgba(5, 12, 40, 0.52) 2.2%,
      rgba(5, 12, 40, 0.24) 4.8%,
      rgba(5, 12, 40, 0.08) 6.8%,
      rgba(5, 12, 40, 0) 9%
    );
  box-shadow:
    inset 0 112px 110px -42px rgba(5, 12, 40, 0.94),
    inset 0 170px 145px -105px rgba(5, 12, 40, 0.46),
    inset 68px 0 88px -59px rgba(5, 12, 40, 0.38),
    inset -68px 0 88px -59px rgba(5, 12, 40, 0.38);
}

.ks-assembled {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.ks-assembled__header {
  position: absolute;
  inset: 3.2% 4.8% auto 4.8%;
  display: grid;
  grid-template-columns: 12% 17% minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2%;
}

.ks-assembled__logo img,
.ks-assembled__title img,
.ks-assembled__cat,
.ks-image-button img {
  display: block;
  width: 100%;
  height: auto;
}

.ks-mobile-menu {
  display: none;
}

.ks-image-button img {
  position: relative;
  z-index: 2;
}

.ks-assembled__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.1%;
  margin-top: 0;
  transform: translateY(-22px);
  min-width: 0;
}

.ks-nav-pill,
.ks-nav-pill--button {
  --ks-nav-sparkles-shift: clamp(34px, 2.1vw, 42px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 0;
  padding: 0;
  color: #f6d19b;
  font-size: clamp(18px, 1.55vw, 28px);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  text-shadow: 0 0 18px rgba(245, 202, 128, 0.28);
}

.ks-nav-pill,
.ks-nav-pill *,
.ks-social,
.ks-social *,
.ks-image-button,
.ks-image-button *,
.ks-store-badge,
.ks-store-badge *,
.ks-mini-link,
.ks-mini-link *,
.ks-btn {
  transition: none !important;
}

.ks-image-button {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.ks-nav-label {
  position: relative;
  z-index: 1;
  display: inline-block;
  white-space: nowrap;
}

.ks-nav-pill img {
  width: clamp(40px, 3.6vw, 68px);
  height: auto;
}

.ks-nav-pill--scroll img {
  width: clamp(48px, 4.2vw, 78px);
}

.ks-assembled__socials {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 0;
  transform: translateY(-22px);
  margin-left: 22px;
  padding-right: 4px;
}

.ks-social {
  display: block;
  position: relative;
  isolation: isolate;
  width: clamp(50px, 3.9vw, 86px);
  height: auto;
  text-decoration: none;
  flex: 0 0 auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.ks-social:nth-child(1) {
  --ks-social-glow: rgba(48, 221, 255, 0.78);
  --ks-social-core: rgba(255, 255, 255, 0.42);
}

.ks-social:nth-child(2) {
  --ks-social-glow: rgba(183, 112, 255, 0.76);
  --ks-social-core: rgba(255, 255, 255, 0.38);
}

.ks-social:nth-child(3) {
  --ks-social-glow: rgba(255, 72, 48, 0.76);
  --ks-social-core: rgba(255, 255, 255, 0.34);
}

.ks-social::before,
.ks-social::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.ks-social::before {
  inset: -7%;
  z-index: 0;
  background:
    radial-gradient(circle, var(--ks-social-core) 0%, var(--ks-social-glow) 38%, rgba(255, 255, 255, 0) 74%);
  transform: translateZ(0) scale(0.86);
}

.ks-social::after {
  inset: 12%;
  z-index: 2;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.46) 0%, var(--ks-social-core) 34%, rgba(255, 255, 255, 0) 68%);
  mix-blend-mode: screen;
  transform: translateZ(0) scale(0.74);
}

.ks-social img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.ks-assembled__hero {
  position: absolute;
  inset: 22.5% auto auto 31.4%;
  width: 37.4%;
}

.ks-assembled__ctas {
  position: absolute;
  inset: auto 19.4% 4.7% 24%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.4%;
  align-items: end;
}

.ks-image-button {
  display: block;
  position: relative;
  isolation: isolate;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ks-image-button--app {
  --ks-button-glow-image: url("../images/home/btn-app.webp");
}

.ks-image-button--donate {
  --ks-button-glow-image: url("../images/home/btn-donate.webp");
}

.ks-image-button--listen {
  --ks-button-glow-image: url("../images/home/Слушать сказку.webp");
  display: none;
}

.ks-image-button::before,
.ks-image-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transform: translateZ(0);
  will-change: opacity, transform;
}

.ks-image-button::before {
  inset: 0;
  z-index: 1;
  background: var(--ks-button-glow-image) center / 100% 100% no-repeat;
  filter: brightness(1.32) saturate(1.38) blur(12px);
  opacity: 0.78;
  animation: ks-image-button-glow 2.1s ease-in-out infinite;
}

.ks-image-button::after {
  inset: 10% 6% 11%;
  z-index: 0;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 231, 154, 0.38) 0%, rgba(255, 180, 68, 0.18) 42%, rgba(255, 169, 63, 0) 76%);
  box-shadow:
    0 0 28px rgba(255, 218, 128, 0.36),
    0 0 68px rgba(255, 174, 59, 0.24);
  opacity: 0.34;
  animation: ks-image-button-aura 2.1s ease-in-out infinite;
}

.ks-image-button--donate::after {
  inset: 10% 5% 11% 2%;
}

.ks-nav-pill:focus-visible {
  outline: 2px solid rgba(247, 200, 130, 0.55);
  outline-offset: 6px;
}

.ks-social:hover,
.ks-social:focus-visible {
  transform: translateZ(0) scale(1.055);
}

.ks-social:hover::before,
.ks-social:focus-visible::before {
  opacity: 0.96;
  animation: ks-social-core-glow 1.15s ease-in-out infinite;
}

.ks-social:hover::after,
.ks-social:focus-visible::after {
  opacity: 0.72;
  animation: ks-social-inner-glow 1.15s ease-in-out infinite;
}

.ks-image-button:hover,
.ks-image-button:focus-visible {
  transform: translateZ(0) scale(1.018);
}

@keyframes ks-image-button-glow {
  0%,
  100% {
    opacity: 0.58;
    transform: translateZ(0) scale(1.005);
  }

  50% {
    opacity: 0.88;
    transform: translateZ(0) scale(1.032);
  }
}

@keyframes ks-image-button-aura {
  0%,
  100% {
    opacity: 0.24;
    transform: translateZ(0) scale(1);
  }

  50% {
    opacity: 0.52;
    transform: translateZ(0) scale(1.055);
  }
}

@keyframes ks-social-core-glow {
  0%,
  100% {
    opacity: 0.72;
    transform: translateZ(0) scale(0.9);
  }

  50% {
    opacity: 1;
    transform: translateZ(0) scale(1.08);
  }
}

@keyframes ks-social-inner-glow {
  0%,
  100% {
    opacity: 0.38;
    transform: translateZ(0) scale(0.78);
  }

  50% {
    opacity: 0.8;
    transform: translateZ(0) scale(1);
  }
}

.ks-nav-pill--scroll {
  gap: 6px;
}

.ks-nav-pill--scroll .ks-nav-label {
  position: relative;
  top: -1px;
}

.ks-nav-sparkles {
  display: block;
  position: absolute;
  left: calc(50% + var(--ks-nav-sparkles-shift));
  top: -32px;
  width: 130px;
  height: 48px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, 0, 0);
  contain: layout paint;
}

.ks-nav-sparkles::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/home/resize/nav-stars.webp") center / contain no-repeat;
  opacity: 0;
  transform: translateZ(0);
  will-change: opacity, transform;
}

.ks-nav-star {
  position: absolute;
  display: block;
  color: #ffe389;
  line-height: 1;
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.72);
  will-change: opacity, transform;
}

.ks-nav-star--1 {
  left: 22px;
  top: 31px;
  font-size: 15px;
}

.ks-nav-star--2 {
  left: 54px;
  top: 18px;
  font-size: 19px;
}

.ks-nav-star--3 {
  left: 83px;
  top: 9px;
  font-size: 14px;
}

.ks-nav-star--4 {
  left: 106px;
  top: 25px;
  font-size: 22px;
}

.ks-nav-pill:hover .ks-nav-sparkles,
.ks-nav-pill:focus-visible .ks-nav-sparkles,
.ks-nav-pill--active .ks-nav-sparkles,
.ks-nav-pill--selected .ks-nav-sparkles {
  opacity: 1;
}

.ks-nav-pill--active .ks-nav-sparkles::before,
.ks-nav-pill--selected .ks-nav-sparkles::before {
  opacity: 1;
}

.ks-nav-pill:hover:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-sparkles::before,
.ks-nav-pill:focus-visible:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-sparkles::before {
  animation: ks-nav-constellation-preview 1.05s ease-out infinite;
}

.ks-nav-pill:hover:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--1,
.ks-nav-pill:focus-visible:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--1 {
  animation: ks-nav-star-flight-1 1.05s ease-out infinite;
}

.ks-nav-pill:hover:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--2,
.ks-nav-pill:focus-visible:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--2 {
  animation: ks-nav-star-flight-2 1.05s ease-out infinite 0.08s;
}

.ks-nav-pill:hover:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--3,
.ks-nav-pill:focus-visible:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--3 {
  animation: ks-nav-star-flight-3 1.05s ease-out infinite 0.15s;
}

.ks-nav-pill:hover:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--4,
.ks-nav-pill:focus-visible:not(.ks-nav-pill--active):not(.ks-nav-pill--selected) .ks-nav-star--4 {
  animation: ks-nav-star-flight-4 1.05s ease-out infinite 0.2s;
}

@keyframes ks-nav-constellation-preview {
  0% {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.92);
  }

  42%,
  70% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translate3d(0, -4px, 0) scale(1);
  }
}

@keyframes ks-nav-star-flight-1 {
  0% { opacity: 0; transform: translate3d(-6px, 16px, 0) scale(0.62); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(2px, -2px, 0) scale(1); }
}

@keyframes ks-nav-star-flight-2 {
  0% { opacity: 0; transform: translate3d(-2px, 14px, 0) scale(0.62); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, -7px, 0) scale(1.05); }
}

@keyframes ks-nav-star-flight-3 {
  0% { opacity: 0; transform: translate3d(3px, 13px, 0) scale(0.62); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(5px, -6px, 0) scale(1); }
}

@keyframes ks-nav-star-flight-4 {
  0% { opacity: 0; transform: translate3d(6px, 18px, 0) scale(0.62); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(10px, -3px, 0) scale(1.08); }
}

.ks-home-minibar {
  background: #050c28;
  padding: 0;
}

.ks-home-minibar__inner {
  width: min(100vw, 2048px);
  max-width: none;
  box-sizing: border-box;
  margin: 0 auto;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1.15fr 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 34px 14px;
  border-top: 1px solid rgba(247, 200, 130, 0.12);
  background:
    linear-gradient(180deg, rgba(7, 16, 44, 0.86), rgba(5, 12, 40, 0.96));
}

.ks-home-minibar__group {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.ks-home-minibar__group--social {
  justify-content: flex-start;
}

.ks-home-minibar__group--legal {
  justify-content: center;
}

.ks-home-minibar__group--copyright {
  justify-content: flex-end;
}

.ks-stage__frame--about {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.ks-stage__frame--about::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 12, 40, 0.94) 0%, rgba(5, 12, 40, 0.68) 12%, rgba(5, 12, 40, 0.1) 31%, rgba(5, 12, 40, 0) 52%);
}

.ks-about {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.ks-about::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      #050c28 0%,
      rgba(5, 12, 40, 0.86) 2.2%,
      rgba(5, 12, 40, 0.46) 4.8%,
      rgba(5, 12, 40, 0.16) 7.2%,
      rgba(5, 12, 40, 0) 10.2%,
      rgba(5, 12, 40, 0) 89.8%,
      rgba(5, 12, 40, 0.16) 92.8%,
      rgba(5, 12, 40, 0.46) 95.2%,
      rgba(5, 12, 40, 0.86) 97.8%,
      #050c28 100%
    );
  box-shadow:
    inset 72px 0 104px -58px rgba(5, 12, 40, 0.58),
    inset -72px 0 104px -58px rgba(5, 12, 40, 0.58);
}

.ks-about .ks-assembled__header {
  z-index: 6;
}

.ks-about-paper {
  position: absolute;
  z-index: 3;
  top: 7.4%;
  right: -0.3%;
  bottom: -0.8%;
  width: 38.4%;
  background: url("../images/home/resize/paper-900.webp") center / 100% 100% no-repeat;
  color: #5f210f;
}

.ks-about-paper__content {
  position: relative;
  z-index: 2;
  width: 73%;
  padding: 7.5% 8.5% 0 10.6%;
}

.ks-about-paper h1 {
  margin: 0 0 4.8%;
  color: #5b1d0b;
  font-size: clamp(34px, 3.45vw, 68px);
  line-height: 0.94;
  text-align: center;
}

.ks-about-paper p {
  margin: 0 0 3.4%;
  color: #5f210f;
  font-size: clamp(16px, 1.24vw, 25px);
  font-weight: 800;
  line-height: 1.16;
}

.ks-about-donate {
  position: absolute;
  z-index: 4;
  left: 18.5%;
  bottom: 18.2%;
  width: 60%;
}

.ks-about-notes {
  position: absolute;
  z-index: 4;
  left: 18.5%;
  bottom: 1.6%;
  width: 60%;
  aspect-ratio: 713 / 260;
  display: block;
  background: url("../images/home/Записки котофея666.webp") center / contain no-repeat;
  text-decoration: none;
}

.ks-about-notes::before,
.ks-about-notes::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transform: translateZ(0);
  will-change: opacity, transform;
}

.ks-about-notes::before {
  inset: 0;
  z-index: 1;
  background: url("../images/home/Записки котофея666.webp") center / 100% 100% no-repeat;
  filter: brightness(1.32) saturate(1.38) blur(12px);
  opacity: 0.78;
  animation: ks-image-button-glow 2.1s ease-in-out infinite;
}

.ks-about-notes::after {
  inset: 10% 5% 11% 2%;
  z-index: 0;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 231, 154, 0.38) 0%, rgba(255, 180, 68, 0.18) 42%, rgba(255, 169, 63, 0) 76%);
  box-shadow:
    0 0 28px rgba(255, 218, 128, 0.36),
    0 0 68px rgba(255, 174, 59, 0.24);
  opacity: 0.34;
  animation: ks-image-button-aura 2.1s ease-in-out infinite;
}

.ks-tales-sign {
  position: absolute;
  left: 13.4%;
  bottom: 0;
  z-index: 3;
  width: clamp(220px, 22.2vw, 455px);
  aspect-ratio: 576 / 1165;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.34));
}

.ks-tales-sign__image {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ks-tales-sign__button {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
  padding: 0 5%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffd996;
  cursor: pointer;
  font-family: "Arial Black", "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(22px, 1.85vw, 38px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #5b210f,
    0 3px 2px rgba(54, 18, 7, 0.72),
    0 -1px 0 #7a3518,
    1px 0 0 #7a3518,
    -1px 0 0 #7a3518,
    0 0 10px rgba(255, 230, 156, 0.52);
  -webkit-text-stroke: 0.055em #733018;
  transition: none !important;
}

.ks-tales-sign__button::before,
.ks-tales-sign__button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(0);
  transition: none !important;
}

.ks-tales-sign__button::before {
  left: 8%;
  right: 9%;
  bottom: -15%;
  z-index: 0;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 234, 139, 0.25) 14%, rgba(255, 255, 219, 0.95) 48%, rgba(255, 192, 57, 0.55) 72%, transparent 100%);
  filter:
    drop-shadow(0 0 4px rgba(255, 241, 166, 0.86))
    drop-shadow(0 0 13px rgba(255, 181, 50, 0.62));
  transform-origin: center;
}

.ks-tales-sign__button::after {
  inset: -44% -18% -38%;
  z-index: 0;
  background:
    radial-gradient(circle at 3% 52%, rgba(255, 255, 221, 0.98) 0 4px, transparent 5px),
    radial-gradient(circle at 15% 22%, rgba(255, 219, 86, 0.86) 0 2px, transparent 3px),
    radial-gradient(circle at 31% 12%, rgba(255, 249, 190, 0.92) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 63% 10%, rgba(255, 237, 128, 0.84) 0 2px, transparent 3px),
    radial-gradient(circle at 83% 24%, rgba(255, 255, 218, 0.9) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 98% 53%, rgba(255, 255, 221, 0.96) 0 4px, transparent 5px),
    radial-gradient(circle at 46% 91%, rgba(255, 218, 83, 0.82) 0 2px, transparent 3px);
  filter:
    drop-shadow(0 0 5px rgba(255, 236, 141, 0.82))
    drop-shadow(0 0 10px rgba(255, 183, 49, 0.42));
}

.ks-tales-sign__button--age-2 {
  left: 9.4%;
  top: 10%;
  width: 55%;
  height: 8.6%;
}

.ks-tales-sign__button--age-4 {
  left: 4.5%;
  top: 28.2%;
  width: 60%;
  height: 8.6%;
}

.ks-tales-sign__button--age-6 {
  left: 4.6%;
  top: 45.7%;
  width: 61%;
  height: 8.4%;
}

.ks-tales-sign__button--age-8 {
  left: 5.4%;
  top: 64.3%;
  width: 62%;
  height: 8.5%;
}

.ks-tales-sign__button:focus,
.ks-tales-sign__button:focus-visible {
  outline: 0;
  box-shadow: none;
}

.ks-tales-sign__button:hover,
.ks-tales-sign__button:focus-visible {
  color: #ffe2a8;
  text-shadow:
    0 2px 0 #5b210f,
    0 3px 2px rgba(54, 18, 7, 0.72),
    0 -1px 0 #7a3518,
    1px 0 0 #7a3518,
    -1px 0 0 #7a3518,
    0 0 16px rgba(255, 235, 172, 0.78);
}

.ks-tales-sign__button--active,
.ks-tales-sign__button[aria-pressed="true"] {
  color: #fff1ba;
  filter:
    drop-shadow(0 0 4px rgba(255, 239, 168, 0.62))
    drop-shadow(0 0 9px rgba(255, 184, 54, 0.32));
  text-shadow:
    0 2px 0 #5b210f,
    0 3px 2px rgba(54, 18, 7, 0.72),
    0 -1px 0 #7a3518,
    1px 0 0 #7a3518,
    -1px 0 0 #7a3518,
    0 0 8px rgba(255, 239, 166, 0.9),
    0 0 16px rgba(255, 185, 56, 0.42);
}

.ks-tales-sign__button--active::before,
.ks-tales-sign__button[aria-pressed="true"]::before {
  opacity: 1;
  animation: ks-tales-sign-active-trail 1.75s ease-in-out infinite;
}

.ks-tales-sign__button--active::after,
.ks-tales-sign__button[aria-pressed="true"]::after {
  opacity: 1;
  animation: ks-tales-sign-active-fireflies 2.1s ease-in-out infinite;
}

@keyframes ks-tales-sign-active-trail {
  0%,
  100% {
    opacity: 0.58;
    transform: translateZ(0) scaleX(0.86);
  }

  50% {
    opacity: 1;
    transform: translateZ(0) scaleX(1.08);
  }
}

@keyframes ks-tales-sign-active-fireflies {
  0%,
  100% {
    opacity: 0.54;
    transform: translateZ(0) translate(0, 2px) scale(0.96);
  }

  50% {
    opacity: 1;
    transform: translateZ(0) translate(0, -5px) scale(1.04);
  }
}

.ks-tales-genres {
  position: absolute;
  top: 18.2%;
  left: 33.1%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.25vw, 24px);
  width: min(59.1%, 1230px);
}

.ks-genre-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 0.82;
  border: 2px solid rgba(255, 219, 151, 0.86);
  border-radius: 8px;
  background: rgba(42, 18, 9, 0.38);
  color: #ffd996;
  text-decoration: none;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(70, 23, 10, 0.72),
    inset 0 0 18px rgba(255, 225, 154, 0.16);
  filter: drop-shadow(0 0 0 rgba(255, 220, 128, 0));
  transform: translateZ(0);
  transition: none !important;
  will-change: filter, transform;
}

.ks-genre-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: translateZ(0);
}

.ks-genre-card::before,
.ks-genre-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.ks-genre-card::before {
  top: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(48, 19, 7, 0.7), rgba(48, 19, 7, 0));
}

.ks-genre-card::after {
  bottom: 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(48, 19, 7, 0.76), rgba(48, 19, 7, 0));
}

.ks-genre-card__title,
.ks-genre-card__caption {
  position: absolute;
  left: 5%;
  right: 5%;
  z-index: 2;
  display: block;
  color: #ffd996;
  font-family: "Arial Black", "Trebuchet MS", Arial, sans-serif;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  text-shadow:
    -1px -1px 0 #733018,
    0 -1px 0 #733018,
    1px -1px 0 #733018,
    -1px 0 0 #733018,
    1px 0 0 #733018,
    -1px 1px 0 #5b210f,
    0 1px 0 #5b210f,
    1px 1px 0 #5b210f,
    0 2px 1px rgba(54, 18, 7, 0.68),
    0 0 7px rgba(255, 224, 145, 0.46);
  -webkit-text-stroke: 0;
}

.ks-genre-card__title {
  top: 5.5%;
  font-size: clamp(15px, 1.25vw, 27px);
}

.ks-genre-card__caption {
  bottom: 4.8%;
  font-size: clamp(12px, 0.95vw, 20px);
}

.ks-genre-card--soviet .ks-genre-card__title {
  top: auto;
  bottom: 4.8%;
}

.ks-genre-card:hover,
.ks-genre-card:focus-visible {
  filter:
    drop-shadow(0 0 16px rgba(255, 228, 143, 0.62))
    drop-shadow(0 18px 26px rgba(255, 177, 58, 0.28));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(255, 218, 128, 0.62),
    0 0 46px rgba(255, 174, 59, 0.24),
    inset 0 0 0 1px rgba(255, 230, 166, 0.78),
    inset 0 0 18px rgba(255, 225, 154, 0.18);
  transform: translateZ(0) scale(1.012);
  animation: ks-genre-card-golden-glow 1.35s ease-in-out infinite;
}

.ks-genre-card:focus,
.ks-genre-card:focus-visible {
  outline: 0;
}

.ks-stories-view[hidden] {
  display: none !important;
}

.ks-stories-view {
  position: absolute;
  top: 11.2%;
  left: 32.8%;
  right: 5.2%;
  bottom: 0;
  z-index: 5;
}

.ks-stories-heading {
  position: absolute;
  top: 3%;
  left: 18.2%;
  width: 42.5%;
  aspect-ratio: 1572 / 316;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.36));
}

.ks-stories-heading__board,
.ks-stories-back img,
.ks-article-nav-row img,
.ks-story-card__image,
.ks-stories-scroll__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ks-stories-heading__title {
  position: absolute;
  inset: 12% 10% 18%;
  display: grid;
  place-items: center;
  color: #ffd996;
  font-family: "Arial Black", "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(18px, 1.68vw, 36px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  text-shadow:
    -1px -1px 0 #733018,
    0 -1px 0 #733018,
    1px -1px 0 #733018,
    -1px 0 0 #733018,
    1px 0 0 #733018,
    0 2px 1px rgba(54, 18, 7, 0.7),
    0 0 8px rgba(255, 226, 148, 0.42);
}

.ks-stories-back {
  position: absolute;
  z-index: 7;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
  transform: translateZ(0);
  transition: none !important;
}

.ks-stories-back {
  top: 3.4%;
  left: 61%;
  width: clamp(42px, 4.2vw, 84px);
  aspect-ratio: 1;
}

.ks-stories-back:hover,
.ks-stories-back:focus-visible {
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 14px rgba(255, 217, 128, 0.55));
  transform: translateZ(0) scale(1.04);
  outline: 0;
}

.ks-stories-grid {
  --ks-story-card-gap: clamp(12px, 1.25vw, 24px);
  position: absolute;
  top: 14.3%;
  left: 0.6%;
  right: 4.1%;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--ks-story-card-gap);
  padding: 0 0.8% 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.ks-stories-grid::-webkit-scrollbar {
  display: none;
}

.ks-story-card {
  position: relative;
  display: block;
  flex: 0 0 calc((100% - (3 * var(--ks-story-card-gap))) / 4);
  width: calc((100% - (3 * var(--ks-story-card-gap))) / 4);
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid rgba(255, 219, 151, 0.9);
  border-radius: 9px;
  background: rgba(42, 18, 9, 0.42);
  color: #ffd996;
  text-decoration: none;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(70, 23, 10, 0.72),
    inset 0 0 22px rgba(255, 225, 154, 0.12);
  transform: translateZ(0);
  transition: none !important;
}

.ks-story-card::before {
  content: "";
  display: block;
  padding-top: 121.95%;
}

.ks-story-card__image {
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.ks-story-card__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(40, 15, 6, 0.56) 0%, transparent 24%),
    linear-gradient(0deg, rgba(40, 15, 6, 0.78) 0%, rgba(40, 15, 6, 0.48) 34%, transparent 55%);
}

.ks-story-card__title {
  position: absolute;
  z-index: 2;
  display: block;
  font-family: "Arial Black", "Trebuchet MS", Arial, sans-serif;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    -1px -1px 0 #733018,
    0 -1px 0 #733018,
    1px -1px 0 #733018,
    -1px 0 0 #733018,
    1px 0 0 #733018,
    0 2px 1px rgba(54, 18, 7, 0.72),
    0 0 7px rgba(255, 224, 145, 0.44);
}

.ks-story-card__title {
  left: 5%;
  right: 5%;
  bottom: 5.8%;
  color: #ffd996;
  font-size: clamp(18px, 1.55vw, 34px);
}

.ks-story-card:hover,
.ks-story-card:focus-visible {
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(255, 218, 128, 0.52),
    inset 0 0 0 1px rgba(255, 230, 166, 0.72),
    inset 0 0 22px rgba(255, 225, 154, 0.14);
  filter: drop-shadow(0 0 14px rgba(255, 228, 143, 0.34));
  outline: 0;
}

.ks-stories-scroll {
  --ks-scroll-thumb-size: clamp(18px, 1.85vw, 38px);
  --ks-scroll-thumb-y: 4.5%;
  position: absolute;
  top: 12.8%;
  right: -5.3%;
  bottom: 0.8%;
  z-index: 6;
  display: block;
  width: clamp(30px, 2.8vw, 58px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ns-resize;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
  touch-action: none;
  transition: none !important;
  user-select: none;
}

.ks-stories-scroll::before {
  content: "";
  position: absolute;
  top: 2.5%;
  left: 50%;
  bottom: 4.5%;
  width: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(235, 246, 255, 0.98) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 233, 0.9) 0 1.8px, transparent 3px),
    radial-gradient(circle at 50% 36%, rgba(235, 246, 255, 0.86) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 55%, rgba(255, 238, 144, 0.84) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 76%, rgba(235, 246, 255, 0.84) 0 1.8px, transparent 3px),
    radial-gradient(circle at 50% 100%, rgba(235, 246, 255, 0.9) 0 3px, transparent 4px),
    linear-gradient(180deg, transparent 0%, rgba(232, 247, 255, 0.68) 7%, rgba(255, 255, 240, 0.76) 48%, rgba(232, 247, 255, 0.62) 92%, transparent 100%);
  background-repeat: no-repeat;
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    2px 100%;
  background-position:
    center,
    center,
    center,
    center,
    center,
    center,
    center;
  filter:
    drop-shadow(0 0 4px rgba(235, 248, 255, 0.48))
    drop-shadow(0 0 8px rgba(255, 217, 107, 0.24));
  opacity: 0.9;
  transform: translateX(-50%);
  pointer-events: none;
}

.ks-stories-scroll::after {
  content: "";
  position: absolute;
  top: 5.5%;
  left: 50%;
  width: 18px;
  height: 87%;
  background:
    radial-gradient(ellipse at 28% 10%, transparent 0 37%, rgba(221, 238, 242, 0.58) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 72% 27%, transparent 0 37%, rgba(221, 238, 242, 0.56) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 28% 44%, transparent 0 37%, rgba(221, 238, 242, 0.58) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 72% 63%, transparent 0 37%, rgba(221, 238, 242, 0.54) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 30% 82%, transparent 0 37%, rgba(221, 238, 242, 0.58) 39% 42%, transparent 45%);
  filter:
    drop-shadow(0 0 2px rgba(232, 247, 255, 0.42))
    drop-shadow(0 0 5px rgba(255, 235, 161, 0.22));
  opacity: 0.82;
  transform: translateX(-50%);
  pointer-events: none;
}

.ks-stories-scroll__thumb {
  position: absolute;
  left: 50%;
  top: var(--ks-scroll-thumb-y);
  z-index: 2;
  display: block;
  width: var(--ks-scroll-thumb-size);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 5px 8px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 6px rgba(255, 246, 183, 0.9))
    drop-shadow(0 0 18px rgba(255, 193, 61, 0.72));
}

.ks-stories-scroll:hover,
.ks-stories-scroll:focus-visible,
.ks-stories-scroll--dragging {
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 12px rgba(255, 225, 128, 0.44));
  outline: 0;
}

.ks-tales-genres,
.ks-tales-search,
.ks-stories-view {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.ks-stories-mode .ks-tales-genres {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
}

body.ks-stories-mode .ks-tales-search {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.98);
}

body.ks-stories-mode .ks-tales-search.ks-tales-search--lifted {
  top: 80.5%;
  bottom: auto;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(0.88);
}

@keyframes ks-genre-card-golden-glow {
  0%,
  100% {
    filter:
      drop-shadow(0 0 12px rgba(255, 228, 143, 0.5))
      drop-shadow(0 16px 24px rgba(255, 177, 58, 0.22));
  }

  50% {
    filter:
      drop-shadow(0 0 22px rgba(255, 235, 166, 0.78))
      drop-shadow(0 20px 34px rgba(255, 177, 58, 0.34));
  }
}

.ks-tales-search {
  position: absolute;
  left: 35.6%;
  bottom: 2.2%;
  z-index: 4;
  width: clamp(330px, 31.6vw, 648px);
  aspect-ratio: 1484 / 331;
  color: #5b2612;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.34));
}

.ks-tales-search__panel {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.ks-tales-search__title {
  position: absolute;
  top: 8%;
  left: 16%;
  right: 14%;
  color: #fff4df;
  font-size: clamp(17px, 1.18vw, 25px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(50, 18, 4, 0.92),
    0 0 9px rgba(255, 219, 138, 0.32);
}

.ks-tales-search__field {
  position: absolute;
  left: 9.8%;
  right: 8.4%;
  top: 39%;
  height: 36.5%;
}

.ks-tales-search__field input {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 15% 0 6.5%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #5b2612;
  font-family: inherit;
  font-size: clamp(15px, 1.05vw, 21px);
  font-weight: 500;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.ks-tales-search__field input::placeholder {
  color: rgba(91, 38, 18, 0.78);
  opacity: 1;
}

.ks-tales-search__field input::-webkit-search-decoration,
.ks-tales-search__field input::-webkit-search-cancel-button,
.ks-tales-search__field input::-webkit-search-results-button,
.ks-tales-search__field input::-webkit-search-results-decoration {
  display: none;
}

.ks-tales-search__submit {
  position: absolute;
  top: 50%;
  right: 3.5%;
  display: grid;
  place-items: center;
  width: 8.2%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3c1609;
  cursor: pointer;
  transform: translateY(-50%);
}

.ks-tales-search__submit svg {
  display: block;
  width: 72%;
  height: 72%;
  filter: drop-shadow(0 1px 0 rgba(255, 226, 158, 0.4));
}

.ks-tales-search__submit:focus,
.ks-tales-search__submit:focus-visible,
.ks-tales-search__field input:focus,
.ks-tales-search__field input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.ks-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 246, 231, 0.86);
  text-decoration: none;
  font-size: clamp(14px, 1.05vw, 20px);
  line-height: 1;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  transition: none !important;
}

.ks-mini-link__icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #d6d5ff;
  opacity: 0.92;
  pointer-events: none;
  transition: none !important;
}

.ks-mini-link__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: none !important;
}

.ks-mini-link__icon svg * {
  transition: none !important;
}

.ks-mini-copy {
  color: rgba(255, 246, 231, 0.72);
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1;
  white-space: nowrap;
}

.ks-mini-link:hover,
.ks-mini-link:focus-visible {
  color: #f7c882;
}

.ks-mini-link:focus-visible {
  outline: 1px solid rgba(247, 200, 130, 0.42);
  outline-offset: 3px;
}

.ks-mini-link:hover .ks-mini-link__icon,
.ks-mini-link:focus-visible .ks-mini-link__icon {
  color: #f7c882;
  opacity: 1;
}

.ks-home-categories {
  padding: 56px 24px 88px;
  background:
    radial-gradient(circle at top, rgba(58, 109, 205, 0.18), transparent 18%),
    linear-gradient(180deg, #08152f 0%, #071127 100%);
}

.ks-home-categories__inner {
  width: min(1680px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.ks-home-categories__column {
  padding: 30px 28px 34px;
  border: 1px solid rgba(244, 199, 119, 0.14);
  border-radius: 28px;
  background: rgba(8, 19, 43, 0.72);
  box-shadow: 0 16px 48px rgba(7, 18, 45, 0.36);
}

.ks-home-categories__column h2 {
  margin: 0 0 24px;
  color: #f3c986;
  font-size: clamp(28px, 2.3vw, 42px);
  line-height: 1;
}

.ks-category-grid {
  display: grid;
  gap: 20px;
}

.ks-category-grid--ages {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ks-category-grid--genres {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ks-category-card {
  display: block;
  text-decoration: none;
  text-align: center;
}

.ks-category-card img {
  display: block;
  width: 100%;
  max-width: 210px;
  margin: 0 auto 12px;
  height: auto;
}

.ks-category-card span {
  display: block;
  color: #ffe5bb;
  font-size: clamp(20px, 1.45vw, 26px);
  font-weight: 800;
  line-height: 1.15;
}

.ks-category-card--placeholder {
  display: grid;
  align-content: start;
  justify-items: center;
}

.ks-category-placeholder {
  display: grid !important;
  place-items: center;
  width: 100%;
  max-width: 210px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(113, 184, 255, 0.3), rgba(121, 96, 243, 0.15));
  border: 1px dashed rgba(255, 229, 187, 0.28);
  color: #dbcdb5;
  font-size: 18px;
}

.ks-modal[hidden] {
  display: none;
}

.ks-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.ks-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 11, 26, 0.8);
  backdrop-filter: blur(10px);
}

.ks-app-modal__backdrop {
  background:
    linear-gradient(180deg, rgba(4, 9, 24, 0.46), rgba(4, 9, 24, 0.76)),
    rgba(4, 9, 24, 0.42);
  backdrop-filter: blur(3px);
}

.ks-app-modal__dialog {
  position: relative;
  width: min(84vw, 980px);
  aspect-ratio: 3.16;
  margin: clamp(320px, 54vh, 428px) auto 0;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.48));
}

.ks-app-modal__panel {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.ks-app-modal__content {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ks-app-modal__close {
  position: absolute;
  top: 16.9%;
  right: 1.35%;
  display: grid;
  place-items: center;
  width: 4.2%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background:
    linear-gradient(180deg, #c78b4a 0%, #8f552d 100%);
  color: #5b1d0b;
  cursor: pointer;
  font-size: clamp(20px, 2.25vw, 34px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 224, 158, 0.45);
  box-shadow:
    inset 0 2px 0 rgba(255, 230, 166, 0.34),
    inset 0 -3px 0 rgba(71, 30, 12, 0.3),
    0 4px 8px rgba(57, 22, 9, 0.28);
}

.ks-app-modal__close:hover,
.ks-app-modal__close:focus-visible {
  transform: translateZ(0) scale(1.03);
}

.ks-app-modal__close:focus-visible {
  outline: 2px solid rgba(247, 200, 130, 0.7);
  outline-offset: 4px;
}

.ks-app-modal__content h2 {
  position: absolute;
  left: 24%;
  right: 21%;
  top: 34%;
  margin: 0;
  color: #5b1d0b;
  font-size: clamp(28px, 3.05vw, 46px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 228, 169, 0.5);
}

.ks-app-modal__content p {
  position: absolute;
  left: 27%;
  right: 24%;
  top: 52.5%;
  margin: 0;
  color: #5b1d0b;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 228, 169, 0.42);
}

.ks-app-modal__stores {
  position: absolute;
  left: 50%;
  bottom: 14.2%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.8%;
  width: 62%;
  transform: translateX(-50%);
}

.ks-store-badge {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 5px 8px 6px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, #090909 0%, #000 100%);
  color: #fff;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 5px 8px rgba(42, 18, 7, 0.18);
}

.ks-store-badge:hover,
.ks-store-badge:focus-visible {
  transform: translateZ(0) scale(1.02);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 16px rgba(255, 225, 143, 0.26),
    0 5px 8px rgba(42, 18, 7, 0.18);
}

.ks-store-badge:focus-visible {
  outline: 2px solid rgba(247, 200, 130, 0.7);
  outline-offset: 4px;
}

.ks-store-badge__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.ks-store-badge--google .ks-store-badge__mark {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(135deg, #2bd66f 0 28%, #2ca7ff 28% 50%, #ffda45 50% 72%, #ff5449 72% 100%);
  clip-path: polygon(16% 8%, 88% 50%, 16% 92%);
}

.ks-store-badge--rustore .ks-store-badge__mark {
  background: linear-gradient(180deg, #5caeff, #2670d8);
}

.ks-store-badge--gallery .ks-store-badge__mark {
  background: linear-gradient(180deg, #ed4862, #b61832);
}

.ks-store-badge--apple .ks-store-badge__mark {
  color: #050505;
  background: linear-gradient(180deg, #fff, #dcdcdc);
}

.ks-store-badge span:last-child {
  display: block;
  min-width: 0;
  font-family: Arial, sans-serif;
  font-size: clamp(12px, 0.92vw, 16px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.ks-store-badge small {
  display: block;
  margin-bottom: 1px;
  font-size: clamp(7px, 0.58vw, 10px);
  font-weight: 400;
  line-height: 1;
}

.ks-donate-modal__backdrop {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 219, 137, 0.08), transparent 34%),
    rgba(4, 9, 24, 0.72);
  backdrop-filter: blur(4px);
}

.ks-modal__dialog {
  position: relative;
  width: min(92vw, 640px);
  margin: min(12vh, 84px) auto 0;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(244, 199, 119, 0.22);
  background: rgba(8, 19, 43, 0.96);
  color: #fff6e7;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.44);
}

.ks-donate-modal__dialog {
  position: relative;
  width: min(92vw, 760px);
  aspect-ratio: 1.18;
  margin: clamp(26px, 7vh, 82px) auto 0;
  color: #5b1d0b;
  filter: drop-shadow(0 30px 54px rgba(0, 0, 0, 0.5));
}

.ks-donate-modal__paper {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.ks-donate-modal__content {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ks-donate-modal__content h2 {
  position: absolute;
  top: 7.6%;
  left: 50%;
  margin: 0;
  color: #5b1d0b;
  font-size: clamp(34px, 3.5vw, 56px);
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
  transform: translateX(-50%);
  text-shadow: 0 2px 0 rgba(255, 228, 169, 0.5);
}

.ks-donate-modal__copy {
  position: absolute;
  left: 13%;
  right: 13%;
  top: 64.2%;
  text-align: center;
}

.ks-donate-modal__copy p {
  margin: 0;
  color: #5b1d0b;
  font-size: clamp(27px, 3vw, 48px);
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 0 2px 0 rgba(255, 228, 169, 0.48);
}

.ks-donate-modal__copy span {
  display: block;
  margin-top: 0.4%;
  color: #5b1d0b;
  font-size: clamp(18px, 1.65vw, 27px);
  font-weight: 800;
  line-height: 1.1;
}

.ks-donate-modal__actions {
  position: absolute;
  left: 50%;
  bottom: 6.2%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5%;
  width: 60%;
  transform: translateX(-50%);
}

.ks-donate-modal__button {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  transition: none !important;
}

.ks-donate-modal__button img {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  pointer-events: none;
  transition: none !important;
}

.ks-donate-modal__button--donate::before,
.ks-donate-modal__button--donate::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transform: translateZ(0);
  will-change: opacity, transform;
}

.ks-donate-modal__button--donate::before {
  inset: -1%;
  z-index: 0;
  background: url("../images/home/кнопка донат.webp") center / 100% 100% no-repeat;
  filter: brightness(1.32) saturate(1.38) blur(12px);
  opacity: 0.78;
  animation: ks-donate-modal-button-glow 2s ease-in-out infinite;
}

.ks-donate-modal__button--donate::after {
  inset: 9% 4% 11%;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 231, 154, 0.42) 0%, rgba(255, 180, 68, 0.2) 42%, rgba(255, 169, 63, 0) 76%);
  box-shadow:
    0 0 28px rgba(255, 218, 128, 0.38),
    0 0 68px rgba(255, 174, 59, 0.26);
  opacity: 0.34;
  animation: ks-donate-modal-button-aura 2s ease-in-out infinite;
}

.ks-donate-modal__button:hover,
.ks-donate-modal__button:focus-visible {
  transform: translateZ(0) scale(1.018);
}

.ks-donate-modal__button:focus-visible {
  outline: 2px solid rgba(247, 200, 130, 0.7);
  outline-offset: 5px;
}

@keyframes ks-donate-modal-button-glow {
  0%,
  100% {
    opacity: 0.58;
    transform: translateZ(0) scale(1.005);
  }

  50% {
    opacity: 0.88;
    transform: translateZ(0) scale(1.032);
  }
}

@keyframes ks-donate-modal-button-aura {
  0%,
  100% {
    opacity: 0.24;
    transform: translateZ(0) scale(1);
  }

  50% {
    opacity: 0.52;
    transform: translateZ(0) scale(1.055);
  }
}

.ks-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #fff6e7;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.ks-chip {
  display: inline-block;
  margin-bottom: 12px;
  padding: 9px 14px;
  border: 1px solid rgba(244, 199, 119, 0.26);
  border-radius: 999px;
  background: rgba(244, 199, 119, 0.12);
  color: #f4c777;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ks-modal__dialog h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1;
}

.ks-modal__dialog p {
  margin: 0 0 22px;
  color: #dbcdb5;
  font-size: 18px;
  line-height: 1.6;
}

.ks-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 22px;
  border: 0;
  border-radius: 18px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.ks-btn--primary {
  background: linear-gradient(180deg, #f3ca83, #d38f3e);
  color: #241102;
  box-shadow: 0 20px 42px rgba(236, 176, 67, 0.24);
}

.ks-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff6e7;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

@media (max-width: 1180px) {
  .ks-home-categories__inner {
    grid-template-columns: 1fr;
  }

  .ks-category-grid--ages,
  .ks-category-grid--genres {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .ks-stage {
    min-height: auto;
    padding: 18px 0 22px;
  }

  .ks-stage__frame {
    width: 100%;
    aspect-ratio: auto;
    overflow: visible;
  }

  .ks-assembled {
    background: #07142e;
  }

  .ks-stage__frame--assembled {
    background-size: contain;
  }

  .ks-assembled__header,
  .ks-assembled__hero,
  .ks-assembled__ctas {
    position: static;
    width: auto;
  }

  .ks-assembled__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 18px 0;
  }

  .ks-assembled__logo {
    max-width: 180px;
  }

  .ks-assembled__title {
    max-width: 280px;
  }

  .ks-assembled__nav {
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .ks-nav-pill,
  .ks-nav-pill--button {
    --ks-nav-sparkles-shift: 26px;
    font-size: 18px;
  }

  .ks-assembled__hero {
    width: min(100%, 480px);
    margin: 20px auto 0;
    padding: 0 18px;
  }

  .ks-assembled__ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 18px 10px;
  }

  .ks-home-minibar__inner {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 18px 18px;
  }

  .ks-home-minibar__group,
  .ks-home-minibar__group--legal,
  .ks-home-minibar__group--copyright {
    justify-content: center;
    flex-wrap: wrap;
  }

  .ks-stage__frame--about {
    aspect-ratio: auto;
    background-size: cover;
  }

  .ks-stage__frame--about .ks-about {
    min-height: 0;
    padding-bottom: 24px;
  }

  .ks-about-paper {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(94%, 680px);
    min-height: 760px;
    margin: 24px auto 0;
  }

  .ks-about-paper__content {
    width: auto;
    padding: 86px 62px 380px;
  }

  .ks-about-donate {
    left: 50%;
    bottom: 204px;
    width: min(78%, 420px);
    transform: translateX(-50%);
  }

  .ks-about-donate:hover,
  .ks-about-donate:focus-visible {
    transform: translateX(-50%) translateZ(0) scale(1.018);
  }

  .ks-about-notes {
    display: block; /* Показываем кнопку записок на мобильных */
    left: 50%;
    bottom: 24px;
    width: min(78%, 420px);
    transform: translateX(-50%);
  }

  .ks-about-notes:hover,
  .ks-about-notes:focus-visible {
    transform: translateX(-50%) translateZ(0) scale(1.018);
  }

  .ks-about-telegram-note {
    display: none;
  }
}

@media (max-width: 640px) {
  .ks-category-grid--ages,
  .ks-category-grid--genres {
    grid-template-columns: 1fr 1fr;
  }

  .ks-home-categories {
    padding-inline: 12px;
  }

  .ks-home-categories__column {
    padding: 22px 18px 24px;
  }

  .ks-category-card span {
    font-size: 18px;
  }

  .ks-modal__dialog {
    margin-top: 8vh;
    padding: 24px;
  }

  .ks-about-paper {
    min-height: 700px;
  }

  .ks-about-paper__content {
    padding: 72px 42px 350px;
  }

  .ks-about-paper p {
    font-size: 16px;
  }
}

.ks-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.ks-inner-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(58, 109, 205, 0.18), transparent 22%),
    linear-gradient(180deg, #07142e 0%, #050d1f 100%);
}

.ks-page-hero {
  padding: 32px 0 28px;
}

.ks-page-hero__content {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgba(244, 199, 119, 0.16);
  border-radius: 28px;
  background: rgba(9, 21, 46, 0.78);
  box-shadow: 0 16px 42px rgba(5, 14, 33, 0.32);
}

.ks-page-hero__content h1 {
  margin: 16px 0 10px;
  color: #fff6e7;
  font-size: clamp(36px, 4vw, 64px);
  line-height: 0.98;
}

.ks-page-hero__content p {
  margin: 0;
  max-width: 840px;
  color: #dbcdb5;
  font-size: 18px;
  line-height: 1.65;
}

.ks-section {
  padding: 0 0 64px;
}

.ks-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(244, 199, 119, 0.22);
  border-radius: 999px;
  background: rgba(8, 18, 40, 0.82);
  box-shadow: 0 12px 36px rgba(5, 14, 33, 0.32);
}

.ks-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.ks-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3ca83, #d38f3e);
  color: #291303;
  font-size: 24px;
  font-weight: 900;
}

.ks-brand__text {
  display: grid;
  gap: 3px;
}

.ks-brand__text strong {
  color: #fff6e7;
  font-size: 18px;
}

.ks-brand__text small {
  color: #d7c8aa;
  font-size: 13px;
}

.ks-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 22px;
}

.ks-nav a {
  color: #f3d5a3;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.ks-socials,
.ks-footer__socials {
  display: flex;
  gap: 10px;
}

.ks-two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.ks-panel {
  padding: 28px;
  border: 1px solid rgba(244, 199, 119, 0.14);
  border-radius: 28px;
  background: rgba(8, 19, 43, 0.78);
  box-shadow: 0 16px 48px rgba(7, 18, 45, 0.24);
}

.ks-panel h2 {
  margin: 0 0 16px;
  color: #fff4df;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.05;
}

.ks-richtext,
.ks-richtext p,
.ks-single-excerpt,
.ks-single-author {
  color: #dbcdb5;
  font-size: 17px;
  line-height: 1.75;
}

.ks-richtext p:first-child {
  margin-top: 0;
}

.ks-richtext p:last-child {
  margin-bottom: 0;
}

.ks-tale-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ks-tale-card {
  overflow: hidden;
  border: 1px solid rgba(244, 199, 119, 0.14);
  border-radius: 28px;
  background: rgba(8, 19, 43, 0.82);
  box-shadow: 0 16px 48px rgba(7, 18, 45, 0.24);
}

.ks-tale-card__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.04);
}

.ks-tale-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ks-placeholder-card,
.ks-single-cover--placeholder {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 20px;
  color: #dbcdb5;
  background: rgba(255, 255, 255, 0.05);
}

.ks-tale-card__body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.ks-tale-card__chips,
.ks-tale-meta-row,
.ks-hero__actions,
.ks-banner__actions,
.ks-tale-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ks-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(244, 199, 119, 0.16);
  border: 1px solid rgba(244, 199, 119, 0.22);
  color: #f4c777;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ks-meta-pill--soft {
  background: rgba(109, 165, 255, 0.14);
  border-color: rgba(109, 165, 255, 0.22);
  color: #cce0ff;
}

.ks-meta-pill--notice {
  background: rgba(143, 208, 183, 0.14);
  border-color: rgba(143, 208, 183, 0.22);
  color: #baf0dc;
}

.ks-tale-card__title,
.ks-tale-card__title a {
  margin: 0;
  color: #fff5e4;
  font-size: clamp(24px, 1.8vw, 32px);
  line-height: 1.08;
  text-decoration: none;
}

.ks-tale-card__author {
  margin: 0;
  color: #d9c4a0;
  font-size: 15px;
}

.ks-single-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 28px;
}

.ks-single-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.ks-audio {
  width: 100%;
  margin-top: 14px;
}

.ks-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(244, 199, 119, 0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(13, 29, 63, 0.9), rgba(6, 16, 38, 0.9));
  box-shadow: 0 16px 48px rgba(7, 18, 45, 0.24);
}

.ks-social-card-grid {
  display: grid;
  gap: 14px;
}

.ks-social-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ks-social-card strong {
  display: block;
  margin-bottom: 6px;
  color: #fff5e4;
}

.ks-social-card small {
  color: #cdbf9d;
  line-height: 1.5;
}

.ks-cauldron {
  margin-bottom: 18px;
  font-size: 72px;
  line-height: 1;
}

.ks-empty-state {
  padding: 36px 28px;
  border-radius: 28px;
  text-align: center;
  background: rgba(8, 19, 43, 0.68);
  border: 1px dashed rgba(244, 199, 119, 0.22);
}

.ks-empty-state h2 {
  margin: 0 0 12px;
  color: #fff4df;
}

.ks-empty-state p {
  margin: 0;
  color: #d7c8aa;
  line-height: 1.65;
}

.ks-pagination {
  margin-top: 28px;
  text-align: center;
}

.ks-pagination .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ks-pagination a,
.ks-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff4df;
  text-decoration: none;
}

.ks-footer {
  padding: 0 0 40px;
}

.ks-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 26px 28px;
  border: 1px solid rgba(244, 199, 119, 0.16);
  border-radius: 28px;
  background: rgba(8, 19, 43, 0.82);
}

.ks-footer__brand strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.ks-footer__brand p {
  margin: 0;
  color: #d7c8aa;
  line-height: 1.6;
}

.ks-footer__nav {
  display: grid;
  gap: 8px;
}

.ks-footer__nav a,
.ks-footer__socials a {
  color: #f3d5a3;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .ks-topbar,
  .ks-banner,
  .ks-single-layout,
  .ks-two-col,
  .ks-footer__inner {
    grid-template-columns: 1fr;
  }

  .ks-topbar {
    border-radius: 28px;
  }

  .ks-tale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ks-shell {
    width: min(100% - 20px, 1280px);
  }

  .ks-page-hero,
  .ks-section,
  .ks-footer {
    padding-left: 0;
    padding-right: 0;
  }

  .ks-page-hero__content,
  .ks-panel,
  .ks-banner,
  .ks-footer__inner {
    padding: 22px;
  }

  .ks-tale-grid {
    grid-template-columns: 1fr;
  }

  .ks-nav {
    justify-content: flex-start;
  }
}

.ks-stage__frame--story {
  background-position: center center;
}

.ks-stage__frame--story::before {
  background:
    linear-gradient(
      180deg,
      #050c28 0%,
      rgba(5, 12, 40, 0.98) 6%,
      rgba(5, 12, 40, 0.78) 14%,
      rgba(5, 12, 40, 0.3) 31%,
      rgba(5, 12, 40, 0) 52%
    );
}

.ks-stage__frame--story::after {
  background:
    radial-gradient(ellipse at 50% 53%, rgba(34, 116, 150, 0.2) 0%, rgba(5, 12, 40, 0.06) 38%, rgba(5, 12, 40, 0.62) 100%),
    linear-gradient(90deg, rgba(5, 12, 40, 0.8) 0%, rgba(5, 12, 40, 0.2) 11%, rgba(5, 12, 40, 0) 28%),
    linear-gradient(270deg, rgba(5, 12, 40, 0.8) 0%, rgba(5, 12, 40, 0.2) 11%, rgba(5, 12, 40, 0) 28%);
  box-shadow:
    inset 0 120px 115px -48px rgba(5, 12, 40, 0.96),
    inset 0 -88px 70px -44px rgba(5, 12, 40, 0.5);
}

.ks-story {
  font-family: Georgia, "Times New Roman", serif;
}

.ks-story-cover {
  position: absolute;
  top: 14%;
  left: 19%;
  z-index: 4;
  width: 33.1%;
  aspect-ratio: 1786 / 1432;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.42));
}

.ks-story-cover__picture {
  position: absolute;
  top: 18%;
  left: 9.2%;
  z-index: 1;
  width: 81.4%;
  height: 70%;
  object-fit: cover;
  border-radius: 2.5%;
  filter: saturate(0.92) brightness(0.82);
}

.ks-story-cover__frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ks-story-cover__title {
  position: absolute;
  top: 11%;
  left: 15.6%;
  right: 15.6%;
  z-index: 3;
  margin: 0;
  color: #ffe1bc;
  font-size: clamp(23px, 2vw, 44px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #5e2514,
    0 4px 6px rgba(40, 12, 6, 0.74),
    0 0 14px rgba(255, 220, 152, 0.22);
}

.ks-story-teaser {
  position: absolute;
  top: 62%;
  left: 19%;
  z-index: 5;
  width: 33%;
  aspect-ratio: 2048 / 322;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
}

.ks-story-teaser__label {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.ks-story-teaser p {
  position: absolute;
  inset: 14% 9% 16%;
  display: grid;
  place-items: center;
  margin: 0;
  color: #4e210f;
  font-size: clamp(13px, 0.92vw, 20px);
  font-weight: 700;
  line-height: 1.06;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 238, 190, 0.72);
}

.ks-story-player {
  position: fixed;
  left: 0;
  bottom: var(--ks-story-player-footer-offset, 0px);
  z-index: 80;
  width: clamp(230px, 24.4vw, 500px);
  aspect-ratio: 1;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.ks-story-player[hidden] {
  display: none !important;
}

.ks-story-player__cat {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ks-story-player__mobile-panel {
  display: none;
}

.ks-story-player__play {
  position: absolute;
  top: 12%;
  left: 37%;
  display: grid;
  place-items: center;
  width: 12.2%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(83, 36, 23, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 40% 33%, rgba(255, 244, 203, 0.9), rgba(206, 143, 88, 0.92) 48%, rgba(105, 45, 31, 0.94) 100%);
  color: #4b170f;
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgba(255, 239, 198, 0.76),
    0 0 14px rgba(255, 214, 135, 0.34),
    0 5px 10px rgba(45, 15, 9, 0.38);
  pointer-events: auto;
}

.ks-story-player__play:hover,
.ks-story-player__play:focus-visible,
.ks-story-player--playing .ks-story-player__play {
  box-shadow:
    inset 0 2px 0 rgba(255, 239, 198, 0.82),
    0 0 20px rgba(255, 220, 134, 0.62),
    0 0 42px rgba(255, 175, 58, 0.28),
    0 5px 10px rgba(45, 15, 9, 0.38);
}

.ks-story-player__play:focus-visible {
  outline: 2px solid rgba(255, 224, 146, 0.78);
  outline-offset: 4px;
}

.ks-story-player__play-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 9%;
  border-top: 0.48em solid transparent;
  border-bottom: 0.48em solid transparent;
  border-left: 0.7em solid currentColor;
  filter: drop-shadow(0 1px 0 rgba(255, 236, 184, 0.35));
}

.ks-story-player--playing .ks-story-player__play-icon {
  width: 0.56em;
  height: 0.86em;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 34%, transparent 34% 62%, currentColor 62% 100%);
}

.ks-story-player__bar {
  position: absolute;
  top: 28%;
  left: 33%;
  width: 22.6%;
  height: 2.1%;
  border-radius: 999px;
  background: rgba(65, 32, 22, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(67, 31, 19, 0.36),
    0 1px 0 rgba(255, 237, 190, 0.55);
  pointer-events: auto;
}

.ks-story-player__bar span {
  display: block;
  width: 16%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe4a8, #c88551);
  box-shadow: 0 0 8px rgba(255, 210, 121, 0.44);
}

.ks-story-player--playing .ks-story-player__bar span {
  animation: ks-story-player-progress 22s linear infinite;
}

.ks-story-mobile-footer {
  display: none;
}

.ks-story-player__close {
  position: absolute;
  top: 5.2%;
  right: 32.8%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 6.7%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(83, 36, 23, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 32%, rgba(255, 245, 207, 0.9), rgba(203, 137, 82, 0.94) 56%, rgba(89, 34, 23, 0.96) 100%);
  color: #4b170f;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(11px, 0.82vw, 17px);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 198, 0.74),
    0 0 12px rgba(255, 214, 135, 0.3),
    0 4px 9px rgba(45, 15, 9, 0.35);
  pointer-events: auto;
}

.ks-story-player__close:hover,
.ks-story-player__close:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 198, 0.8),
    0 0 18px rgba(255, 220, 134, 0.56),
    0 4px 9px rgba(45, 15, 9, 0.35);
}

.ks-story-player__close:focus-visible {
  outline: 2px solid rgba(255, 224, 146, 0.78);
  outline-offset: 3px;
}

.story-page .ks-story-player__close {
  display: none;
}

@keyframes ks-story-player-progress {
  0% {
    width: 16%;
  }

  100% {
    width: 92%;
  }
}

.ks-story-recommendations {
  position: absolute;
  left: 20.2%;
  bottom: 4.9%;
  z-index: 5;
  width: 31.8%;
  height: 21.6%;
  color: #e7c7a0;
}

.ks-story-recommendations h2 {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 2.8%;
  padding: 1.1% 4.8% 1.5%;
  color: #ffe1b8;
  font-size: clamp(21px, 1.75vw, 36px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(65, 25, 11, 0.94),
    0 4px 7px rgba(22, 8, 4, 0.72),
    0 0 14px rgba(255, 221, 154, 0.32);
}

.ks-story-recommendations h2::before {
  content: '';
  position: absolute;
  inset: -4% 1.4% -8%;
  z-index: -1;
  border: 1px solid rgba(255, 213, 137, 0.52);
  border-radius: 999px 999px 42% 42% / 42% 42% 58% 58%;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 222, 156, 0.3) 0 24%, transparent 58%),
    linear-gradient(180deg, rgba(139, 76, 34, 0.88), rgba(95, 42, 18, 0.9) 52%, rgba(58, 24, 12, 0.88));
  box-shadow:
    inset 0 2px 0 rgba(255, 225, 169, 0.46),
    inset 0 -8px 18px rgba(53, 20, 8, 0.34),
    0 0 18px rgba(255, 202, 112, 0.22),
    0 8px 18px rgba(11, 7, 5, 0.34);
  opacity: 0.94;
}

.ks-story-recommendations__viewport {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 23.5%;
  gap: 2.4%;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 0.2% 0.4% 1%;
}

.ks-story-rec-card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.77;
  border: 1px solid rgba(251, 205, 127, 0.64);
  border-radius: 7px;
  color: #ffe0b0;
  text-decoration: none;
  background: rgba(28, 15, 10, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(94, 52, 25, 0.4),
    0 8px 12px rgba(0, 0, 0, 0.22);
}

.ks-story-rec-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.83) saturate(0.9);
}

.ks-story-rec-card span {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 5%;
  color: #ffd39a;
  font-family: Arial, sans-serif;
  font-size: clamp(8px, 0.58vw, 12px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 1px 0 #5b210f,
    1px 0 0 #5b210f,
    -1px 0 0 #5b210f,
    0 -1px 0 #5b210f,
    0 2px 4px rgba(0, 0, 0, 0.55);
}

.ks-story-recommendations__arrow {
  position: absolute;
  top: 52%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 5.2%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d09b73;
  cursor: pointer;
  font-size: clamp(28px, 2.2vw, 46px);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 2px 0 #4b1d10,
    0 0 12px rgba(255, 220, 151, 0.42);
}

.ks-story-recommendations__arrow--prev {
  left: -7.4%;
}

.ks-story-recommendations__arrow--next {
  right: -7.4%;
}

.ks-story-reader {
  position: absolute;
  top: 12.9%;
  right: 0.2%;
  bottom: 0;
  z-index: 4;
  width: 42.8%;
  color: #552014;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.38));
}

.ks-story-reader__paper {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.ks-story-reader__content {
  position: absolute;
  inset: 6.2% 8.4% 4.6% 8.2%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ks-story-reader__content h2 {
  margin: 0 0 1.6%;
  color: #552014;
  font-size: clamp(38px, 2.35vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 236, 196, 0.68);
}

.ks-story-reader__meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 3% 2.8%;
  color: #592319;
  font-size: clamp(18px, 1.34vw, 30px);
  line-height: 1;
  white-space: nowrap;
}

.ks-story-reader__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6.4% 0 1.8%;
  scrollbar-width: thin;
  scrollbar-color: rgba(162, 93, 49, 0.58) transparent;
}

.ks-story-reader__scroll::-webkit-scrollbar {
  width: 12px;
}

.ks-story-reader__scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(156, 82, 45, 0.14);
  box-shadow: inset 0 0 0 1px rgba(127, 62, 34, 0.16);
}

.ks-story-reader__scroll::-webkit-scrollbar-thumb {
  border: 2px solid rgba(247, 202, 137, 0.78);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(195, 125, 69, 0.82), rgba(143, 74, 40, 0.86));
}

.ks-story-reader__scroll p {
  margin: 0 0 4.4%;
  color: #522016;
  font-size: clamp(18px, 1.24vw, 29px);
  font-weight: 500;
  line-height: 1.12;
}

.ks-story-reader__pages {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 3.2%;
  padding-top: 2.4%;
  color: #5a2418;
  font-size: clamp(19px, 1.44vw, 32px);
  line-height: 1;
}

.ks-story-reader__pages strong {
  min-width: 5.8em;
  text-align: center;
}

.ks-story-reader__pages strong span {
  color: inherit;
  font-size: inherit;
}

.ks-story-reader__page-button {
  display: grid;
  place-items: center;
  width: 1.86em;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(122, 72, 39, 0.72);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.86em;
  line-height: 1;
  cursor: pointer;
  text-shadow:
    0 1px 0 rgba(255, 232, 185, 0.62),
    0 0 10px rgba(143, 76, 36, 0.1);
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    text-shadow 160ms ease;
}

.ks-story-reader__page-button:hover,
.ks-story-reader__page-button:focus-visible {
  color: #7f4926;
  transform: translateY(-1px) scale(1.08);
  text-shadow:
    0 1px 0 rgba(255, 238, 198, 0.78),
    0 0 12px rgba(255, 198, 103, 0.38);
}

.ks-story-reader__page-button:focus-visible {
  outline: 2px solid rgba(129, 73, 37, 0.42);
  outline-offset: 2px;
}

.ks-story-reader__page-button:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
  text-shadow: 0 1px 0 rgba(255, 232, 185, 0.38);
}

@media (max-width: 980px) {
  .story-page .ks-stage__frame {
    aspect-ratio: auto;
    min-height: 1180px;
  }

  .ks-story-cover,
  .ks-story-teaser,
  .ks-story-recommendations,
  .ks-story-reader {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(92%, 620px);
    margin: 28px auto 0;
  }

  .ks-story-recommendations {
    height: auto;
    margin-bottom: 32px;
  }

  .ks-story-reader {
    height: 620px;
  }
}

@media (max-width: 760px) {
  body.home {
    background: #050c28;
  }

  .ks-home-mockup {
    overflow-x: hidden;
  }

  .ks-stage {
    padding: 0;
  }

  .ks-stage__frame {
    width: 100%;
    min-height: auto;
  }

  .ks-stage__frame--assembled,
  .ks-stage__frame--about {
    background-position: center top;
    background-size: cover;
  }

  .ks-assembled {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding-bottom: 0;
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(5, 12, 40, 0.1), rgba(5, 12, 40, 0.68) 78%, #050c28 100%);
  }

  .ks-assembled__header {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    width: 100%;
    box-sizing: border-box;
    min-height: 78px;
    display: grid;
    grid-template-columns: clamp(48px, 14vw, 58px) minmax(0, 1fr) clamp(48px, 14vw, 58px);
    align-items: center;
    gap: 0;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 221, 150, 0.24);
    background:
      radial-gradient(ellipse at 42% 0%, rgba(255, 212, 124, 0.12), transparent 54%),
      linear-gradient(180deg, rgba(7, 17, 47, 0.94), rgba(4, 10, 34, 0.9));
    box-shadow:
      inset 0 -1px 0 rgba(255, 238, 186, 0.08),
      0 12px 24px rgba(3, 8, 28, 0.24);
  }

  .ks-assembled__header::before {
    content: "";
    grid-column: 1;
    grid-row: 1;
  }

  .ks-assembled__header > .ks-assembled__logo,
  .ks-assembled__header > .ks-assembled__nav,
  .ks-assembled__header > .ks-assembled__socials {
    display: none;
  }

  .ks-assembled__title {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none;
    min-height: 54px;
    margin-inline: auto;
    text-decoration: none;
    transform: translateX(clamp(-34px, -7vw, -22px));
  }

  .ks-assembled__title img {
    display: none;
  }

  .ks-assembled__title::before {
    content: "Котофей и Сказки";
    display: block;
    color: #ffd89b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 6.4vw, 31px);
    font-weight: 900;
    line-height: 0.95;
    text-align: center;
    text-shadow:
      0 2px 0 #5c2311,
      0 4px 6px rgba(31, 8, 4, 0.76),
      0 0 16px rgba(255, 190, 82, 0.38);
    white-space: nowrap;
  }

  .ks-mobile-menu {
    position: relative;
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    z-index: 90;
    display: block;
  }

  .ks-mobile-menu__toggle {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: clamp(48px, 14vw, 58px);
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid rgba(255, 220, 150, 0.58);
    border-radius: 999px;
    background:
      radial-gradient(circle at 42% 30%, rgba(255, 229, 158, 0.94), rgba(182, 94, 38, 0.96) 48%, rgba(92, 35, 16, 0.98) 100%);
    box-shadow:
      inset 0 2px 0 rgba(255, 239, 189, 0.62),
      0 0 18px rgba(255, 196, 79, 0.34),
      0 8px 16px rgba(18, 6, 2, 0.38);
    cursor: pointer;
  }

  .ks-mobile-menu__toggle span {
    position: absolute;
    left: 27%;
    right: 27%;
    height: 3px;
    border-radius: 999px;
    background: #53200f;
    box-shadow:
      0 1px 0 rgba(255, 231, 174, 0.42),
      0 0 6px rgba(255, 229, 147, 0.34);
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }

  .ks-mobile-menu__toggle span:nth-child(1) {
    transform: translateY(-8px);
  }

  .ks-mobile-menu__toggle span:nth-child(3) {
    transform: translateY(8px);
  }

  .ks-mobile-menu--open .ks-mobile-menu__toggle span:nth-child(1) {
    transform: rotate(45deg);
  }

  .ks-mobile-menu--open .ks-mobile-menu__toggle span:nth-child(2) {
    opacity: 0;
  }

  .ks-mobile-menu--open .ks-mobile-menu__toggle span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .ks-mobile-menu__panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(86vw, 332px);
    box-sizing: border-box;
    padding: 16px 16px 18px;
    border: 1px solid rgba(255, 222, 151, 0.45);
    border-radius: 18px;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(255, 224, 155, 0.18), transparent 48%),
      linear-gradient(180deg, rgba(12, 27, 61, 0.97), rgba(5, 12, 40, 0.98) 52%, rgba(70, 32, 16, 0.95));
    box-shadow:
      inset 0 1px 0 rgba(255, 238, 181, 0.22),
      0 0 32px rgba(45, 192, 255, 0.16),
      0 18px 38px rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -8px, 0) scale(0.97);
    transform-origin: top right;
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }

  .ks-mobile-menu--open .ks-mobile-menu__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
  }

  .ks-mobile-menu__panel .ks-assembled__logo {
    display: block;
    width: min(46vw, 138px);
    max-width: none;
    margin: 0 auto 12px;
  }

  .ks-mobile-menu__panel .ks-assembled__nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 9px;
    margin: 0;
    transform: none;
  }

  .ks-mobile-menu__panel .ks-nav-pill,
  .ks-mobile-menu__panel .ks-nav-pill--button {
    --ks-nav-sparkles-shift: 18px;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 10px;
    padding: 6px 14px 7px;
    border: 1px solid rgba(255, 218, 145, 0.36);
    border-radius: 999px;
    background:
      radial-gradient(ellipse at 18% 0%, rgba(255, 225, 151, 0.28), transparent 58%),
      linear-gradient(180deg, rgba(178, 96, 40, 0.88), rgba(92, 39, 18, 0.92));
    box-shadow:
      inset 0 1px 0 rgba(255, 232, 178, 0.34),
      inset 0 -8px 14px rgba(50, 16, 6, 0.22),
      0 6px 12px rgba(8, 4, 2, 0.24);
    font-size: clamp(16px, 4.4vw, 20px);
  }

  .ks-mobile-menu__panel .ks-nav-pill img {
    width: clamp(34px, 10vw, 46px);
    flex: 0 0 auto;
  }

  .ks-mobile-menu__panel .ks-nav-label {
    flex: 1 1 auto;
    text-align: left;
  }

  .ks-mobile-menu__panel .ks-nav-sparkles {
    display: none;
  }

  .ks-mobile-menu__panel .ks-assembled__socials {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 4vw, 16px);
    margin: 13px 0 0;
    padding: 0;
    transform: none;
  }

  .ks-mobile-menu__panel .ks-social {
    width: clamp(46px, 13vw, 58px);
  }

  .ks-assembled__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    width: min(100%, 360px);
    gap: 10px 12px;
  }

  .ks-nav-pill,
  .ks-nav-pill--button {
    --ks-nav-sparkles-shift: 18px;
    min-width: 0;
    gap: 5px;
    font-size: clamp(16px, 4.8vw, 20px);
    line-height: 1;
  }

  .ks-nav-pill img {
    width: clamp(38px, 11vw, 54px);
  }

  .ks-assembled__socials {
    justify-content: center;
    gap: 10px;
  }

  .ks-social {
    width: clamp(48px, 14vw, 62px);
  }

  .ks-assembled__hero {
    order: 3;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 500px;
    height: clamp(500px, 116vw, 560px);
    margin: 0 auto;
    padding: 0;
    overflow: visible;
  }

  .ks-assembled__cat {
    width: min(92%, 430px);
    height: auto;
    max-height: calc(100% - 34px);
    object-fit: contain;
    object-position: center;
  }

  .ks-assembled__ctas {
    order: 2;
    gap: clamp(4px, 1.5vw, 10px);
    padding: 18px 18px 0;
  }

  .ks-image-button {
    width: min(80vw, 360px);
    max-width: none;
    margin-inline: auto;
  }

  .ks-image-button--listen {
    display: block;
  }

  .ks-home-minibar__inner {
    min-height: 0;
    gap: 12px;
    padding: 16px 14px 18px;
  }

  .ks-home-minibar__group {
    gap: 14px 18px;
  }

  .ks-mini-link {
    font-size: 14px;
  }

  .ks-home-minibar__inner {
    display: flex;
    justify-content: center;
    min-height: 112px;
    padding: 18px 14px 22px;
    border-top: 1px solid rgba(247, 200, 130, 0.16);
  }

  .ks-home-minibar__group--legal,
  .ks-home-minibar__group--copyright {
    display: none;
  }

  .ks-home-minibar__group--social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(14px, 5vw, 24px);
  }

  .ks-home-minibar__group--social .ks-mini-link {
    display: grid;
    place-items: center;
    width: clamp(52px, 15vw, 66px);
    aspect-ratio: 1;
    padding: 0;
    font-size: 0;
  }

  .ks-home-minibar__group--social .ks-mini-link:nth-child(1) {
    order: 2;
  }

  .ks-home-minibar__group--social .ks-mini-link:nth-child(2) {
    order: 1;
  }

  .ks-home-minibar__group--social .ks-mini-link:nth-child(3) {
    order: 3;
  }

  .ks-home-minibar__group--social .ks-mini-link__icon {
    width: 100%;
    height: 100%;
    opacity: 1;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.14));
  }

  .ks-home-minibar__group--social .ks-mini-link:nth-child(1) .ks-mini-link__icon {
    background-image: url("../images/home/resize/vk-small.webp");
  }

  .ks-home-minibar__group--social .ks-mini-link:nth-child(2) .ks-mini-link__icon {
    background-image: url("../images/home/resize/tg-small.webp");
  }

  .ks-home-minibar__group--social .ks-mini-link:nth-child(3) .ks-mini-link__icon {
    background-image: url("../images/home/resize/utube-small.webp");
  }

  .ks-home-minibar__group--social .ks-mini-link__icon svg,
  .ks-home-minibar__group--social .ks-mini-link > span:not(.ks-mini-link__icon) {
    display: none;
  }

  .ks-app-modal__dialog {
    width: min(90vw, 370px);
    aspect-ratio: 1455 / 2528;
    margin: clamp(22px, 4vh, 42px) auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: url("../images/home/мобильное меню.webp") center / 100% 100% no-repeat;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.52));
  }

  .ks-app-modal__panel {
    display: none;
  }

  .ks-app-modal__close {
    display: none;
  }

  .ks-app-modal__content h2 {
    top: 34.1%;
    left: 15.5%;
    right: 15.5%;
    color: transparent;
    font-size: 0;
    line-height: 1.02;
    text-shadow: none;
  }

  .ks-app-modal__content h2::before {
    content: "Котофей с собой";
    display: block;
    color: #5b1d0b;
    font-size: clamp(25px, 6.7vw, 31px);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 0 rgba(255, 228, 169, 0.5);
  }

  .ks-app-modal__content p {
    top: 41.4%;
    left: 16%;
    right: 16%;
    color: transparent;
    font-size: 0;
    line-height: 1;
    text-shadow: none;
  }

  .ks-app-modal__content p::before {
    content: "Сказки в дороге";
    display: block;
    color: #5b1d0b;
    font-size: clamp(16px, 4.35vw, 20px);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 228, 169, 0.42);
  }

  .ks-app-modal__stores {
    top: 49%;
    bottom: auto;
    left: 50%;
    width: 37%;
    grid-template-columns: 1fr;
    gap: clamp(8px, 2.6vw, 12px);
  }

  .ks-store-badge {
    min-height: clamp(40px, 10.8vw, 48px);
    padding: 5px 9px 6px;
    border-radius: 8px;
  }

  .ks-store-badge__mark {
    width: clamp(25px, 7vw, 31px);
    height: clamp(25px, 7vw, 31px);
  }

  .ks-store-badge span:last-child {
    font-size: clamp(12px, 3.2vw, 15px);
  }

  .ks-store-badge small {
    font-size: clamp(7px, 2vw, 9px);
  }

  .ks-donate-modal__dialog {
    width: min(92vw, 420px);
    margin-top: clamp(70px, 10vh, 96px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .ks-donate-modal__content h2 {
    display: none;
  }

  .ks-donate-modal__copy {
    display: block;
    top: calc(58.5% + 15px);
    left: 12%;
    right: 12%;
  }

  .ks-donate-modal__copy p,
  .ks-donate-modal__copy span {
    display: none;
  }

  .ks-donate-modal__copy::before {
    content: "Бросить монетку в котелок";
    display: block;
    color: #5b1d0b;
    font-size: clamp(23px, 6.7vw, 30px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 0 rgba(255, 228, 169, 0.5);
  }

  .ks-donate-modal__actions {
    top: calc(77% + 15px);
    bottom: auto;
    width: 58%;
    gap: 7%;
  }

  .tales-page .ks-stage__frame,
  .story-page .ks-stage__frame,
  .about-page .ks-stage__frame,
  .article-page .ks-stage__frame {
    min-height: auto;
  }

  .tales-page .ks-tales-sign {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(92vw, 380px);
    aspect-ratio: auto;
    margin: 16px auto 0;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 218, 145, 0.42);
    border-radius: 16px;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(255, 222, 154, 0.22), transparent 58%),
      linear-gradient(180deg, rgba(116, 60, 27, 0.9), rgba(61, 27, 14, 0.92));
    box-shadow:
      inset 0 2px 0 rgba(255, 226, 174, 0.34),
      inset 0 -12px 22px rgba(35, 12, 5, 0.28),
      0 14px 24px rgba(0, 0, 0, 0.28);
    filter: none;
  }

  .tales-page .ks-tales-sign__image {
    display: none;
  }

  .tales-page .ks-tales-sign__button,
  .tales-page .ks-tales-sign__button--age-2,
  .tales-page .ks-tales-sign__button--age-4,
  .tales-page .ks-tales-sign__button--age-6,
  .tales-page .ks-tales-sign__button--age-8 {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    min-height: 48px;
    padding: 9px 8px 10px;
    border: 1px solid rgba(255, 215, 137, 0.38);
    background:
      linear-gradient(180deg, rgba(186, 106, 45, 0.92), rgba(112, 50, 21, 0.94));
    box-shadow:
      inset 0 1px 0 rgba(255, 225, 170, 0.42),
      0 5px 9px rgba(27, 9, 4, 0.26);
    font-size: clamp(17px, 5vw, 21px);
    -webkit-text-stroke: 0;
  }

  .tales-page .ks-tales-sign__button::before {
    bottom: -4px;
    height: 3px;
  }

  .tales-page .ks-tales-sign__button::after {
    inset: -24% -12%;
  }

  .tales-page .ks-tales-genres {
    position: relative;
    top: auto;
    left: auto;
    width: min(92vw, 520px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px auto 0;
  }

  .tales-page .ks-genre-card {
    border-width: 1px;
    border-radius: 7px;
  }

  .tales-page .ks-genre-card__title {
    font-size: clamp(15px, 5.6vw, 24px);
  }

  .tales-page .ks-tales-search {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(94vw, 460px);
    margin: 18px auto 0;
  }

  .tales-page .ks-tales-search__title {
    font-size: clamp(16px, 4.9vw, 22px);
  }

  .tales-page .ks-tales-search__field input {
    font-size: clamp(13px, 3.7vw, 17px);
  }

  body.ks-stories-mode .ks-tales-genres,
  body.ks-stories-mode .ks-tales-search {
    display: none;
  }

  .tales-page .ks-stories-view {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(94vw, 540px);
    margin: 16px auto 0;
    padding-bottom: 8px;
  }

  .tales-page .ks-stories-heading {
    position: relative;
    top: auto;
    left: auto;
    width: min(82vw, 360px);
    margin: 0 auto 12px;
  }

  .tales-page .ks-stories-heading__title {
    font-size: clamp(16px, 5.2vw, 24px);
  }

  .tales-page .ks-stories-back {
    top: 0;
    left: auto;
    right: 0;
    width: clamp(42px, 13vw, 58px);
  }

  .tales-page .ks-stories-grid {
    --ks-story-card-gap: 12px;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ks-story-card-gap);
    padding: 0;
    overflow: visible;
  }

  .tales-page .ks-story-card {
    width: auto;
    flex: none;
    border-width: 1px;
    border-radius: 8px;
  }

  .tales-page .ks-story-card__title {
    font-size: clamp(17px, 5.2vw, 24px);
  }

  .tales-page .ks-stories-scroll {
    display: none;
  }

  .story-page .ks-assembled {
    height: auto;
    padding-bottom: 0;
    overflow: visible;
  }

  .story-page .ks-stage__frame {
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .story-page .ks-story-cover,
  .story-page .ks-story-teaser,
  .story-page .ks-story-recommendations,
  .story-page .ks-story-reader {
    width: min(94vw, 560px);
    margin-top: 22px;
  }

  .story-page .ks-story-cover {
    margin-top: 26px;
  }

  .story-page .ks-story-cover__title {
    font-size: clamp(25px, 8vw, 42px);
  }

  .story-page .ks-story-teaser p {
    inset: 18% 9% 18%;
    font-size: clamp(12px, 3.45vw, 15px);
    line-height: 1.06;
  }

  .story-page .ks-story-teaser {
    width: min(92vw, 520px);
    min-height: clamp(118px, 32vw, 150px);
    margin-top: 18px;
    aspect-ratio: auto;
  }

  .story-page .ks-story-recommendations {
    margin-top: 28px;
    margin-bottom: 24px;
  }

  .story-page .ks-story-recommendations h2 {
    font-size: clamp(22px, 6.2vw, 29px);
  }

  .story-page .ks-story-recommendations__viewport {
    grid-auto-columns: 30.5%;
    gap: 3.2%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .story-page .ks-story-recommendations__viewport::-webkit-scrollbar {
    display: none;
  }

  .story-page .ks-story-recommendations__arrow {
    top: 58%;
    width: clamp(28px, 8vw, 36px);
    height: clamp(28px, 8vw, 36px);
    font-size: clamp(28px, 8vw, 36px);
  }

  .story-page .ks-story-recommendations__arrow--prev {
    left: -2.4%;
  }

  .story-page .ks-story-recommendations__arrow--next {
    right: -2.4%;
  }

  .story-page .ks-story-reader {
    display: block;
    height: clamp(660px, 156vw, 840px);
    min-height: 660px;
    margin-top: 28px;
    margin-bottom: 0;
  }

  .story-page .ks-stage {
    align-items: start;
    background: #050c28;
  }

  .story-page .ks-stage__frame--story {
    display: block;
    background-position: center top;
    background-size: cover;
  }

  .story-page .ks-home-minibar {
    display: block;
    width: 100%;
    margin: 0 auto;
    background: #050c28;
  }

  .story-page .ks-home-minibar__inner {
    width: 100%;
    min-height: 112px;
    padding-top: 18px;
    padding-bottom: 24px;
  }

  body.story-page .ks-home-mockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    background: #050c28;
  }

  body.story-page .ks-stage {
    flex: 0 0 auto;
    width: 100%;
  }

  body.story-page .ks-home-minibar {
    display: block !important;
    flex: 0 0 auto;
    position: relative;
    z-index: 40;
    width: min(100%, 560px);
    margin: -1px auto 0;
    clear: both;
    background: #050c28;
  }

  body.story-page .ks-home-minibar__inner {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 104px;
    padding: 20px 14px 24px;
    border-top: 1px solid rgba(247, 200, 130, 0.16);
    background: #050c28;
  }

  body.story-page .ks-home-minibar__group--social {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 4.5vw, 20px);
  }

  body.story-page .ks-home-minibar__group--legal,
  body.story-page .ks-home-minibar__group--copyright {
    display: none !important;
  }

  body.story-page .ks-home-mockup > .ks-home-minibar {
    display: none !important;
  }

  body.story-page .ks-story-mobile-footer {
    order: 99;
    display: block !important;
    width: min(100%, 560px);
    margin: 0 auto;
    background: #050c28;
  }

  body.story-page .ks-story-mobile-footer .ks-home-minibar__inner {
    min-height: 104px;
    padding: 20px 14px 24px;
    border-top: 1px solid rgba(247, 200, 130, 0.16);
    background: #050c28;
  }

  body.story-page .ks-story-reader {
    order: 90;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
  }

  .story-page .ks-story-reader__content {
    inset: 5.8% 7.2% 4.4%;
  }

  .story-page .ks-story-reader__content h2 {
    margin-bottom: 1.8%;
    font-size: clamp(32px, 10vw, 48px);
    line-height: 0.96;
  }

  .story-page .ks-story-reader__meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    margin: 0 2% 3%;
    font-size: clamp(14px, 4.1vw, 18px);
    white-space: normal;
    text-align: center;
  }

  .story-page .ks-story-reader__scroll {
    padding: 0 7% 0 1.5%;
  }

  .story-page .ks-story-reader__scroll p {
    margin-bottom: 5.2%;
    font-size: clamp(17px, 4.7vw, 20px);
    line-height: 1.15;
  }

  .story-page .ks-story-reader__pages {
    gap: 2.2%;
    padding-top: 2%;
    font-size: clamp(18px, 5.2vw, 23px);
  }

  .ks-story-player {
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 12;
    width: min(92vw, 520px);
    aspect-ratio: 1572 / 316;
    margin: 12px auto 18px;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.38));
    pointer-events: auto;
  }

  .ks-story-player--docked {
    position: fixed;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(94vw, 460px);
    margin: 0;
    transform: translateX(-50%);
    z-index: 120;
  }

  .ks-story-player__cat,
  .ks-story-player__play--cat,
  .ks-story-player__bar--cat,
  .ks-story-player__close--cat,
  .ks-story-player__native-time,
  .ks-story-player__native-seek {
    display: none;
  }

  .ks-story-player__mobile-panel {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
  }

  .ks-story-player__mobile-bg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
  }

  .ks-story-player__mobile-controls {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
  }

  .ks-story-player__mobile-play,
  .ks-story-player__mobile-close {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid rgba(83, 36, 23, 0.7);
    border-radius: 999px;
    background:
      radial-gradient(circle at 40% 32%, rgba(255, 245, 207, 0.96), rgba(207, 139, 80, 0.96) 55%, rgba(89, 34, 23, 0.96) 100%);
    color: #4b170f;
    cursor: pointer;
    box-shadow:
      inset 0 1px 0 rgba(255, 240, 199, 0.72),
      0 0 13px rgba(255, 214, 135, 0.34),
      0 4px 8px rgba(45, 15, 9, 0.34);
  }

  .ks-story-player__mobile-play {
    position: absolute;
    top: 9%;
    left: 50%;
    z-index: 3;
    width: clamp(46px, 12.6vw, 58px);
    font-size: clamp(16px, 4.6vw, 22px);
    transform: translateX(-50%);
  }

  .ks-story-player__mobile-close {
    position: absolute;
    top: 28%;
    right: 8.5%;
    width: clamp(29px, 8vw, 36px);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(17px, 5vw, 22px);
    font-weight: 900;
    line-height: 1;
  }

  .ks-story-player__mobile-time {
    position: absolute;
    top: 39%;
    min-width: 42px;
    color: #ffe2b0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow:
      0 1px 0 #5b210f,
      1px 0 0 #5b210f,
      -1px 0 0 #5b210f,
      0 2px 5px rgba(34, 10, 4, 0.72);
  }

  .ks-story-player__mobile-time:first-of-type {
    left: 25.5%;
    text-align: left;
  }

  .ks-story-player__mobile-time:last-of-type {
    right: 18%;
    text-align: right;
  }

  .ks-story-player__mobile-spacer {
    display: none;
  }

  .ks-story-player__mobile-seek {
    position: absolute;
    left: 13%;
    right: 12%;
    bottom: 10%;
    z-index: 2;
    width: 75%;
    height: 12px;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background:
      linear-gradient(90deg, #ffe6a8 0 var(--ks-story-player-progress, 0%), rgba(68, 31, 17, 0.36) var(--ks-story-player-progress, 0%) 100%);
    box-shadow:
      inset 0 0 0 1px rgba(70, 31, 17, 0.46),
      0 1px 0 rgba(255, 238, 195, 0.45);
    cursor: pointer;
  }

  .ks-story-player__mobile-seek::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    appearance: none;
    border: 1px solid rgba(92, 39, 20, 0.68);
    border-radius: 999px;
    background:
      radial-gradient(circle at 38% 32%, #fff2be, #d9954f 58%, #7d351c 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 245, 214, 0.62),
      0 0 12px rgba(255, 217, 124, 0.5),
      0 3px 6px rgba(39, 12, 6, 0.36);
  }

  .ks-story-player__mobile-seek::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(92, 39, 20, 0.68);
    border-radius: 999px;
    background:
      radial-gradient(circle at 38% 32%, #fff2be, #d9954f 58%, #7d351c 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 245, 214, 0.62),
      0 0 12px rgba(255, 217, 124, 0.5),
      0 3px 6px rgba(39, 12, 6, 0.36);
  }

  .ks-about .ks-assembled__header {
    padding-bottom: 10px;
  }

  .ks-stage__frame--about .ks-about {
    padding-bottom: 0;
  }

  .ks-about-paper {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(92vw, 520px);
    min-height: 0;
    margin-top: 16px;
    padding: 68px 0 42px;
    background: url("../images/home/skazky.webp") center / 100% 100% no-repeat;
  }

  .ks-about-paper__content {
    width: auto;
    padding: 0 34px;
  }

  .ks-about-paper h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .ks-about-paper p {
    font-size: clamp(15px, 4.2vw, 18px);
    line-height: 1.17;
  }

  .ks-about-donate {
    position: relative;
    left: auto;
    bottom: auto;
    align-self: center;
    width: min(74%, 340px);
    margin-top: clamp(34px, 9vw, 48px);
    transform: none;
  }

  .ks-about-donate:hover,
  .ks-about-donate:focus-visible {
    transform: translateZ(0) scale(1.018);
  }

  .ks-about-notes {
    position: relative;
    left: auto;
    bottom: auto;
    align-self: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: min(74%, 340px);
    margin-top: clamp(20px, 5vw, 28px);
    transform: none;
  }

  .ks-about-notes img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .ks-about-notes:hover,
  .ks-about-notes:focus-visible {
    transform: translateZ(0) scale(1.018);
  }
}

/* ═══════════════════════════════════════════
   Записки Котофея — Overlay
   ═══════════════════════════════════════════ */

.ks-notes-overlay {
  position: absolute;
  top: 11%;
  left: 0;
  bottom: 0;
  right: 38%;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 1;
  animation: ks-notes-fade-in 0.35s ease-out both;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, black, black calc(100% - 24px), transparent),
                      linear-gradient(to bottom, transparent, black 24px, black);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, black, black calc(100% - 24px), transparent),
              linear-gradient(to bottom, transparent, black 24px, black);
  mask-composite: intersect;
}

.ks-notes-overlay[hidden] {
  display: none;
}

.ks-notes-list[hidden],
.ks-notes-reader[hidden] {
  display: none !important;
}

.ks-notes-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 40, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.ks-notes-overlay__close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: none; /* Скрываем на десктопе по запросу */
  place-items: center;
  border: 2px solid rgba(247, 200, 130, 0.35);
  border-radius: 50%;
  background: rgba(5, 12, 40, 0.65);
  color: #f6d19b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.ks-notes-overlay__close:hover,
.ks-notes-overlay__close:focus-visible {
  background: rgba(247, 200, 130, 0.18);
  border-color: rgba(247, 200, 130, 0.6);
  transform: scale(1.08);
}

/* ─── Список статей ─── */

.ks-notes-overlay__close {
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.34));
  transition: filter 0.2s, transform 0.2s;
}

.ks-notes-overlay__close img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.ks-notes-overlay__close:hover,
.ks-notes-overlay__close:focus-visible {
  background: transparent;
  filter:
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 12px rgba(255, 217, 128, 0.45));
  outline: 0;
}

.ks-notes-list {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 1;
  animation: ks-notes-slide-up 0.4s ease-out both;
  padding: 80px 24px 24px;
  box-sizing: border-box;
}

.ks-notes-list__title {
  margin: 0 0 12px;
  padding-top: 8px;
  color: #f6d19b;
  font-size: clamp(20px, 2.2vw, 34px);
  font-weight: 900;
  text-align: center;
  text-shadow:
    0 0 24px rgba(255, 210, 100, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.ks-notes-list__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-content: start;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ks-notes-list__scroll::-webkit-scrollbar {
  display: none;
}

.ks-notes-empty {
  position: relative;
  z-index: 1;
  align-self: start;
  grid-column: 1 / -1;
  max-width: 620px;
  margin: clamp(16px, 3vw, 36px) auto;
  padding: clamp(14px, 2.4vw, 24px);
  border-radius: 8px;
  background: rgba(255, 240, 203, 0.84);
  color: #5b1d0b;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 20px rgba(24, 8, 2, 0.18);
}

/* ─── Кастомный скроллбар с желудем ─── */

.ks-notes-scroll {
  --ks-scroll-thumb-size: clamp(18px, 1.85vw, 38px);
  --ks-scroll-thumb-y: 4.5%;
  position: absolute;
  top: 80px;
  right: 32px;
  bottom: 24px;
  z-index: 6;
  display: block;
  width: clamp(30px, 2.8vw, 58px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ns-resize;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
  touch-action: none;
  transition: none !important;
  user-select: none;
}

.ks-notes-scroll::before {
  content: "";
  position: absolute;
  top: 2.5%;
  left: 50%;
  bottom: 4.5%;
  width: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(235, 246, 255, 0.98) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 233, 0.9) 0 1.8px, transparent 3px),
    radial-gradient(circle at 50% 36%, rgba(235, 246, 255, 0.86) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 55%, rgba(255, 238, 144, 0.84) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 76%, rgba(235, 246, 255, 0.84) 0 1.8px, transparent 3px),
    radial-gradient(circle at 50% 100%, rgba(235, 246, 255, 0.9) 0 3px, transparent 4px),
    linear-gradient(180deg, transparent 0%, rgba(232, 247, 255, 0.68) 7%, rgba(255, 255, 240, 0.76) 48%, rgba(232, 247, 255, 0.62) 92%, transparent 100%);
  background-repeat: no-repeat;
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    2px 100%;
  background-position:
    center,
    center,
    center,
    center,
    center,
    center,
    center;
  filter:
    drop-shadow(0 0 4px rgba(235, 248, 255, 0.48))
    drop-shadow(0 0 8px rgba(255, 217, 107, 0.24));
  opacity: 0.9;
  transform: translateX(-50%);
  pointer-events: none;
}

.ks-notes-scroll::after {
  content: "";
  position: absolute;
  top: 5.5%;
  left: 50%;
  width: 18px;
  height: 87%;
  background:
    radial-gradient(ellipse at 28% 10%, transparent 0 37%, rgba(221, 238, 242, 0.58) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 72% 27%, transparent 0 37%, rgba(221, 238, 242, 0.56) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 28% 44%, transparent 0 37%, rgba(221, 238, 242, 0.58) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 72% 63%, transparent 0 37%, rgba(221, 238, 242, 0.54) 39% 42%, transparent 45%),
    radial-gradient(ellipse at 30% 82%, transparent 0 37%, rgba(221, 238, 242, 0.58) 39% 42%, transparent 45%);
  filter:
    drop-shadow(0 0 2px rgba(232, 247, 255, 0.42))
    drop-shadow(0 0 5px rgba(255, 235, 161, 0.22));
  opacity: 0.82;
  transform: translateX(-50%);
  pointer-events: none;
}

.ks-notes-scroll__thumb {
  position: absolute;
  left: 50%;
  top: var(--ks-scroll-thumb-y);
  z-index: 2;
  display: block;
  width: var(--ks-scroll-thumb-size);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 5px 8px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 6px rgba(255, 246, 183, 0.9))
    drop-shadow(0 0 18px rgba(255, 193, 61, 0.72));
}

.ks-notes-scroll:hover,
.ks-notes-scroll:focus-visible,
.ks-notes-scroll--dragging {
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 12px rgba(255, 225, 128, 0.44));
  outline: 0;
}

.ks-notes-list__scroll::-webkit-scrollbar {
  display: none;
}

/* ─── Карточка статьи ─── */

.ks-notes-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 160px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: #5b1d0b;
  isolation: isolate;
  transition: transform 0.2s;
}

.ks-notes-card:hover,
.ks-notes-card:focus-visible {
  transform: scale(1.02);
}

.ks-notes-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.ks-notes-card__thumb-wrap {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 16%;
  aspect-ratio: 1 / 1;
  margin: 20px 0 20px 13%;
  border-radius: 8px;
  overflow: hidden;
}

.ks-notes-card__thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 8px;
  box-shadow: inset 0 0 10px 5px #edd6b5;
  pointer-events: none;
}

.ks-notes-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.94;
}

.ks-notes-card__title {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  padding: 12px 10% 12px 6%;
  margin: 0;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  color: #5b1d0b;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.4);
}

/* ─── Ридер статьи ─── */

.ks-notes-reader {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: ks-notes-slide-up 0.4s ease-out;
  padding: 80px 24px 24px;
  box-sizing: border-box;
}

.ks-notes-reader__back {
  display: none; /* Скрываем на десктопе во избежание наложения на шапку */
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 8px 20px;
  border: 1px solid rgba(247, 200, 130, 0.35);
  border-radius: 999px;
  background: rgba(5, 12, 40, 0.55);
  color: #f6d19b;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.ks-notes-reader__back:hover,
.ks-notes-reader__back:focus-visible {
  background: rgba(247, 200, 130, 0.15);
  border-color: rgba(247, 200, 130, 0.55);
}

.ks-notes-reader__parchment {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 6px;
}

.ks-notes-reader__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.ks-notes-reader__content {
  position: relative;
  z-index: 1;
  max-height: 78%;
  overflow-y: auto;
  padding: 7% 10% 8%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ks-notes-reader__content::-webkit-scrollbar {
  display: none;
}

.ks-notes-reader__content h1 {
  margin: 0 0 5%;
  color: #5b1d0b;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.ks-notes-reader__content .ks-notes-article-hero {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 5%;
  box-shadow:
    inset 0 0 0 6px rgba(90, 50, 20, 0.08);
}

.ks-notes-reader__content p {
  margin: 0 0 4%;
  color: #5f210f;
  font-size: clamp(14px, 1.2vw, 19px);
  font-weight: 700;
  line-height: 1.45;
}

.ks-notes-reader__content img:not(.ks-notes-article-hero) {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 4% auto;
}

/* мягкий внутренний бордер для всех картинок в пергаменте */
.ks-notes-reader__content .ks-notes-img-wrap {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  margin: 4% 0;
}

.ks-notes-reader__content .ks-notes-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 0;
}

.ks-notes-reader__content .ks-notes-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 20px 8px #eedec4;
  pointer-events: none;
}

/* ─── Animations ─── */

@keyframes ks-notes-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ks-notes-slide-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ks-notes-recommendations {
  display: none;
}

/* ─── Страница статьи (Шаблон) ─── */

.ks-article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-top: 140px; /* Отступ под шапку */
  overflow: hidden;
}

.ks-article-reader-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  height: calc(100% - 140px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 0 24px 24px;
}

.ks-article-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.ks-article-reader-container .ks-notes-reader__back {
  display: block;
  padding: 0;
  border: 0;
  width: clamp(42px, 4.2vw, 84px);
  aspect-ratio: 1;
  box-sizing: border-box;
  background: transparent;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.ks-article-reader-container .ks-notes-reader__back:hover,
.ks-article-reader-container .ks-notes-reader__back:focus-visible {
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 14px rgba(255, 217, 128, 0.55));
  transform: scale(1.04);
  outline: 0;
}

.ks-article-close {
  display: block;
  width: clamp(42px, 4.2vw, 84px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
  box-sizing: border-box;
}

.ks-article-close:hover,
.ks-article-close:focus-visible {
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 14px rgba(255, 217, 128, 0.55));
  transform: scale(1.08);
  outline: 0;
}

.ks-article-reader-container .ks-notes-reader__content {
  max-height: 100%;
  height: 100%;
}

@media (min-width: 761px) {
  .article-page .ks-stage__frame--article {
    background-image: url("../images/home/resize/about-1600.webp") !important;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .article-page .ks-stage__frame--article::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(5, 12, 40, 0.94) 0%, rgba(5, 12, 40, 0.68) 12%, rgba(5, 12, 40, 0.1) 31%, rgba(5, 12, 40, 0) 52%);
  }

  .article-page .ks-article {
    position: relative;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 0;
    z-index: 2;
  }

  .article-page .ks-article::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
      linear-gradient(
        90deg,
        #050c28 0%,
        rgba(5, 12, 40, 0.86) 2.2%,
        rgba(5, 12, 40, 0.46) 4.8%,
        rgba(5, 12, 40, 0.16) 7.2%,
        rgba(5, 12, 40, 0) 10.2%,
        rgba(5, 12, 40, 0) 89.8%,
        rgba(5, 12, 40, 0.16) 92.8%,
        rgba(5, 12, 40, 0.46) 95.2%,
        rgba(5, 12, 40, 0.86) 97.8%,
        #050c28 100%
      );
    box-shadow:
      inset 72px 0 104px -58px rgba(5, 12, 40, 0.58),
      inset -72px 0 104px -58px rgba(5, 12, 40, 0.58);
  }

  .article-page .ks-assembled__header {
    z-index: 6;
  }

  .article-page .ks-article-reader-container {
    position: absolute;
    top: 11%;
    left: 0;
    right: 38%;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    width: auto;
    max-width: none;
    height: auto;
    padding: 80px 24px 24px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, black, black calc(100% - 24px), transparent),
                        linear-gradient(to bottom, transparent, black 24px, black);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, black, black calc(100% - 24px), transparent),
                linear-gradient(to bottom, transparent, black 24px, black);
    mask-composite: intersect;
  }

  .article-page .ks-article-reader-container::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(5, 12, 40, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .article-page .ks-article-nav-row {
    position: absolute;
    top: 68px;
    left: 50%;
    z-index: 8;
    width: 100%;
    max-width: 820px;
    margin: 0 auto 12px;
    transform: translateX(-50%);
  }

  .article-page .ks-article-nav-row .ks-notes-reader__back,
  .article-page .ks-article-nav-row .ks-article-close {
    position: relative;
    z-index: 9;
  }

  .article-page .ks-article-reader-container .ks-notes-reader__parchment {
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 820px;
    height: auto;
    min-height: 0;
  }

  .article-page .ks-article-reader-container .ks-notes-reader__content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    overflow-y: auto;
    padding: 7% 10% 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

  .article-page .ks-notes-reader__pages {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 3.2%;
    padding: 1.8% 0 5.2%;
    color: #5a2418;
    font-size: clamp(19px, 1.44vw, 32px);
    line-height: 1;
  }

  .article-page .ks-article-scroll {
    top: 96px;
    right: 34px;
    bottom: 28px;
    z-index: 7;
  }
}

/* ─── Responsive ─── */

@media (max-width: 760px) {
  .ks-about .ks-assembled__header {
    position: relative;
    z-index: 30;
  }

  .ks-notes-overlay {
    top: 78px;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 20;
    border-radius: 0;
    align-items: flex-start;
    padding-top: 8px;
    opacity: 1 !important;
    animation: none !important;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .ks-notes-list__scroll {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 0;
  }

  .ks-notes-list {
    width: 96vw;
    height: 100%;
    max-height: none;
    padding: 8px 12px 0;
    opacity: 1 !important;
    animation: none !important;
  }

  .ks-notes-scroll {
    display: none !important;
  }

  .ks-notes-list__title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .ks-notes-card {
    height: 100px;
    min-height: 100px;
  }

  body.ks-notes-list-open .ks-about {
    padding-bottom: 0;
  }

  body.ks-notes-list-open .ks-about-paper {
    display: none;
  }

  body.ks-notes-list-open .ks-notes-overlay {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    width: 100%;
    height: calc(8px + 8px + 4px + (100px * 7) + (8px * 6));
    overflow: hidden;
  }

  body.ks-notes-list-open .ks-notes-list {
    height: calc(8px + 4px + (100px * 7) + (8px * 6));
  }

  body.ks-notes-list-open .ks-notes-list__scroll {
    flex: 0 0 auto;
    height: calc(4px + (100px * 7) + (8px * 6));
    overflow-y: auto;
  }

  .ks-notes-card__thumb-wrap {
    width: 18%;
    margin: auto 0 auto 12%;
  }

  .ks-notes-card__title {
    font-size: 14px;
    padding-right: 10%;
  }

  .ks-notes-reader {
    width: 96vw;
    max-height: 92vh;
    padding: 16px 12px 16px;
    display: block;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .ks-notes-reader::-webkit-scrollbar {
    display: none;
  }

  .ks-notes-reader__back {
    display: block; /* Показываем только на мобильных для удобного возврата */
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    width: 172px;
    height: 36px;
    box-sizing: border-box;
    background: url("../images/home/категория.webp") center / 100% 100% no-repeat;
    color: #ffd996;
    font-family: "Arial Black", "Trebuchet MS", Arial, sans-serif;
    font-size: 11px;
    font-weight: 900;
    line-height: 34px;
    text-align: center;
    text-shadow:
      -1px -1px 0 #733018,
      0 -1px 0 #733018,
      1px -1px 0 #733018,
      -1px 0 0 #733018,
      1px 0 0 #733018,
      0 2px 1px rgba(54, 18, 7, 0.7),
      0 0 8px rgba(255, 226, 148, 0.42);
    cursor: pointer;
  }

  .ks-notes-reader__content {
    padding: 10% 8% 12%;
    max-height: none;
    overflow-y: visible;
  }

  .ks-notes-recommendations {
    display: block;
    position: relative;
    width: 100%;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #e7c7a0;
    overflow: hidden;
  }

  .ks-notes-recommendations h2 {
    position: relative;
    z-index: 0;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 16px;
    padding: 6px 16px 8px;
    color: #ffe1b8;
    font-size: clamp(18px, 5.2vw, 24px);
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-shadow:
      0 2px 0 rgba(65, 25, 11, 0.94),
      0 4px 7px rgba(22, 8, 4, 0.72),
      0 0 14px rgba(255, 221, 154, 0.32);
  }

  .ks-notes-recommendations h2::before {
    content: '';
    position: absolute;
    inset: -4% 1.4% -8%;
    z-index: -1;
    border: 1px solid rgba(255, 213, 137, 0.52);
    border-radius: 999px 999px 42% 42% / 42% 42% 58% 58%;
    background:
      radial-gradient(ellipse at 50% 38%, rgba(255, 222, 156, 0.3) 0 24%, transparent 58%),
      linear-gradient(180deg, rgba(139, 76, 34, 0.88), rgba(95, 42, 18, 0.9) 52%, rgba(58, 24, 12, 0.88));
    box-shadow:
      inset 0 2px 0 rgba(255, 225, 169, 0.46),
      inset 0 -8px 18px rgba(53, 20, 8, 0.34),
      0 0 18px rgba(255, 202, 112, 0.22),
      0 8px 18px rgba(11, 7, 5, 0.34);
    opacity: 0.94;
  }

  .ks-notes-recommendations__viewport {
    --ks-notes-rec-gap: clamp(10px, 3vw, 14px);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(92px, 30.5vw, 132px);
    gap: var(--ks-notes-rec-gap);
    width: max-content;
    min-width: max-content;
    overflow: visible;
    scrollbar-width: none;
    padding: 2px 4px 10px;
    animation: ks-notes-rec-marquee 36s linear infinite;
    will-change: transform;
  }

  .ks-notes-recommendations__viewport::-webkit-scrollbar {
    display: none;
  }

  .ks-notes-rec-card {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 0.77;
    border: 1px solid rgba(251, 205, 127, 0.64);
    border-radius: 7px;
    color: #ffe0b0;
    text-decoration: none;
    background: rgba(28, 15, 10, 0.58);
    box-shadow:
      inset 0 0 0 1px rgba(94, 52, 25, 0.4),
      0 8px 12px rgba(0, 0, 0, 0.22);
    cursor: pointer;
  }

  .ks-notes-rec-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.83) saturate(0.9);
  }

  .ks-notes-rec-card span {
    display: none;
  }

  .ks-notes-recommendations__arrow {
    display: none;
  }

  .ks-notes-recommendations__arrow--prev {
    left: -2.4%;
  }

  .ks-notes-recommendations__arrow--next {
    right: -2.4%;
  }

  @keyframes ks-notes-rec-marquee {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(calc(-50% - var(--ks-notes-rec-gap) / 2));
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .ks-notes-recommendations__viewport {
      animation: none;
    }
  }

  .ks-notes-overlay__close {
    display: grid; /* Показываем только на мобильных для закрытия оверлея */
    top: 26px;
    right: calc(2vw + 12px);
    width: clamp(46px, 12vw, 54px);
    height: auto;
    aspect-ratio: 1;
  }

  /* Стили для страницы статьи на мобильных */
  .article-page .ks-assembled__header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    display: grid !important;
  }

  .article-page .ks-assembled {
    padding-bottom: 0;
    overflow: visible;
  }

  .article-page .ks-stage__frame {
    overflow: visible;
  }

  .article-page .ks-about-paper {
    display: none;
  }

  .article-page .ks-article-scroll,
  .article-page .ks-notes-reader__pages {
    display: none !important;
  }

  .ks-article {
    padding-top: 0;
    height: auto;
    overflow: visible;
  }

  .ks-article-reader-container {
    width: 96vw;
    height: auto;
    margin: 0 auto;
    padding: 140px 12px 16px;
    box-sizing: border-box;
    display: block;
  }

  .ks-article-nav-row {
    position: fixed;
    top: calc(78px + 8px);
    left: 50%;
    z-index: 110;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(96vw - 24px);
    max-width: 536px;
    height: clamp(40px, 12vw, 54px);
    padding: 0;
    margin: 0;
    pointer-events: auto;
    transform: translateX(-50%);
  }

  .ks-article-nav-row .ks-notes-reader__back,
  .ks-article-nav-row .ks-article-close {
    pointer-events: auto;
    flex: 0 0 auto;
    margin: 0;
  }

  .ks-article-close {
    width: clamp(40px, 12vw, 54px);
  }

  .ks-article-reader-container .ks-notes-reader__back {
    display: block;
    align-self: center;
    width: clamp(40px, 12vw, 54px);
    height: auto;
    aspect-ratio: 1;
    background: transparent;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
  }

  .ks-article-reader-container .ks-notes-reader__parchment {
    height: auto;
    overflow: visible;
  }

  .ks-article-reader-container .ks-notes-reader__content {
    max-height: none;
    height: auto;
    overflow-y: visible;
    padding: 10% 8% 12%;
  }
}

.ks-notes-mobile-footer {
  display: none;
}

@media (max-width: 760px) {
  body.article-page .ks-home-mockup > .ks-home-minibar {
    display: none !important;
  }

  body.article-page .ks-notes-mobile-footer {
    display: block;
    width: 100%;
    margin: 18px 0 0;
    background: #050c28;
  }

  body.article-page .ks-notes-mobile-footer .ks-home-minibar__inner {
    display: flex;
    justify-content: center;
    min-height: 104px;
    padding: 20px 14px 24px;
    border-top: 1px solid rgba(247, 200, 130, 0.16);
    background: #050c28;
  }
}
