/* stp:base */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;700;800;900&family=Roboto:wght@400;500&display=swap');

:root {
  --bg: #f1edfe;
  --white: #ffffff;
  --blue: #7132f5;
  --blue-dark: #5a1fd6;
  --black: #121212;
  --text: #0f2024;
  --gray: #61574f;
  --panel: #d4def1;
  --hero-from: #f0e9ff;
  --hero-to: #dfdffb;
  --shadow-header: rgba(115, 98, 98, 0.1);
  --font: 'Nunito', sans-serif;
  --font-btn: 'Roboto', sans-serif;
}

html { font-size: calc(100vw / 1440 * 10); overflow-x: hidden; overflow-y: scroll; }
@media (max-width: 1024px) { html { font-size: calc(100vw / 1024 * 10); } }
@media (max-width: 640px) { html { font-size: calc(100vw / 375 * 10); } }
html.menu-lock, html.menu-lock body { overflow: hidden; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-width: 0;
  background: var(--bg);
  color: var(--black);
  font-family: var(--font);
  font-size: clamp(14px, 1.6rem, 1.6rem);
  font-weight: 400;
  line-height: 1.44;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
main { padding-top: 6.2rem; }
section { margin: 0; }

#preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
#preloader img { width: 6.4rem; height: 6.4rem; }

.container { width: 100%; max-width: 131.2rem; margin: 0 auto; }

.section-title {
  font-size: 6.2rem; font-weight: 900; line-height: 1.04; letter-spacing: -0.124rem;
  color: var(--blue); text-align: center;
}

@keyframes store-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1rem); }
}

.store-btn {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  width: 24rem; padding: 1.2rem 2rem; border-radius: 1.6rem;
  background: var(--blue); color: var(--white);
  font-family: var(--font-btn);
  transition: background-color 0.3s, box-shadow 0.3s, opacity 0.3s;
}
.store-btn img { width: 3rem; height: 3.4rem; flex-shrink: 0; }
.store-btn-text { display: flex; flex-direction: column; gap: 0.4rem; width: 11.8rem; line-height: normal; text-align: left; }
.store-btn-top { font-size: clamp(14px, 1.4rem, 1.4rem); font-weight: 400; }
.store-btn-name { font-size: clamp(14px, 1.8rem, 1.8rem); font-weight: 500; }
.store-btn:hover { background: var(--blue-dark); box-shadow: 0 0.8rem 2rem rgba(113, 50, 245, 0.35); animation-play-state: paused; }

.nav-link {
  display: flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--blue); border-radius: 5rem;
  color: var(--black);
  font-size: clamp(14px, 1.6rem, 1.6rem); font-weight: 500; line-height: 1.44;
  text-transform: uppercase; text-align: center; white-space: nowrap;
}
.nav-link:hover { background: var(--blue); color: var(--white); }

.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: var(--white);
  box-shadow: 0 0.4rem 0.6rem var(--shadow-header);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 0.4rem 1.2rem rgba(115, 98, 98, 0.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 6.2rem; padding: 0 8rem; }
.logo { display: block; width: 4rem; height: 4rem; border-radius: 0.4rem; overflow: hidden; transition: opacity 0.3s; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo:hover { opacity: 0.8; }
.nav { display: flex; align-items: center; gap: 3.2rem; }

.burger-btn {
  display: none; position: relative; flex-shrink: 0;
  width: 4rem; height: 4rem; background: transparent; border: 0; z-index: 101;
}
.burger-btn span {
  position: absolute; left: 0.5rem; width: 3rem; height: 0.3rem; border-radius: 0.2rem;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s, top 0.3s, background-color 0.3s;
}
.burger-btn span:nth-child(1) { top: 1rem; }
.burger-btn span:nth-child(2) { top: 1.85rem; }
.burger-btn span:nth-child(3) { top: 2.7rem; }
.burger-btn:hover span { background: var(--blue); }
.burger-btn.act span:nth-child(1) { top: 1.85rem; transform: rotate(45deg); }
.burger-btn.act span:nth-child(3) { top: 1.85rem; transform: rotate(-45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }

#mobile-menu {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2rem;
  padding-top: 6.2rem;
  background: linear-gradient(119.42deg, var(--hero-from) 0%, var(--hero-to) 100%);
  border-radius: 0 0 8rem 8rem;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#mobile-menu::before {
  content: ''; position: absolute; inset: 0;
  background: url('../img/hero-bg.webp') center / cover no-repeat;
  opacity: 0.6;
}
#mobile-menu::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-bottom: 1.6rem solid var(--white); border-radius: 0 0 8rem 8rem;
}
#mobile-menu .nav-link { position: relative; z-index: 1; }
#mobile-menu.opened { opacity: 1; pointer-events: auto; }

