@font-face {
  font-family: "RF Dewi";
  src: url("../../fonts/rf-dewi/RFDewi-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RF Dewi";
  src: url("../../fonts/rf-dewi/RFDewi-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "RF Dewi";
  src: url("../../fonts/rf-dewi/RFDewi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RF Dewi";
  src: url("../../fonts/rf-dewi/RFDewi-SemiboldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

* {
    box-sizing: border-box;
}

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

html {
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: "RF Dewi", "Amatic SC", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
  /* background-color: #F1E8D6; */
  background-color: #f1e8d6;
}

.main-screen {
  height: 70vh;
  width: 100%;
  max-width: 100%;
  background-color: #252525;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-direction: column;
  overflow: hidden;
  cursor: cell;
  flex-shrink: 0;
}

@keyframes wave {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(var(--wave-tile) * -1), 0, 0);
  }
}


.eye-container {
  display: flex;
  gap: 200px;
}

.eye {
  width: 240px;
  height: 120px;
  position: relative;
  overflow: hidden;
}

.eye svg {
  width: 100%;
  height: 100%;
}

.pupil {
  fill: #252525;
  transition: transform 0.1s ease;
}

.sclera {
  fill: #F1E8D6;
  transition: fill 0.5s ease;
}

.eye.tired .sclera {
  fill: indianred;
}

/* Псевдоэлемент для закрытия глаз */
.eye::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #252525;
  border-radius: 100% / 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.eye:hover::after {
  opacity: 1;
}

/* Моргание */
.eyelid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #252525;
  border-radius: 100% / 50%;
  animation: blink 6s infinite;
  transform-origin: center top;
  z-index: 5;
}

@keyframes blink {
  0%, 80% {
    clip-path: inset(0 0 100% 0);
  }
  90% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 0 100% 0);
  }
}

/* Меню */
.menu-btn {
  position: absolute;
  top: 50px;
  left: 50px;
  z-index: 10;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.menu-btn:focus-visible {
  outline: 2px solid #cd5c5c;
  outline-offset: 4px;
  border-radius: 8px;
}

.wave-icon {
  width: 50px;
  height: 50px;
}

.wave-icon path {
  fill: none;
  stroke: indianred;
  stroke-width: 6;
  stroke-linecap: round;
  transition: d 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.wave1 {
  d: path("M4 30c12-24 40 24 56 0");
}

.wave2 {
  d: path("M4 44c12-24 40 24 56 0");
}

.menu-btn.open .wave1 {
  d: path("M10,32 L54,32"); /* Выпрямленная линия */
  transform: rotate(45deg) translate(20px, -34px);
}

.menu-btn.open .wave2 {
  d: path("M10,42 L54,42"); /* Выпрямленная линия */
  transform: rotate(-45deg) translate(-30px, 10px);
}

.menu {
  --wave-h: 100px;
  --wave-tile: 1920px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  width: 100%;
  transform: translateY(calc(100% - var(--wave-h)));
  transition: transform 0.6s ease;
}

.menu.open {
  transform: translateY(0);
}

.wave {
  position: relative;
  z-index: 1;
  width: 100%;
  height: var(--wave-h);
  margin-bottom: -1px;
  overflow: hidden;
  pointer-events: none;
}

.wave::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--wave-tile) * 3);
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1920' height='200' viewBox='0 0 1920 200' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C240,0 240,50 480,50 C720,50 720,0 960,0 C1200,0 1200,50 1440,50 C1680,50 1680,0 1920,0 L1920,200 L0,200 Z' fill='%23f1e8d6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: var(--wave-tile) 100%;
  animation: wave 4s linear infinite;
  will-change: transform;
}

.menu__container {
  position: relative;
  background-color: #F1E8D6;
  padding: 80px 0 100px;
}

.menu__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 40px;
}

.menu__container p {
  font-size: 24px;
  max-width: 70%;
  color: #252525;
}

.menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  column-gap: 30px;
}

.menu__list a {
  font-size: 24px;
  text-decoration: none;
  color: indianred;
}

.site-footer {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: auto 0 0;
  padding: 0;
  background: indianred;
  flex-shrink: 0;
}

.site-footer__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 48px 40px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px 40px;
}

.site-footer__list {
  margin: 0;
}

.site-footer__list a {
  color: #f1e8d6;
}

.site-footer__note {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  color: #f1e8d6;
  opacity: 0.85;
}

.main-container {
  padding: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 0 auto;
}

.gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.content {
  --gallery-gap: 24px;
  --gallery-cols: 4;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 0 auto;
  padding: 64px 40px 96px;
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols), minmax(0, 1fr));
  gap: var(--gallery-gap);
  align-items: start;
}

/* Плотная укладка (masonry), порядок как в разметке: слева направо в короткий столбец */
@supports (grid-template-rows: masonry) {
  .content {
    grid-template-rows: masonry;
  }
}

/* JS-fallback: абсолютная masonry-раскладка */
.content.is-masonry {
  display: block;
  gap: normal;
}

.content.is-masonry .content__pic {
  position: absolute;
  margin: 0;
}

@keyframes pic-wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.content__pic {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  transform-origin: center center;
  transition: transform 0.35s ease;
  animation: pic-wave 3.5s ease-in-out infinite;
}

.content__pic:nth-child(6n + 1) { animation-delay: 0s; }
.content__pic:nth-child(6n + 2) { animation-delay: 0.15s; }
.content__pic:nth-child(6n + 3) { animation-delay: 0.3s; }
.content__pic:nth-child(6n + 4) { animation-delay: 0.45s; }
.content__pic:nth-child(6n + 5) { animation-delay: 0.6s; }
.content__pic:nth-child(6n + 6) { animation-delay: 0.75s; }

.content__pic.is-active {
  z-index: 3;
  animation: none;
}

/* Desktop: увеличивается вся ячейка (визуально), место в сетке не занимает */
@media (hover: hover) and (pointer: fine) {
  .content__pic:hover:not(:has(.mobile-design)),
  .content__pic.is-active:not(:has(.mobile-design)) {
    z-index: 3;
    animation: none;
    transform: scale(1.05);
  }
}

.content__pic > * {
  display: block;
  width: 100%;
}

.content__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-radius 0.35s ease;
}

.content__pic.is-active .content__media {
  border-radius: 16px;
}

.content__pic:has(> .content__caption) {
  overflow: hidden;
  border-radius: 24px;
  transition: border-radius 0.35s ease;
}

.content__pic.is-active:has(> .content__caption) {
  border-radius: 16px;
}

.content__pic img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 24px;
  transition: border-radius 0.35s ease;
}

.content__pic.is-active img {
  border-radius: 16px;
}

.content__media img,
.content__pic:has(> .content__caption) > img {
  border-radius: 0;
}

.content__pic.is-active .content__media img,
.content__pic.is-active:has(> .content__caption) > img {
  border-radius: 0;
}

.content__pic:has(.mobile-design) {
  overflow: visible;
  border-radius: 0;
}

.content__pic.is-active:has(.mobile-design) {
  border-radius: 0;
}

.content__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 48%;
  margin: 0;
  padding: 0 14px 20px;
  border-radius: 0;
  background: linear-gradient(
    to top,
    rgba(37, 37, 37, 0.88) 0%,
    rgba(37, 37, 37, 0.62) 35%,
    rgba(37, 37, 37, 0.28) 70%,
    rgba(37, 37, 37, 0) 100%
  );
  color: #f1e8d6;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.content__pic.is-active .content__caption,
