@import url("https://fonts.googleapis.com/css2?family=Bitcount+Grid+Double&family=Chakra+Petch:wght@400;600;700&display=swap");

:root {
  --pink: #fc0390;
  --pink-boost: #ff43b0;
  --metal: #999999;
  --metal-boost: #d2d2d2;
  --ink-0: #06060d;
  --ink-1: #12121d;
  --ink-2: #1b1b2b;
  --panel-surface: rgba(21, 23, 35, 0.88);
  --text-main: #f3f3f3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background-color: var(--ink-1);
  color: var(--metal-boost);
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  padding: 1.2rem 0.9rem 1.7rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-align: center;
  font-family: "Bitcount Grid Double", "Chakra Petch", sans-serif;
}

.bg-grid {
  display: none;
}

.bg-glow {
  display: none;
}

.bg-glow--left {
  left: -8.5rem;
  top: 20%;
  background: rgba(252, 3, 144, 0.5);
}

.bg-glow--right {
  right: -7.5rem;
  top: 4%;
  background: rgba(153, 153, 153, 0.36);
  animation-delay: 1.2s;
}

.site-header,
.panel-grid,
.status,
.site-footer {
  position: relative;
  z-index: 1;
  margin-inline: auto;
  width: min(72rem, 100%);
}

.site-header {
  text-align: center;
  margin-bottom: 1rem;
  padding: 1.25rem 1rem 1.4rem;
  border-radius: 2rem;
  border: 1px solid rgba(252, 3, 144, 0.48);
  background: rgba(18, 18, 29, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(153, 153, 153, 0.28),
    0 14px 30px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(252, 3, 144, 0.26);
}

.eyebrow {
  margin: 0;
  display: inline-block;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  letter-spacing: 0.13rem;
  font-size: 0.74rem;
  color: #fff;
  text-transform: uppercase;
  background: rgba(252, 3, 144, 0.88);
  box-shadow: 0 0 0 1px rgba(252, 3, 144, 0.45);
}

h1 {
  margin: 0.65rem 0 0.6rem;
  color: var(--text-main);
  font-size: clamp(1.9rem, 10vw, 3.4rem);
  letter-spacing: 0.04rem;
  text-shadow: 0 0 12px rgba(252, 3, 144, 0.7);
  animation: title-flicker 3.4s steps(2, end) infinite;
}

.lead {
  margin: 0 auto;
  max-width: 40ch;
  font-size: 1.02rem;
  color: #d7d7d7;
}

.panel-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

.panel {
  --scan-duration: 4.4s;
  --scan-delay: 0s;
  --scan-aux-duration: 7.2s;
  --scan-aux-delay: 0.8s;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(153, 153, 153, 0.44);
  border-radius: 0.45rem;
  background: rgba(25, 27, 40, 0.9);
  backdrop-filter: blur(10px);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow:
    inset 0 0 0 1px rgba(252, 3, 144, 0.3),
    0 16px 28px rgba(0, 0, 0, 0.36),
    0 0 30px rgba(252, 3, 144, 0.18);
  animation: panel-rise 540ms ease both, panel-pulse 2.8s ease-in-out infinite;
}

.panel::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: 0;
  height: 16px;
  border-top: 1px solid rgba(252, 3, 144, 0.9);
  border-bottom: 1px solid rgba(153, 153, 153, 0.8);
  background: rgba(252, 3, 144, 0.12);
  box-shadow:
    0 0 7px rgba(252, 3, 144, 0.7),
    0 0 18px rgba(252, 3, 144, 0.5),
    inset 0 0 0 1px rgba(252, 3, 144, 0.28);
  animation: panel-scan var(--scan-duration) linear infinite;
  animation-delay: var(--scan-delay);
  will-change: transform, opacity;
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28%;
  border-left: 1px dashed rgba(252, 3, 144, 0.62);
  border-right: 1px solid rgba(153, 153, 153, 0.56);
  background: rgba(252, 3, 144, 0.06);
  box-shadow: inset 0 0 0 1px rgba(252, 3, 144, 0.14);
  animation: panel-scan-side var(--scan-aux-duration) steps(24, end) infinite;
  animation-delay: var(--scan-aux-delay);
  will-change: transform, opacity;
  pointer-events: none;
}

.panel:nth-child(1) {
  --scan-duration: 4.2s;
  --scan-delay: 0.15s;
  --scan-aux-duration: 7.8s;
  --scan-aux-delay: 1.1s;
}