@media (max-width: 1024px) {
  .header .nav { display: none; }
  .burger-btn { display: block; }
}

@media (max-width: 640px) {
  main { padding-top: 5.2rem; }
  .container { max-width: 100%; }
  .section-title { font-size: 4.2rem; letter-spacing: -0.084rem; }
  .header-inner { height: 5.2rem; padding: 0 1.6rem; }
  #mobile-menu { padding-top: 5.2rem; border-radius: 0 0 6.4rem 6.4rem; }
  #mobile-menu::after { border-bottom-width: 1.2rem; border-radius: 0 0 6.4rem 6.4rem; }
  .store-btn { width: 100%; }
}
/* /stp:base */
/* stp:hero */
.hero {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 75rem;
  border-radius: 0 0 8rem 8rem;
  overflow: hidden;
  background: linear-gradient(119.42deg, var(--hero-from) 0%, var(--hero-to) 100%);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0.6; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-bottom: 1.6rem solid var(--white); border-radius: 0 0 8rem 8rem;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 3.2rem;
  width: 100%; padding: 0 6.4rem;
}
.hero-main { display: flex; flex-direction: column; align-items: center; gap: 2.4rem; flex-shrink: 0; width: 63.8rem; }
.hero-logo { width: 100%; aspect-ratio: 2048 / 1152; object-fit: cover; }
.hero-body { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; width: 48.2rem; text-align: center; }
.hero-title { font-size: 3.2rem; font-weight: 800; line-height: 1.44; color: var(--black); }
.hero-text { width: 31rem; font-size: clamp(14px, 1.6rem, 1.6rem); line-height: 1.44; color: var(--black); }
.hero .store-btn { animation: store-float 3s ease-in-out infinite; }
.hero-puzzle { flex-shrink: 0; width: 48.2rem; height: 38.2rem; object-fit: cover; }

@media (max-width: 1024px) {
  .hero-inner { flex-direction: column; gap: 4.8rem; padding: 6rem 3.2rem; }
}

@media (max-width: 640px) {
  .hero { min-height: 76rem; border-radius: 0 0 6.4rem 6.4rem; }
  .hero::after { border-bottom-width: 1.2rem; border-radius: 0 0 6.4rem 6.4rem; }
  .hero-inner { gap: 4.8rem; padding: 0 1.6rem; }
  .hero-main { width: 100%; }
  .hero-body { width: 100%; }
  .hero-title { font-size: 2.2rem; }
  .hero-puzzle { width: 24.7rem; height: 19.6rem; }
}
/* /stp:hero */
/* stp:about */
.about { padding: 8rem 6.4rem 6.4rem; }
.about-inner { display: flex; align-items: center; gap: 6.4rem; }
.about-text { display: flex; flex-direction: column; justify-content: center; gap: 2.4rem; flex-shrink: 0; width: 52.8rem; }
.about-title { text-align: left; }
.about-body { display: flex; flex-direction: column; gap: 0.8rem; font-size: clamp(14px, 1.6rem, 1.6rem); line-height: 1.44; color: var(--text); }
.about-img {
  position: relative; flex: 1 1 0; min-width: 0; height: 41.4rem;
  border: 1.2rem solid var(--white); border-radius: 8rem; overflow: hidden;
}
.about-bg { position: absolute; top: -1.2rem; left: -1.2rem; width: calc(100% + 1.6rem); height: 41.4rem; max-width: none; object-fit: cover; }
.about-card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 28.6rem; height: 33.6rem; max-width: none; object-fit: cover;
  border: 2px solid var(--white); border-radius: 0.4rem;
}

@media (max-width: 1024px) {
  .about { padding: 6.4rem 3.2rem; }
  .about-inner { flex-direction: column; align-items: stretch; gap: 4rem; }
  .about-text { width: 100%; }
  .about-img { flex: none; width: 100%; }
}