.content__media:focus-visible .content__caption {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* подпись внутри экрана мокапа — обрезается по скруглению телефона */
.mobile-design__screen .content__caption {
  border-radius: 0;
}

.content__caption > span {
  display: block;
  font-size: 14px;
  margin-top: 4px;
  font-style: italic;
  font-weight: bold;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.content__pic.is-active .content__caption > span,
.content__media:focus-visible .content__caption > span {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  font-size: 36px;
  color: #252525;
  font-weight: 400;
}

.section p {
  font-size: 28px;
  color: #252525;
  margin-bottom: 120px;
}

.section p a,
.section p a:hover,
.section p a:focus-visible,
.section p a:active,
.section p a:visited {
  color: #252525;
  cursor: pointer;
}

.mobile-design {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.mobile-design__bezel {
  position: relative;
  width: 100%;
  background: linear-gradient(160deg, #3a3a3a 0%, #1c1c1c 40%, #111 100%);
  border-radius: 40px;
  padding: 11px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 0 3px #252525,
    0 18px 40px rgba(37, 37, 37, 0.28);
}

.mobile-design__island {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 3;
  width: 82px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mobile-design__screen {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: #f1e8d6;
}

.mobile-design__content {
  aspect-ratio: 9 / 17;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 37, 37, 0.35) transparent;
}

.mobile-design__content::-webkit-scrollbar {
  width: 4px;
}

.mobile-design__content::-webkit-scrollbar-thumb {
  background: rgba(37, 37, 37, 0.35);
  border-radius: 4px;
}

.mobile-design__content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
}

.content__pic.is-active .mobile-design__content img {
  border-radius: 0;
  transform: none;
}

.mobile-design__home {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  width: 96px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.mobile-design__btn {
  position: absolute;
  background: #2a2a2a;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mobile-design__btn--silent {
  top: 96px;
  left: -3px;
  width: 3px;
  height: 28px;
}

.mobile-design__btn--volume-up {
  top: 148px;
  left: -3px;
  width: 3px;
  height: 48px;
}

.mobile-design__btn--volume-down {
  top: 208px;
  left: -3px;
  width: 3px;
  height: 48px;
}

.mobile-design__btn--power {
  top: 168px;
  right: -3px;
  width: 3px;
  height: 72px;
}

.hystmodal--comics .hystmodal__window {
    width: min(1100px, calc(100vw - 120px), calc(100vh - 100px));
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 80px);
    background-color: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hystmodal--fortune .hystmodal__window {
  width: min(880px, calc(100vw - 48px));
  max-width: calc(100vw - 32px);
  background: #828282;
  border-radius: 28px;
  padding: 40px 28px 36px;
  position: relative;
  overflow: visible;
}

.hystmodal--fortune .hystmodal__close {
  top: 16px;
  right: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23252525' stroke='%23252525' stroke-linecap='square' stroke-miterlimit='50' stroke-width='2' d='M22 2L2 22'/%3E%3Cpath fill='none' stroke='%23252525' stroke-linecap='square' stroke-miterlimit='50' stroke-width='2' d='M2 2l20 20'/%3E%3C/svg%3E");
}

.fortune__prompt {
  margin: 0 0 28px;
  text-align: center;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 100;
  color: #252525;
  letter-spacing: 0.02em;
}

.fortune__deck {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  min-height: 320px;
  padding: 28px 6px 36px;
  perspective: 1200px;
  overflow: visible;
}

.fortune__card {
  position: relative;
  width: clamp(96px, 10.5vw, 140px);
  aspect-ratio: 2 / 3.45;
  margin-left: -42px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform 0.35s ease, margin 0.35s ease, opacity 0.35s ease;
  transform-style: preserve-3d;
}

.fortune__card:first-child {
  margin-left: 0;
}

.fortune__card:nth-child(1) { transform: rotate(-18deg) translateY(28px); }
.fortune__card:nth-child(2) { transform: rotate(-15deg) translateY(20px); }
.fortune__card:nth-child(3) { transform: rotate(-12deg) translateY(14px); }
.fortune__card:nth-child(4) { transform: rotate(-9deg) translateY(9px); }
.fortune__card:nth-child(5) { transform: rotate(-6deg) translateY(5px); }
.fortune__card:nth-child(6) { transform: rotate(-3deg) translateY(2px); }
.fortune__card:nth-child(7) { transform: rotate(0deg) translateY(0); }
.fortune__card:nth-child(8) { transform: rotate(3deg) translateY(2px); }
.fortune__card:nth-child(9) { transform: rotate(6deg) translateY(5px); }
.fortune__card:nth-child(10) { transform: rotate(9deg) translateY(9px); }
.fortune__card:nth-child(11) { transform: rotate(12deg) translateY(14px); }
.fortune__card:nth-child(12) { transform: rotate(15deg) translateY(20px); }
.fortune__card:nth-child(13) { transform: rotate(18deg) translateY(28px); }

.fortune__card:hover {
  z-index: 5;
  transform: translateY(-36px) scale(1.08);
}

.fortune__deck.is-locked .fortune__card {
  pointer-events: none;
}

.fortune__deck.is-locked .fortune__card:not(.is-picked) {
  opacity: 0.35;
  filter: grayscale(0.2);
}

.fortune__card-inner {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fortune__card.is-flipped .fortune__card-inner {
  transform: rotateY(180deg);
}

.fortune__face {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(37, 37, 37, 0.22);
}

.fortune__face--back {
  background:
    repeating-linear-gradient(
      135deg,
      #252525 0 8px,
      #3a3a3a 8px 16px
    );
  box-shadow:
    inset 0 0 0 2px rgba(241, 232, 214, 0.35),
    0 10px 24px rgba(37, 37, 37, 0.22);
  z-index: 1;
}

.fortune__face--front {
  transform: rotateY(180deg);
  background: #252525;
  z-index: 0;
}

.fortune__face--front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.fortune__reveal {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 8px;
  animation: fortune-reveal-in 0.55s ease;
}

.fortune__reveal[hidden] {
  display: none;
}

@keyframes fortune-reveal-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fortune__card-face {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(37, 37, 37, 0.25);
}

.fortune__card-face img {
  width: 100%;
  display: block;
}

.fortune__title {
  margin: 0 0 10px;
  font-size: 42px;
  font-weight: 600;
  color: #252525;
  line-height: 1.1;
}

.fortune__meaning {
  margin: 0 0 14px;
  font-size: clamp(18px, 2.4vw, 26px);
  color: #252525;
  line-height: 1.4;
}

.fortune__description {
  margin: 0 0 28px;
  max-width: 42ch;
  font-size: clamp(15px, 1.8vw, 18px);
  color: #252525;
  line-height: 1.55;
  opacity: 0.9;
}

.fortune__again {
  appearance: none;
  border: 2px solid #252525;
  border-radius: 999px;
  background: transparent;
  color: #252525;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.fortune__again:hover {
  background: #252525;
  color: #f1e8d6;
}

.fortune.is-revealed .fortune__intro,
.fortune.is-revealed .fortune__deck {
  display: none;
}

.hystmodal--gallery .hystmodal__window {
  width: min(920px, calc(100vw - 32px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  margin: 16px 0;
  padding: 20px 16px 24px;
  background: #252525;
  border-radius: 20px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.hystmodal--gallery .hystmodal__close {
  top: 10px;
  right: 10px;
}

.gallery-lightbox__figure {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gallery-lightbox__img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(70vh, calc(100vh - 220px));
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  background: #1a1a1a;
}

.gallery-lightbox__img[hidden],
.gallery-lightbox__phone[hidden],
.gallery-lightbox__action[hidden],
.gallery-lightbox__caption[hidden] {
  display: none !important;
}

.gallery-lightbox__phone {
  width: min(300px, 78vw);
  margin: 0 auto;
  flex-shrink: 0;
}

.gallery-lightbox__phone .mobile-design__content {
  max-height: min(62vh, calc(100vh - 260px));
  -webkit-overflow-scrolling: touch;
}

.gallery-lightbox__phone-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
}

.gallery-lightbox__caption {
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  margin: 0;
  padding: 0 4px;
  color: #f1e8d6;
  text-align: center;
}

.gallery-lightbox__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #f1e8d6;
}

.gallery-lightbox__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: #f1e8d6;
  color: #252525;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  cursor: pointer;
}

.gallery-lightbox__action:active {
  transform: scale(0.98);
}

.hystmodal__close {
    top: -40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f8c6c6' stroke='%23f8c6c6' stroke-linecap='square' stroke-miterlimit='50' stroke-width='2' d='M22 2L2 22'/%3E%3Cpath fill='none' stroke='%23f8c6c6' stroke-linecap='square' stroke-miterlimit='50' stroke-width='2' d='M2 2l20 20'/%3E%3C/svg%3E");
}

.hystmodal__close:focus {
    outline: none;
}

.comics__slider {
    width: 100%;
    max-height: calc(100vh - 100px);
    overflow: hidden;
}

.comics__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
}

.comics__slide img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.swiper-button-next, 
.swiper-button-prev {
    color: #f8c6c6;
}

.swiper-button-next {
    right: -40px;
}

.swiper-button-prev {
    left: -40px;
}

@media (max-width: 1100px) {
  .content {
    --gallery-cols: 3;
    padding: 56px 28px 80px;
  }
}

@media (max-width: 768px) {
  .main-screen {
    height: 58vh;
    min-height: 320px;
  }

  .eye-container {
    gap: clamp(36px, 10vw, 72px);
    padding: 0 16px;
  }

  .eye {
    width: clamp(112px, 32vw, 160px);
    height: clamp(56px, 16vw, 80px);
  }

  .menu-btn {
    top: 20px;
    left: 16px;
    width: 44px;
    height: 44px;
  }

  .wave-icon {
    width: 40px;
    height: 40px;
  }

  .menu {
    --wave-h: 72px;
    --wave-tile: 960px;
  }

  .menu__container {
    padding: 40px 0 56px;
  }

  .menu__inner {
    padding: 0 16px;
  }

  .menu__container p {
    font-size: 16px;
    max-width: 100%;
    line-height: 1.55;
  }

  .menu__list {
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 8px;
    margin-top: 20px;
  }

  .menu__list a {
    font-size: 18px;
  }

  .site-footer__inner {
    padding: 32px 16px 48px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .site-footer__note {
    font-size: 14px;
  }

  .content {
    --gallery-gap: 14px;
    --gallery-cols: 2;
    padding: 40px 16px 64px;
  }

  @keyframes pic-wave {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-6px);
    }
  }

  .content__pic {
    animation-duration: 3.2s;
  }

  .content__pic.is-active:not(:has(.mobile-design)) {
    animation: none;
    transform: scale(1.04);
  }

  .content__pic img {
    border-radius: 16px;
  }

  .content__pic.is-active img {
    border-radius: 12px;
  }

  /* Намёк: одна строка; полный текст — в модалке */
  .content__caption {
    opacity: 1;
    transform: none;
    display: block;
    height: auto;
    max-height: none;
    padding: 28px 10px 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
    font-size: 12px;
    line-height: 1.3;
    pointer-events: none;
    background: linear-gradient(
      to top,
      rgba(37, 37, 37, 0.72) 0%,
      rgba(37, 37, 37, 0.32) 55%,
      rgba(37, 37, 37, 0) 100%
    );
  }

  .content__caption br,
  .content__caption > span {
    display: none;
  }

  .content__pic.is-active {
    animation: none;
    transform: none;
  }

  .hystmodal--gallery .hystmodal__window {
    width: calc(100vw - 24px);
    padding: 16px 12px 20px;
    border-radius: 16px;
  }

  .gallery-lightbox__img {
    max-height: min(62vh, calc(100vh - 240px));
    border-radius: 10px;
  }

  .gallery-lightbox__phone {
    width: min(280px, 72vw);
  }

  .gallery-lightbox__phone .mobile-design__content {
    max-height: min(58vh, calc(100vh - 280px));
  }

  .gallery-lightbox__text {
    font-size: 15px;
  }

  .gallery-lightbox__action {
    margin-top: 10px;
    padding: 11px 18px;
    font-size: 14px;
  }

  .mobile-design {
    padding: 0;
  }

  .mobile-design__bezel {
    border-radius: 28px;
    padding: 8px;
  }

  .mobile-design__island {
    top: 14px;
    width: 56px;
    height: 16px;
  }

  .mobile-design__screen {
    border-radius: 20px;
  }

  .mobile-design__home {
    bottom: 12px;
    width: 64px;
  }

  .hystmodal--comics .hystmodal__window {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 48px);
    margin: 24px 0;
  }

  .comics__slider,
  .comics__slide img {
    max-height: calc(100vh - 72px);
  }

  .hystmodal--fortune .hystmodal__window {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    border-radius: 20px;
    padding: 36px 16px 28px;
  }

  .fortune__prompt {
    margin-bottom: 18px;
    font-size: clamp(24px, 7vw, 32px);
  }

  .fortune__deck {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 6px;
    min-height: auto;
    padding: 8px 0 20px;
  }

  .fortune__card,
  .fortune__card:first-child,
  .fortune__card:nth-child(n) {
    margin-left: 0;
    transform: none;
    width: calc((100% - 24px) / 4);
    max-width: 78px;
  }

  .fortune__card:hover {
    transform: translateY(-8px) scale(1.04);
  }

  .fortune__face {
    border-radius: 10px;
  }

  .fortune__reveal {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .fortune__title {
    font-size: 24px;
  }

  .fortune__meaning {
    font-size: 18px;
  }

  .fortune__description {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    font-size: 15px;
  }

  .fortune__card-face {
    max-width: 300px;
    margin: 0 auto;
    border-radius: 16px;
  }

  .fortune__again {
    font-size: 14px;
    padding: 10px 18px;
  }

  .swiper-button-next {
    right: 4px;
  }

  .swiper-button-prev {
    left: 4px;
  }

  .hystmodal__close {
    top: 8px;
    right: 8px;
  }

  .section h2 {
    font-size: 28px;
  }

  .section p {
    font-size: 18px;
    margin-bottom: 64px;
  }
}

@media (max-width: 480px) {
  .main-screen {
    height: 52vh;
    min-height: 280px;
  }

  .eye-container {
    gap: 28px;
  }

  .eye {
    width: 108px;
    height: 54px;
  }

  .fortune__card,
  .fortune__card:first-child,
  .fortune__card:nth-child(n) {
    width: 80px;
    max-width: 80px;
  }
}