.panel:nth-child(2) {
  --scan-duration: 5s;
  --scan-delay: 1.25s;
  --scan-aux-duration: 6.6s;
  --scan-aux-delay: 0.35s;
  animation-delay: 120ms;
}

.panel:nth-child(3) {
  --scan-duration: 3.8s;
  --scan-delay: 0.7s;
  --scan-aux-duration: 8.6s;
  --scan-aux-delay: 1.8s;
  animation-delay: 200ms;
}

.panel h2 {
  margin: 0 0 0.56rem;
  color: #ffffff;
  font-size: 1.16rem;
  line-height: 1.25;
}

.panel p {
  margin: 0 0 1rem;
  line-height: 1.45;
  font-size: 1rem;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.68rem;
}

.social-row .action-btn--link {
  flex: 1 1 10.5rem;
}

.action-btn {
  width: 100%;
  border: 1px solid rgba(252, 3, 144, 0.74);
  background: rgba(170, 7, 105, 0.95);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: 700 0.97rem/1 "Chakra Petch", sans-serif;
  letter-spacing: 0.025rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 20px rgba(252, 3, 144, 0.28);
  animation: neon-hum 2.2s ease-in-out infinite;
}

.action-btn--link {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  gap: 0.62rem;
  padding: 0.72rem 0.98rem;
  font-size: 1.03rem;
  letter-spacing: 0.015rem;
  border-width: 1.5px;
  position: relative;
  overflow: hidden;
}

.action-btn--full-row {
  grid-column: 1 / -1;
}

.action-btn--link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
}

.social-icon {
  width: 2.05rem;
  height: 2.05rem;
  flex: 0 0 2.05rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  position: relative;
  z-index: 1;
}

.social-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.social-icon-image {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  object-fit: contain;
}

.social-label {
  position: relative;
  z-index: 1;
}

.action-btn--telegram {
  background: #229ed9;
  border-color: rgba(171, 224, 247, 0.8);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(34, 158, 217, 0.45);
}

.action-btn--telegram .social-icon {
  background: rgba(0, 54, 92, 0.35);
}

.action-btn--bark {
  background: #ff8f1f;
  border-color: rgba(255, 215, 176, 0.82);
  color: #241003;
  box-shadow: 0 8px 22px rgba(255, 122, 0, 0.42);
}

.action-btn--bark .social-icon {
  background: rgba(45, 20, 4, 0.24);
  color: #fff4ea;
}

.action-btn--stickers {
  background: #38b3eb;
  border-color: rgba(184, 235, 255, 0.86);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(56, 179, 235, 0.44);
}

.action-btn--stickers .social-icon {
  background: rgba(0, 62, 104, 0.35);
}

.action-btn--tellonym {
  background: #fc0390;
  border-color: rgba(255, 174, 218, 0.86);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(252, 3, 144, 0.44);
}

.action-btn--tellonym .social-icon {
  background: rgba(69, 0, 40, 0.35);
}

.action-btn--instagram {
  background: #e4405f;
  border-color: rgba(255, 196, 208, 0.88);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(228, 64, 95, 0.42);
}

.action-btn--instagram .social-icon {
  background: rgba(79, 12, 26, 0.32);
}

.action-btn--tiktok {
  background: #121212;
  border-color: rgba(150, 255, 249, 0.75);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(9, 230, 217, 0.28);
}

.action-btn--tiktok .social-icon {
  background: rgba(255, 0, 80, 0.2);
}

.social-icon-image--tellonym {
  mix-blend-mode: screen;
}

.action-btn:hover,
.action-btn:focus-visible {
  outline: none;
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.18);
  box-shadow: 0 0 0 3px rgba(252, 3, 144, 0.2), 0 0 22px rgba(252, 3, 144, 0.4);
}

.action-btn--link:hover,
.action-btn--link:focus-visible {
  box-shadow: 0 0 0 3px rgba(252, 3, 144, 0.2), 0 0 24px rgba(252, 3, 144, 0.38);
}

.action-btn--telegram:hover,
.action-btn--telegram:focus-visible {
  box-shadow: 0 0 0 3px rgba(34, 158, 217, 0.28), 0 0 26px rgba(34, 158, 217, 0.52);
}

.action-btn--bark:hover,
.action-btn--bark:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.24), 0 0 26px rgba(255, 122, 0, 0.5);
}

.action-btn--stickers:hover,
.action-btn--stickers:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 179, 235, 0.26), 0 0 26px rgba(56, 179, 235, 0.5);
}

