:root {
  --ink: #2a2a2a;
  --muted: #a9a9a9;
  --soft-green: #bfd8a3;
  --soft-gold: #eddc79;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #fff;
}

body {
  display: grid;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    Arial, sans-serif;
  background: #f7f8f3;
  overflow-x: hidden;
  place-items: center;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.toolkit-shell {
  position: relative;
  container-type: size;
  width: min(100vw, calc(100svh * 16 / 9));
  height: min(100svh, calc(100vw * 9 / 16));
  min-height: 0;
  overflow: hidden;
  --page-pad-x: clamp(18px, 3.7cqw, 44px);
  --header-h: clamp(44px, 8.4cqh, 96px);
  background:
    radial-gradient(circle at 76% 42%, rgb(244 249 234 / 72%), transparent 16%),
    radial-gradient(circle at 24% 72%, rgb(242 250 234 / 64%), transparent 17%),
    #fff;
}

.page {
  position: absolute;
  inset: 0;
  padding-top: 0;
  pointer-events: none;
  transition:
    opacity 520ms ease,
    filter 520ms ease,
    transform 680ms cubic-bezier(0.2, 0.8, 0.18, 1);
}

.home-page {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.strategy-page {
  z-index: 3;
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  transform: translateY(18px) scale(1.02);
}

.toolkit-shell:is([data-page="gamification"], [data-page="multimodal"]) .home-page {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
  transform: scale(0.94);
}

.toolkit-shell[data-page="gamification"] .gamification-page,
.toolkit-shell[data-page="multimodal"] .multimodal-page {
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  min-height: var(--header-h);
  padding: clamp(13px, 3.5cqh, 29px) var(--page-pad-x) 0;
  animation: headerIn 660ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand-mark {
  display: block;
  flex: 0 1 clamp(190px, 36cqw, 430px);
  width: clamp(190px, 36cqw, 430px);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.25cqw, 32px);
  padding-top: 5px;
  white-space: nowrap;
}

.nav-link {
  position: relative;
  color: #111;
  font-size: clamp(10px, 1.42cqw, 17px);
  line-height: 1;
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.nav-link span {
  margin-left: 4px;
  color: #5f5f5f;
  font-size: 0.95em;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #b7d294;
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.nav-link:is(:hover, :focus-visible),
.nav-link.active {
  color: #000;
  outline: none;
  transform: translateY(-1px);
}

.nav-link:is(:hover, :focus-visible)::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.hero {
  position: relative;
  z-index: 2;
  display: block;
  min-height: calc(100cqh - var(--header-h));
  padding: clamp(32px, 10.2cqh, 108px) var(--page-pad-x) 0;
}

.sparkles {
  position: absolute;
  z-index: 0;
  top: clamp(32px, 8cqh, 92px);
  left: 50%;
  width: min(1020px, 92cqw);
  max-width: none;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0.9;
  animation: sparkleDrift 8.4s ease-in-out infinite both;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: heroIn 720ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 7px;
  color: #757575;
  font-size: clamp(13px, 2.1cqw, 25px);
  font-weight: 300;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: #272727;
  font-size: clamp(27px, 4.45cqw, 53px);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.1;
}

.subtitle {
  margin: clamp(10px, 2.6cqh, 22px) 0 0;
  color: #aaa;
  font-size: clamp(9px, 1.45cqw, 17px);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.12;
}

.strategy-row {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(clamp(150px, 21cqw, 250px), clamp(205px, 27.6cqw, 330px)));
  justify-content: center;
  gap: clamp(42px, 15.5cqw, 190px);
  width: min(870px, 100%);
  margin: clamp(20px, 4.2cqh, 46px) auto 0;
  animation: choicesIn 720ms 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.strategy-option {
  position: relative;
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition:
    opacity 190ms ease,
    transform 220ms ease,
    filter 220ms ease;
}

.strategy-option img {
  display: block;
  width: 100%;
  height: auto;
}

.strategy-option:is(:hover, :focus-visible),
.strategy-option.active {
  transform: translateY(-2px);
  filter: saturate(1.04);
  outline: none;
}

.strategy-option:not(.active) {
  opacity: 0.92;
}

.card-stage {
  position: absolute;
  right: 0;
  bottom: clamp(-82px, -7.4cqh, -50px);
  left: 0;
  z-index: 4;
  height: min(34cqh, 300px);
  pointer-events: none;
}

.card-cluster {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(49cqw, 584px);
  height: 100%;
  pointer-events: none;
}

.left-cluster {
  transform: translateX(-100%);
}

.right-cluster {
  transform: translateX(0);
}

.strategy-card {
  position: absolute;
  bottom: 0;
  width: clamp(105px, 16cqw, 190px);
  aspect-ratio: 0.78;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 16px 18px rgb(143 153 120 / 0.08));
  opacity: 0;
  pointer-events: auto;
  transform-origin: 50% 88%;
  transition:
    filter 200ms ease,
    transform 220ms ease;
}

.strategy-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.strategy-card:is(:hover, :focus-visible) {
  filter: drop-shadow(0 18px 22px rgb(126 140 103 / 0.18));
  outline: none;
}

.strategy-card.pressed {
  transition-duration: 120ms;
}

.avatar {
  left: -2px;
  animation: fanLeftAvatar 780ms 520ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.mapping {
  left: 35%;
  animation: fanLeftMapping 780ms 610ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.partner {
  left: 61%;
  animation: fanLeftPartner 780ms 700ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.rhythm {
  right: 61%;
  animation: fanRightRhythm 780ms 520ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.feedback {
  right: 35%;
  animation: fanRightFeedback 780ms 610ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.empathy {
  right: -2px;
  animation: fanRightEmpathy 780ms 700ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.game-sparkles {
  position: absolute;
  right: auto;
  bottom: clamp(8px, 3.5cqh, 36px);
  left: clamp(-72px, -3cqw, -18px);
  width: min(540px, 47cqw);
  pointer-events: none;
  opacity: 0.42;
  transform: rotate(-5deg);
}

.game-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: clamp(240px, 21cqw, 265px) minmax(0, 1fr);
  gap: clamp(18px, 1.8cqw, 24px);
  height: 100%;
  padding: clamp(86px, 15.5cqh, 112px) clamp(64px, 8.8cqw, 106px) clamp(10px, 2cqh, 22px)
    clamp(132px, 12cqw, 154px);
}

.game-card-area {
  position: relative;
  min-width: 0;
  height: 100%;
}

.game-title {
  width: clamp(216px, 20.2cqw, 242px);
  text-align: center;
}

.game-title h2 {
  margin: 0;
  color: #111;
  font-size: clamp(21px, 2.15cqw, 28px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
}

.game-title p {
  margin: 7px 0 0;
  color: #8c8c8c;
  font-size: clamp(12px, 1.25cqw, 16px);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.primary-card-wrap {
  position: relative;
  width: clamp(216px, 20.2cqw, 242px);
  margin-top: clamp(18px, 3.4cqh, 24px);
}

.game-card-primary {
  display: block;
  width: 100%;
  aspect-ratio: 0.78;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  filter: drop-shadow(0 18px 20px rgb(133 150 112 / 0.08));
  transform-origin: 49% 86%;
}

.game-card-primary img,
.preview-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.strategy-page.booting .game-card-primary {
  animation: extractPrimary 840ms 460ms cubic-bezier(0.16, 0.92, 0.18, 1) both;
}

.game-card-primary.retracting {
  animation: retractPrimary 360ms cubic-bezier(0.42, 0, 0.58, 1) both;
}

.game-card-primary.extracting {
  animation: extractPrimary 620ms cubic-bezier(0.16, 0.92, 0.18, 1) both;
}

.preview-card-row {
  position: absolute;
  bottom: clamp(-48px, -6.7cqh, -34px);
  left: clamp(16px, 1.5cqw, 22px);
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.preview-card {
  width: clamp(108px, 10.2cqw, 126px);
  aspect-ratio: 0.78;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 16px rgb(128 143 111 / 0.06));
  opacity: 0.48;
  transform-origin: 50% 100%;
  transition:
    filter 180ms ease,
    opacity 180ms ease,
    transform 200ms ease;
}

.preview-card:first-child {
  transform: rotate(-3deg);
}

.preview-card:nth-child(2) {
  margin-left: clamp(-34px, -2.2cqw, -22px);
  transform: translateY(10px) rotate(14deg);
}

.preview-card:is(:hover, :focus-visible) {
  filter: drop-shadow(0 14px 18px rgb(128 143 111 / 0.14));
  opacity: 0.82;
  outline: none;
}

.preview-card:first-child:is(:hover, :focus-visible) {
  transform: translateY(-8px) rotate(-2deg) scale(1.03);
}

.preview-card:nth-child(2):is(:hover, :focus-visible) {
  transform: translateY(2px) rotate(12deg) scale(1.03);
}

.strategy-page.booting .preview-card {
  animation: shrinkToPreview 760ms cubic-bezier(0.18, 0.9, 0.16, 1) both;
}

.strategy-page.switching .preview-card {
  opacity: 0.28;
}

.game-content {
  min-width: 0;
  padding-top: clamp(0px, 0.6cqh, 6px);
}

.game-tabs {
  display: flex;
  align-items: center;
  gap: clamp(30px, 4.4cqw, 58px);
  min-height: clamp(30px, 4.3cqh, 42px);
}

.game-tab {
  position: relative;
  padding: 0 0 9px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: clamp(14px, 1.45cqw, 17px);
  line-height: 1;
  letter-spacing: 0;
  transition:
    color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.game-tab span {
  margin-left: 4px;
  color: #666;
  font-size: 0.95em;
}

.game-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #b7d294;
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.game-tab:is(:hover, :focus-visible),
.game-tab.active {
  color: #000;
  outline: none;
  transform: translateY(-1px);
}

.game-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.game-detail {
  margin-top: clamp(22px, 3.8cqh, 30px);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 240ms ease,
    transform 280ms ease;
}

.game-detail.fading {
  opacity: 0;
  transform: translateY(8px);
}

.game-detail-image img {
  display: block;
  width: min(100%, 730px);
  height: auto;
}

.copy-panel,
.presentation-panel {
  display: grid;
  align-content: center;
  min-height: clamp(300px, 47cqh, 410px);
  max-width: 740px;
  color: #4f4f4f;
}

.copy-panel h3,
.presentation-panel h3 {
  margin: 0 0 14px;
  color: #2f2f2f;
  font-size: clamp(22px, 2.2cqw, 30px);
  font-weight: 400;
  line-height: 1.1;
}

.copy-panel p,
.presentation-panel p {
  max-width: 620px;
  margin: 0;
  font-size: clamp(15px, 1.45cqw, 18px);
  font-weight: 300;
  line-height: 1.75;
}

.presentation-panel {
  grid-template-columns: clamp(110px, 13cqw, 160px) minmax(0, 1fr);
  gap: clamp(22px, 3cqw, 36px);
  align-items: center;
}

.presentation-panel img {
  width: 100%;
  height: auto;
  opacity: 0.76;
  transform: rotate(-4deg);
}

@keyframes headerIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@keyframes choicesIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes sparkleDrift {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.01);
  }
}

@keyframes fanLeftAvatar {
  from {
    opacity: 0;
    transform: translateX(260px) translateY(54px) rotate(-4deg) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateX(-28px) translateY(13px) rotate(-13deg) scale(1);
  }
}

@keyframes fanLeftMapping {
  from {
    opacity: 0;
    transform: translateX(120px) translateY(48px) rotate(0deg) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateX(-36px) translateY(-10px) rotate(0deg) scale(1.02);
  }
}

@keyframes fanLeftPartner {
  from {
    opacity: 0;
    transform: translateX(20px) translateY(54px) rotate(2deg) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateX(-40px) translateY(10px) rotate(14deg) scale(1);
  }
}

@keyframes fanRightRhythm {
  from {
    opacity: 0;
    transform: translateX(-20px) translateY(54px) rotate(-2deg) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateX(40px) translateY(10px) rotate(-14deg) scale(1);
  }
}

@keyframes fanRightFeedback {
  from {
    opacity: 0;
    transform: translateX(-120px) translateY(48px) rotate(0deg) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateX(36px) translateY(-10px) rotate(0deg) scale(1.02);
  }
}

@keyframes fanRightEmpathy {
  from {
    opacity: 0;
    transform: translateX(-260px) translateY(54px) rotate(4deg) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateX(28px) translateY(13px) rotate(13deg) scale(1);
  }
}

@keyframes shrinkToPreview {
  from {
    opacity: 0.96;
    transform: translateY(-280px) rotate(0deg) scale(1.9);
  }
}

@keyframes extractPrimary {
  from {
    opacity: 0.5;
    transform: translateX(72px) translateY(168px) rotate(8deg) scale(0.48);
  }

  58% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes retractPrimary {
  from {
    opacity: 1;
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }

  to {
    opacity: 0.28;
    transform: translateX(76px) translateY(164px) rotate(8deg) scale(0.5);
  }
}

@media (hover: hover) {
  .avatar:hover {
    transform: translateX(-28px) translateY(-1px) rotate(-11deg) scale(1.03);
  }

  .mapping:hover {
    transform: translateX(-36px) translateY(-22px) rotate(0deg) scale(1.05);
  }

  .partner:hover {
    transform: translateX(-40px) translateY(-1px) rotate(12deg) scale(1.03);
  }

  .rhythm:hover {
    transform: translateX(40px) translateY(-1px) rotate(-12deg) scale(1.03);
  }

  .feedback:hover {
    transform: translateX(36px) translateY(-22px) rotate(0deg) scale(1.05);
  }

  .empathy:hover {
    transform: translateX(28px) translateY(-1px) rotate(11deg) scale(1.03);
  }
}

.rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgb(247 248 243 / 0.92);
  color: #2a2a2a;
  text-align: center;
}

.phone-icon {
  width: 42px;
  height: 70px;
  margin-bottom: 20px;
  border: 2px solid #b7d294;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgb(185 201 161 / 0.24);
  transform: rotate(90deg);
}

.phone-icon::after {
  display: block;
  width: 5px;
  height: 5px;
  margin: 58px auto 0;
  border-radius: 50%;
  background: #b7d294;
  content: "";
}

.rotate-hint p {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.rotate-hint span {
  margin-top: 8px;
  color: #777;
  font-size: 14px;
}

@media (max-width: 700px) and (orientation: portrait) {
  .toolkit-shell {
    filter: blur(1px);
    opacity: 0.18;
    pointer-events: none;
    transform: scale(0.92);
  }

  .rotate-hint {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