@media (max-width: 640px) {
  .about { padding: 4.8rem 1.6rem 3.2rem; }
  .about-inner { gap: 2.4rem; }
  .about-text { gap: 1.6rem; }
  .about-img { height: 41.4rem; border-width: 0.8rem; border-radius: 5.6rem; }
  .about-bg { top: -0.8rem; left: -0.8rem; width: 73.6rem; }
  .about-card { width: 21.3rem; height: 25.1rem; }
}
/* /stp:about */
/* stp:how-to-play */
.slider-track {
  display: flex; align-items: stretch; gap: 3.2rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { flex: 0 0 41.6rem; scroll-snap-align: start; }
.slider-nav { display: flex; justify-content: center; gap: 3.2rem; margin-top: 3.2rem; }
.slider-btn {
  display: flex; align-items: center; justify-content: center;
  width: 7.4rem; height: 4.8rem; padding: 0;
  background: transparent; border: 1px solid var(--blue); border-radius: 4rem;
  transition: background-color 0.3s, opacity 0.3s, transform 0.3s;
}
.slider-btn img { width: 2rem; height: 1.6rem; transition: filter 0.3s; }
.slider-prev img { transform: scaleX(-1); }
.slider-btn:hover { background: var(--blue); }
.slider-btn:hover img { filter: brightness(0) invert(1); }
.slider-btn:active { transform: scale(0.96); }
.slider-btn.is-disabled { opacity: 0.4; }

.howto { padding: 6.4rem; }
.howto-inner { display: flex; flex-direction: column; align-items: stretch; gap: 4.8rem; }
.play-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem;
  min-height: 26rem; padding: 4rem; border-radius: 6.4rem; background: var(--white);
}
.play-icon { width: 7.8rem; height: 8.4rem; flex-shrink: 0; }
.play-body { display: flex; flex-direction: column; gap: 0.8rem; width: 100%; }
.play-title { font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--blue); }
.play-text { font-size: clamp(14px, 1.6rem, 1.6rem); line-height: 1.44; color: var(--black); }

@media (max-width: 1024px) {
  .howto { padding: 6.4rem 3.2rem; }
}

@media (max-width: 640px) {
  .slider-track { gap: 1.6rem; }
  .slider-track > * { flex-basis: 100%; }
  .slider-nav { margin-top: 2.4rem; }
  .howto { padding: 3.2rem 1.6rem; }
  .howto-inner { gap: 2.4rem; }
  .play-card { min-height: 22.4rem; padding: 2.4rem; border-radius: 4rem; }
  .play-title { font-size: clamp(14px, 1.8rem, 1.8rem); }
}
/* /stp:how-to-play */
/* stp:gallery */
.gallery { padding: 6.4rem; }
.gallery-inner { display: flex; flex-direction: column; align-items: stretch; gap: 4.8rem; }
.gallery-card { position: relative; height: 55.5rem; border-radius: 6.4rem; overflow: hidden; background: var(--white); }
.gallery-card img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.gallery-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: 1.2rem solid var(--white); border-radius: 6.4rem;
}

@media (max-width: 1024px) {
  .gallery { padding: 6.4rem 3.2rem; }
}

@media (max-width: 640px) {
  .gallery { padding: 3.2rem 1.6rem; }
  .gallery-inner { gap: 2.4rem; }
  .gallery-card { height: 42.1rem; border-radius: 5.6rem; }
  .gallery-card::after { border-width: 0.8rem; border-radius: 5.6rem; }
  .gallery .slider-track > * { flex-basis: 31.6rem; }
}
/* /stp:gallery */
/* stp:faq */
.faq { padding: 6.4rem; }
.faq-wrap { display: flex; justify-content: center; }
.faq-panel {
  display: flex; flex-direction: column; align-items: center; gap: 4.8rem;
  width: 100%; max-width: 108.8rem; padding: 6.4rem 11.2rem;
  border-radius: 12rem; background: var(--panel);
}
.faq-list { display: flex; flex-direction: column; gap: 2.4rem; width: 100%; }
.faq-item { display: flex; align-items: center; gap: 0.8rem; }
.faq-item.open { align-items: flex-start; }
.faq-box {
  flex: 1 1 0; min-width: 0; cursor: pointer;
  padding: calc(2rem - 1px) calc(2.4rem - 1px);
  border: 1px solid transparent; border-radius: 1.6rem; background: var(--white);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq-box:hover { box-shadow: 0 0.4rem 1.2rem rgba(113, 50, 245, 0.18); }
.faq-item.open .faq-box { border-color: var(--blue); }
.faq-q { font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--blue); }
.faq-a { display: none; margin-top: 0.8rem; font-size: clamp(14px, 1.6rem, 1.6rem); line-height: 1.44; color: var(--gray); }
.faq-item.open .faq-a { display: block; }
.faq-toggle {
  flex: 0 0 7rem; width: 7rem; height: 7rem; padding: 0; border: 0;
  background: url('../img/plus.svg') center / 100% 100% no-repeat;
  transition: transform 0.3s, opacity 0.3s;
}
.faq-item.open .faq-toggle { background-image: url('../img/minus.svg'); }
.faq-toggle:hover { transform: scale(1.06); opacity: 0.85; }