.action-btn--tellonym:hover,
.action-btn--tellonym:focus-visible {
  box-shadow: 0 0 0 3px rgba(252, 3, 144, 0.3), 0 0 26px rgba(252, 3, 144, 0.54);
}

.action-btn--instagram:hover,
.action-btn--instagram:focus-visible {
  box-shadow: 0 0 0 3px rgba(228, 64, 95, 0.24), 0 0 26px rgba(228, 64, 95, 0.5);
}

.action-btn--tiktok:hover,
.action-btn--tiktok:focus-visible {
  box-shadow: 0 0 0 3px rgba(9, 230, 217, 0.28), 0 0 26px rgba(9, 230, 217, 0.42);
}

.story-frame {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  border: 1px solid rgba(153, 153, 153, 0.54);
  background: rgba(20, 22, 34, 0.9);
  padding: 0.75rem;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.24),
    0 14px 24px rgba(0, 0, 0, 0.3);
}

.chapter-hud {
  display: grid;
  gap: 0.22rem;
  margin-bottom: 0.56rem;
  text-align: center;
}

.chapter-count,
.chapter-timer {
  margin: 0;
  letter-spacing: 0.02rem;
}

.chapter-count {
  color: #ffffff;
  font-weight: 700;
}

.chapter-timer {
  color: #d4d4d4;
  font-size: 0.95rem;
}

.story-scene {
  --scene-bg: url("../img/0.png");
  --scene-overlay-top: rgba(5, 7, 12, 0.3);
  --scene-overlay-bottom: rgba(3, 4, 8, 0.44);
  --char-size: clamp(3.8rem, 18vw, 9.3rem);
  --slot-1-x: 20%;
  --slot-1-y: -2%;
  --slot-1-scale: 1.08;
  --slot-1-opacity: 1;
  --slot-2-x: 76%;
  --slot-2-y: -1%;
  --slot-2-scale: 1;
  --slot-2-opacity: 1;
  --slot-3-x: 50%;
  --slot-3-y: 3%;
  --slot-3-scale: 0.85;
  --slot-3-opacity: 0;
  --slot-4-x: 14%;
  --slot-4-y: 0%;
  --slot-4-scale: 0.9;
  --slot-4-opacity: 0;
  --slot-5-x: 50%;
  --slot-5-y: 0%;
  --slot-5-scale: 0.9;
  --slot-5-opacity: 0;
  --slot-6-x: 84%;
  --slot-6-y: 0%;
  --slot-6-scale: 0.9;
  --slot-6-opacity: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  min-height: 15.4rem;
  border: 1px solid rgba(153, 153, 153, 0.62);
  background-color: #0d1019;
  background-image: linear-gradient(var(--scene-overlay-top), var(--scene-overlay-bottom)), var(--scene-bg);
  background-size: cover;
  background-position: center;
  max-width: 100%;
  isolation: isolate;
}

.story-scene::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 2px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.62);
  animation: scene-scan 4.8s linear infinite;
  z-index: 4;
  pointer-events: none;
}

.story-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/drafting-paper.svg");
  background-repeat: repeat;
  background-size: 240px 240px;
  opacity: 0.08;
  z-index: 1;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.scene-characters {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.scene-char {
  --slot-x: 50%;
  --slot-y: 0%;
  --slot-scale: 1;
  --slot-opacity: 1;
  --slot-fade-duration: 200ms;
  --slot-fade-delay: 300ms;
  --slot-fade-stagger: 300ms;
  --motion-name: none;
  --motion-duration: 2200ms;
  --motion-delay: 0ms;
  --motion-timing: ease-in-out;
  --motion-iteration-count: infinite;
  --motion-direction: alternate;
  position: absolute;
  left: clamp(calc(var(--char-size) / 2), var(--slot-x), calc(100% - (var(--char-size) / 2)));
  bottom: var(--slot-y);
  opacity: 0;
  transform: translateX(-50%) translateY(0.34rem) scale(var(--slot-scale));
  transform-origin: 50% 100%;
  width: var(--char-size);
  margin: 0;
  animation-name: slot-fade-in;
  animation-duration: var(--slot-fade-duration);
  animation-delay: calc(var(--slot-fade-delay) + (var(--slot-stagger-index, 0) * var(--slot-fade-stagger)));
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  pointer-events: none;
}

.scene-char img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  animation-name: var(--motion-name);
  animation-duration: var(--motion-duration);
  animation-delay: var(--motion-delay);
  animation-timing-function: var(--motion-timing);
  animation-iteration-count: var(--motion-iteration-count);
  animation-direction: var(--motion-direction);
  animation-fill-mode: both;
  filter:
    drop-shadow(0 0.18rem 0.3rem rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 0.46rem rgba(0, 0, 0, 0.3))
    drop-shadow(0 0 0.4rem rgba(252, 3, 144, 0.16));
}