@media (max-width: 1024px) {
  .faq { padding: 6.4rem 3.2rem; }
  .faq-panel { padding: 6.4rem 4rem; border-radius: 8rem; }
}

@media (max-width: 640px) {
  .faq { padding: 3.2rem 1.6rem; }
  .faq-panel { gap: 2.4rem; padding: 4rem 1.6rem; border-radius: 5.6rem; }
  .faq-list { gap: 1.6rem; }
  .faq-item, .faq-item.open { align-items: flex-start; }
  .faq-q { font-size: clamp(14px, 1.8rem, 1.8rem); }
}
/* /stp:faq */
/* stp:contact */
.contact { padding: 4rem 17.6rem 8rem; }
.contact-inner { display: flex; flex-direction: column; align-items: center; gap: 2.4rem; text-align: center; }
.contact-lead { font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--black); }
.contact-mail {
  font-size: 4.2rem; font-weight: 800; line-height: 1.04; letter-spacing: -0.084rem;
  text-transform: uppercase; color: var(--blue); overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--blue-dark); opacity: 0.85; }

@media (max-width: 1024px) {
  .contact { padding: 4rem 3.2rem 8rem; }
}

@media (max-width: 640px) {
  .contact { padding: 3.2rem 1.6rem 4.8rem; }
  .contact-inner { align-items: flex-start; gap: 1.6rem; text-align: left; }
  .contact-lead { font-size: clamp(14px, 1.8rem, 1.8rem); }
  .contact-mail { font-size: 2.2rem; letter-spacing: -0.044rem; }
}
/* /stp:contact */
/* stp:footer */
.footer { background: var(--white); }
.footer-inner { display: flex; flex-direction: column; gap: 6rem; padding: 6rem 0; }
.footer-links { display: flex; align-items: center; justify-content: flex-end; gap: 6rem; padding: 0 8.8rem; }
.footer-links a { font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--black); text-align: center; white-space: nowrap; }
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-size: clamp(14px, 1.6rem, 1.6rem); line-height: 1.44; color: var(--black); text-align: center; }

@media (max-width: 1024px) {
  .footer-links { padding: 0 3.2rem; }
}

@media (max-width: 640px) {
  .footer-inner { gap: 2.4rem; padding: 6rem 1.6rem; }
  .footer-links { flex-direction: column; justify-content: center; gap: 0.8rem; padding: 0; }
  .footer-links a { font-size: clamp(14px, 1.8rem, 1.8rem); }
}
/* /stp:footer */
/* stp:legal */
.legal-body { min-height: 100vh; display: flex; flex-direction: column; }
.legal-main { flex: 1 0 auto; }
.legal-page { padding: 8rem 6.4rem; }
.legal-content { width: 100%; max-width: 101.6rem; margin: 0 auto; color: var(--black); }
.legal-content > :last-child { margin-bottom: 0; }
.legal-content h1 {
  margin-bottom: 4rem;
  font-size: 6.2rem; font-weight: 900; line-height: 1.04; letter-spacing: -0.124rem; color: var(--blue);
}
.legal-content h2 { margin: 4rem 0 1.6rem; font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--black); }
.legal-content h3, .legal-content h4 {
  margin: 2.4rem 0 1.2rem;
  font-size: clamp(14px, 1.8rem, 1.8rem); font-weight: 700; line-height: 1.2; color: var(--black);
}
.legal-content h1 + h2 { margin-top: 0; }
.legal-content p, .legal-content li { font-size: clamp(14px, 1.6rem, 1.6rem); font-weight: 400; line-height: 1.44; }
.legal-content p { margin: 0 0 1.6rem; }
.legal-content ul, .legal-content ol { margin: 0 0 1.6rem; padding-left: 2.4rem; }
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 0.8rem; }
.legal-content li:last-child { margin-bottom: 0; }
.legal-content a { color: var(--blue); text-decoration: underline; overflow-wrap: anywhere; }
.legal-content a:hover { color: var(--blue-dark); }
.legal-content strong, .legal-content b { font-weight: 700; }
.legal-content em, .legal-content i { font-style: italic; }
.legal-content u { text-decoration: underline; }