.scene-char img.scene-char-image--remove-black {
  mix-blend-mode: screen;
  opacity: 0.98;
}

img.scene-char-image--remove-black {
  mix-blend-mode: screen;
  opacity: 0.98;
}

.scene-char img.scene-char-image--add {
  mix-blend-mode: screen;
  mix-blend-mode: plus-lighter;
  opacity: 0.96;
}

img.scene-char-image--add {
  mix-blend-mode: screen;
  mix-blend-mode: plus-lighter;
  opacity: 0.96;
}

.scene-char img.scene-char-image--remove-black-soft {
  mix-blend-mode: lighten;
  opacity: 0.95;
  filter:
    brightness(1.03)
    contrast(1.04)
    drop-shadow(0 0.12rem 0.2rem rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 0.28rem rgba(252, 3, 144, 0.1));
}

.scene-char--slot-1 {
  --slot-x: var(--slot-1-x);
  --slot-y: var(--slot-1-y);
  --slot-scale: var(--slot-1-scale);
  --slot-opacity: var(--slot-1-opacity);
}

.scene-char--slot-2 {
  --slot-x: var(--slot-2-x);
  --slot-y: var(--slot-2-y);
  --slot-scale: var(--slot-2-scale);
  --slot-opacity: var(--slot-2-opacity);
}

.scene-char--slot-3 {
  --slot-x: var(--slot-3-x);
  --slot-y: var(--slot-3-y);
  --slot-scale: var(--slot-3-scale);
  --slot-opacity: var(--slot-3-opacity);
}

.scene-char--slot-4 {
  --slot-x: var(--slot-4-x);
  --slot-y: var(--slot-4-y);
  --slot-scale: var(--slot-4-scale);
  --slot-opacity: var(--slot-4-opacity);
}

.scene-char--slot-5 {
  --slot-x: var(--slot-5-x);
  --slot-y: var(--slot-5-y);
  --slot-scale: var(--slot-5-scale);
  --slot-opacity: var(--slot-5-opacity);
}

.scene-char--slot-6 {
  --slot-x: var(--slot-6-x);
  --slot-y: var(--slot-6-y);
  --slot-scale: var(--slot-6-scale);
  --slot-opacity: var(--slot-6-opacity);
}

.story-block {
  margin-top: 0.68rem;
  border: 1px solid rgba(153, 153, 153, 0.54);
  background: rgba(12, 13, 21, 0.88);
  padding: 0.8rem 0.74rem;
  min-height: 8.4rem;
}

.story-block h2 {
  margin-bottom: 0.52rem;
  font-size: clamp(1.1rem, 4.8vw, 1.55rem);
}

.story-block p {
  margin: 0;
  color: #e7e7e7;
  line-height: 1.52;
  white-space: pre-line;
}

.story-controls {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-btn {
  border: 1px solid rgba(153, 153, 153, 0.7);
  background: rgba(28, 31, 47, 0.96);
  color: #ffffff;
  border-radius: 0.4rem;
  padding: 0.56rem 0.62rem;
  font: 700 0.9rem/1 "Chakra Petch", sans-serif;
  letter-spacing: 0.02rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.story-btn--dossier,
.story-btn--schematics {
  margin-top: 0.55rem;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.story-btn--dossier {
  border-color: rgba(255, 90, 90, 0.72);
  background: rgba(89, 25, 25, 0.94);
}

.story-btn--schematics {
  border-color: rgba(153, 153, 153, 0.78);
  background: rgba(45, 47, 58, 0.95);
}

.story-btn--accent {
  border-color: rgba(252, 3, 144, 0.8);
  background: rgba(138, 5, 84, 0.95);
}

.story-btn:hover,
.story-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(252, 3, 144, 0.3), 0 0 14px rgba(252, 3, 144, 0.24);
}

.story-social-row {
  padding: 1.5rem 0rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  overflow-x: auto;
}

.social-heading {
  margin: 1.35rem 0 0.55rem;
  text-align: center;
  color: #ffffff;
  font-size: 1.12rem;
  letter-spacing: 0.02rem;
}

.story-social-row .action-btn--link {
  flex: 0 0 auto;
  width: 3.05rem;
  height: 3.05rem;
  min-width: 3.05rem;
  padding: 0;
  border-radius: 999px;
  justify-content: center;
  gap: 0;
}

.story-social-row .social-label {
  display: none;
}

.story-social-row .social-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  background: transparent;
  box-shadow: none;
}

.story-social-row .action-btn--tellonym .social-icon {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(69, 0, 40, 0.35);
}

.story-social-row .social-icon-image--tellonym {
  mix-blend-mode: normal;
  filter: contrast(1.2) saturate(1.1);
}

.status {
  margin-top: 1.1rem;
  min-height: 1.5rem;
  text-align: center;
  letter-spacing: 0.03rem;
  color: #d3d3d3;
  padding: 0.46rem 0.8rem;
  border: 1px solid rgba(153, 153, 153, 0.44);
  border-radius: 999px;
  background: rgba(19, 20, 30, 0.72);
}

.status--flash {
  color: #ffffff;
  border-color: rgba(252, 3, 144, 0.7);
  box-shadow: 0 0 16px rgba(252, 3, 144, 0.3);
}

.site-footer {
  margin-top: 1rem;
  text-align: center;
  color: #c4c4c4;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes panel-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(252, 3, 144, 0.3),
      0 16px 28px rgba(0, 0, 0, 0.36),
      0 0 30px rgba(252, 3, 144, 0.18);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(252, 3, 144, 0.5),
      0 16px 28px rgba(0, 0, 0, 0.44),
      0 0 34px rgba(252, 3, 144, 0.3);
  }
}

@keyframes panel-scan {
  0% {
    transform: translateY(-24px);
    opacity: 0;
  }
  8% {
    opacity: 0.92;
  }
  48% {
    opacity: 1;
  }
  84% {
    opacity: 0.72;
  }
  100% {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
  }
}

@keyframes panel-scan-side {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  52% {
    opacity: 0.84;
  }
  86% {
    opacity: 0.48;
  }
  100% {
    transform: translateX(500%);
    opacity: 0;
  }
}

@keyframes title-flicker {
  0%,
  18%,
  22%,
  40%,
  52%,
  100% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(252, 3, 144, 0.7);
  }
  20%,
  21%,
  50% {
    opacity: 0.8;
    text-shadow: 0 0 6px rgba(252, 3, 144, 0.45);
  }
}

@keyframes neon-hum {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.14);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift-grid {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 22px, 22px 0;
  }
}

@keyframes scene-scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  84% {
    opacity: 0.84;
  }
  100% {
    transform: translateY(700px);
    opacity: 0;
  }
}

@keyframes slot-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0.34rem) scale(var(--slot-scale));
  }
  to {
    opacity: var(--slot-opacity);
    transform: translateX(-50%) translateY(0) scale(var(--slot-scale));
  }
}

@keyframes motion-left-to-right {
  from {
    transform: translateX(-0.45rem);
  }
  to {
    transform: translateX(0.45rem);
  }
}

@keyframes motion-right-to-left {
  from {
    transform: translateX(10.45rem);
  }
  to {
    transform: translateX(-0.45rem);
  }
}

@keyframes motion-top-down {
  from {
    transform: translateY(-150%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes motion-down {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(160%);
  }
}

@keyframes motion-zoom-in-out-constant {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1.05);
  }
}

@keyframes motion-scared {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(-0.1rem, 0.05rem) rotate(-1deg);
  }
  40% {
    transform: translate(0.11rem, -0.06rem) rotate(1deg);
  }
  60% {
    transform: translate(-0.12rem, 0.04rem) rotate(-1deg);
  }
  80% {
    transform: translate(0.1rem, -0.05rem) rotate(1deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-char {
    animation: none;
    opacity: var(--slot-opacity);
    transform: translateX(-50%) scale(var(--slot-scale));
  }

  .scene-char img {
    animation: none;
  }
}

@media (min-width: 680px) {
  body {
    padding: 1.5rem 1.2rem 2rem;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .story-frame {
    padding: 0.95rem;
  }

  .site-header {
    margin-bottom: 1.2rem;
  }

  .story-block {
    min-height: 9.4rem;
    padding: 0.95rem 0.9rem;
  }
}

@media (min-width: 1040px) {
  body {
    padding: 2.2rem 1.8rem 2.4rem;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .site-header {
    padding: 1.5rem 1.8rem 1.7rem;
  }

  .action-btn {
    font-size: 1rem;
  }
}