@media (max-width: 1024px) {
  .legal-page { padding: 6.4rem 3.2rem; }
}

@media (max-width: 640px) {
  .legal-page { padding: 6.4rem 1.6rem; }
  .legal-content h1 { margin-bottom: 4rem; font-size: 4.2rem; letter-spacing: -0.084rem; }
  .legal-content h2 { margin: 3.2rem 0 1.6rem; font-size: clamp(14px, 1.8rem, 1.8rem); }
}
/* /stp:legal */
/* stp:title-anim */
.anim-on .hero-title .ta-w,
.anim-on .section-title .ta-w { display: inline-block; white-space: nowrap; }
.anim-on .hero-title .ta-ch { display: inline-block; opacity: 0; --k: 1; --sd: 0.9s; }
.anim-on .hero-title.is-in .ta-ch {
  animation:
    ta-sort var(--sd) cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.8s + var(--i) * 0.035s) both,
    ta-glint 0.9s ease-in-out calc(1.75s + var(--i) * 0.03s);
}
.anim-on .hero-title.is-in .ta-gem .ta-ch {
  animation:
    ta-sort var(--sd) cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.8s + var(--i) * 0.035s) both,
    ta-glint-loop 6s ease-in-out calc(1.75s + var(--i) * 0.03s) infinite;
}
@keyframes ta-sort {
  0% {
    opacity: 0;
    transform: translate(calc(var(--dx) * var(--k) * 0.6rem), calc(var(--dy) * var(--k) * 0.8rem)) rotate(calc(var(--r) * 14deg)) scale(0.5);
    filter: blur(0.4rem);
  }
  45% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes ta-glint {
  45% { color: var(--blue); filter: drop-shadow(0 0 0.5rem rgba(113, 50, 245, 0.5)); }
}
@keyframes ta-glint-loop {
  0%, 15%, 100% { color: var(--black); filter: none; }
  7% { color: var(--blue); filter: drop-shadow(0 0 0.5rem rgba(113, 50, 245, 0.5)); }
}

.anim-on .section-title .ta-w {
  --ty: 1.2rem; --fd: 0.9s;
  opacity: 0;
  transform: translateY(var(--ty));
  clip-path: polygon(-20% -30%, -20% -30%, -45% 130%, -45% 130%);
}
.anim-on .section-title.is-in .ta-w {
  animation:
    ta-facet var(--fd) cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 0.12s) both,
    ta-facet-glint 0.8s ease-out calc(0.55s + var(--i) * 0.12s);
}
@keyframes ta-facet {
  0% { opacity: 0; transform: translateY(var(--ty)); clip-path: polygon(-20% -30%, -20% -30%, -45% 130%, -45% 130%); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: none; clip-path: polygon(-20% -30%, 145% -30%, 120% 130%, -45% 130%); }
}
@keyframes ta-facet-glint {
  50% { filter: brightness(1.45) drop-shadow(0 0 0.6rem rgba(113, 50, 245, 0.45)); }
}

@media (max-width: 640px) {
  .anim-on .hero-title .ta-ch { --k: 0.5; --sd: 0.75s; }
  .anim-on .section-title .ta-w { --ty: 0.8rem; --fd: 0.7s; }
}
/* /stp:title-anim */
/* stp:loop-slider */
.slider-track { cursor: grab; }
.slider-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.slider-track img { -webkit-user-drag: none; }
/* Desktop: no manual scrolling (wheel, trackpad, drag) - arrows only. */
@media (min-width: 1025px) {
  .slider-track { overflow-x: hidden; cursor: auto; }
}
/* /stp:loop-slider */
