* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%
}

:root {
  --brand: #d93a3a;
  --brand2: #f57c00;
  --accent: #ffcc4d;
  --ink: #1f2937;
  --ink2: #4b5563;
  --soft: #f8fafc;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, .12);
  --shadow-card: 0 8px 25px rgba(0, 0, 0, .06);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-bounce: cubic-bezier(.68, -0.55, .265, 1.55);
  --ease-smooth: cubic-bezier(.25, .46, .45, .94);
  --maxw: 1100px;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --gradient-primary: linear-gradient(135deg, var(--brand), var(--brand2));
  --gradient-accent: linear-gradient(135deg, var(--brand2), var(--accent));
  
  
  --hero-title-size: 2.5rem;
  --hero-title-size-mobile: 2rem;
  --section-title-size: 1.5rem;
  --section-title-size-mobile: 1.3rem;
  --card-title-size: 1.2rem;
  --card-title-size-mobile: 1.1rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(217, 58, 58, .12), transparent 60%),
    radial-gradient(1000px 600px at 110% 10%, rgba(245, 124, 0, .10), transparent 60%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  background-attachment: fixed;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(8px);
  background: rgba(255, 255, 255, .7);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.header-inner {
  max-width: var(--maxw);
  margin: auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand), var(--brand2), var(--accent), var(--brand));
  box-shadow: 0 0 0 3px rgba(217, 58, 58, .12)
}

.brand-title {
  font-size: 16px
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px
}

.progress {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  width: 200px
}

.progress>i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand2), var(--accent));
  transition: width .4s var(--ease)
}

.stage {
  flex: 1;
  display: flex;
  min-height: 0
}

#frame {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent
}

.footer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(6px);
  border-top: 1px solid #eee;
  z-index: 45
}

.footer-inner {
  max-width: var(--maxw);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  flex-wrap: wrap
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: var(--gradient-primary);
  color: white;
  border: 1px solid var(--brand);
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}

.btn.secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--ink);
  border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(217, 58, 58, 0.3);
}

.btn.ghost {
  background: transparent;
  color: var(--ink2);
  box-shadow: none
}

.btn:hover {
  transform: translateY(-1px)
}

.muted {
  color: var(--ink2)
}

.copy {
  margin-left: auto
}

@media (max-width:640px) {
  .brand-title {
    display: none
  }

  .copy {
    flex: 1 0 100%;
    text-align: center;
    margin-top: 6px
  }
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 16px
}

.section.center {
  display: grid;
  place-items: center
}

.cards {
  display: grid;
  gap: 16px
}

.cards.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.cards.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.cards.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(217, 58, 58, 0.2);
}

.card:hover::before {
  opacity: 1;
}

.lead {
  font-size: 20px;
  line-height: 1.6
}

.center {
  text-align: center
}

.reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.6s var(--ease-smooth);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}


.reveal {
  will-change: transform, opacity;
}

.reveal.in {
  will-change: auto;
}


.card:not(.flip .card) {
  animation: card-enter 0.7s var(--ease-smooth) forwards;
  opacity: 0;
}

.card.reveal.in:not(.flip .card) {
  animation: card-enter 0.7s var(--ease-smooth) forwards;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none
}

.toast.show {
  opacity: 1;
  transition: opacity .3s var(--ease)
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none
  }
}

.splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 800px at 50% -200px, rgba(255, 255, 255, .12), transparent 60%), #0b1020;
  color: #f1f5f9;
  display: grid;
  place-items: center;
  z-index: 100;
  overflow: hidden;
}

.splash .sky {
  position: absolute;
  inset: 0;
  overflow: hidden
}

.splash .title {
  position: relative;
  text-align: center;
  z-index: 2;
  max-width: 820px;
  padding: 0 16px
}

.splash h1 {
  font-size: 36px;
  margin: 0 0 10px 0
}

.splash p {
  margin: 0 0 16px 0;
  color: #cbd5e1
}

.splash .enter .btn {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border: 0
}

.shooting {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, .8);
  animation: shoot 1.6s linear forwards
}

@keyframes shoot {
  from {
    transform: translate3d(0, 0, 0)
  }

  to {
    transform: translate3d(600px, -300px, 0);
    opacity: 0
  }
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: .8;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9));
  animation: twinkle 2s infinite ease-in-out
}

@keyframes twinkle {

  0%,
  100% {
    opacity: .3;
    transform: translateY(0)
  }

  50% {
    opacity: 1;
    transform: translateY(-1px)
  }
}

.type {
  display: inline-block;
  border-right: 2px solid #cbd5e1;
  padding-right: 6px;
  white-space: nowrap;
  overflow: hidden
}

.badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 12px
}


:root {
  --gap: 16px;
  --tap: 44px;
  --fs-title: clamp(20px, 4.5vw, 28px);
  --fs-h1: clamp(24px, 6vw, 36px);
  --fs-h2: clamp(18px, 4.8vw, 28px);
  --fs-text: clamp(14px, 3.8vw, 18px);
}

body {
  font-size: var(--fs-text);
}

@supports (height: 100dvh) {
  .stage {
    min-height: calc(100dvh - 120px);
  }

}

@media (max-width: 820px) {
  .cards.cols-4 {
    grid-template-columns: 1fr 1fr
  }
}

@media (max-width: 640px) {
  .cards {
    gap: 12px
  }

  .cards.cols-4,
  .cards.cols-3,
  .cards.cols-2 {
    grid-template-columns: 1fr
  }

  .header-inner {
    padding: 8px 12px
  }

  .progress {
    width: 120px;
    height: 6px
  }

  .footer-inner {
    padding: 8px 12px;
    gap: 10px
  }

  .btn {
    min-height: var(--tap);
    padding: 12px 14px
  }

  .footer-inner>.btn {
    flex: 1
  }


  .copy {
    order: 3;
    flex: 1 0 100%;
    text-align: center
  }

  .lead {
    font-size: clamp(16px, 4.6vw, 20px)
  }

  .splash h1 {
    font-size: clamp(24px, 7.5vw, 32px);
  }
}


body {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.footer-inner {
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}


.card button,
.card label {
  min-height: var(--tap)
}

#frame {
  width: 100%;
}


textarea,
input,
select {
  font-size: 16px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(5px);
  transition: all 0.3s var(--ease-smooth);
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.1);
}

textarea:hover,
input:hover,
select:hover {
  border-color: rgba(217, 58, 58, 0.5);
}


@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none !important
  }

  .splash * {
    animation: none !important
  }
}


.splash .title {
  padding: clamp(10px, 4vw, 24px);
}

.splash .enter .btn {
  min-height: var(--tap);
  padding: 12px 18px
}


.splash h1 {
  word-break: break-word
}


@media (max-height: 620px) {
  .splash .title {
    max-width: 680px
  }

  .splash p {
    display: none
  }
}


@media (max-width: 380px) {
  .footer-inner {
    gap: 8px
  }

  .footer-inner>.btn {
    flex: 1 0 100%
  }
}


@media (max-width: 480px) {
  .splash .title {
    padding: 16px
  }

  .splash h1 {
    font-size: clamp(20px, 7vw, 28px);
    line-height: 1.25
  }

  .type {
    white-space: normal;
    word-break: break-word;
    display: inline
  }
}


.section>h2 {
  font-size: clamp(20px, 5.6vw, 34px);
  margin: 6px 0 14px;
  text-align: center
}

.hero {
  background: linear-gradient(180deg, rgba(217, 58, 58, .06), rgba(245, 124, 0, .04));
  border: 1px solid #f1d1d1
}

.card h3 {
  font-size: clamp(16px, 4.2vw, 20px);
  margin: 4px 0 8px
}

.card .lead {
  font-weight: 600
}

.card:focus-within {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .25)
}


.muted {
  color: #475569
}


.cards {
  gap: 18px
}

@media (max-width:640px) {
  .cards {
    gap: 14px
  }
}



.splash .badge {
  font-size: clamp(32px, 7.2vw, 48px);
  padding: 8px 16px;
  border-radius: 999px;
}

.splash .author-info {
  margin-top: 6px;
  font-size: clamp(14px, 3.8vw, 18px);
  color: #cbd5e1;

}

@media (max-width: 380px) {
  .splash .badge {
    font-size: clamp(28px, 8vw, 40px);
  }
}



.splash .title {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 12px 16px;
}

.splash .badge {
  margin-bottom: 8px;
}

.splash h1 {
  margin: 8px 0;
  line-height: 1.25;
}

.splash .author-info {
  margin-top: 6px;
  opacity: .95;
}

.splash .enter {
  margin-top: 14px;
}

@media (max-width: 420px) {
  .splash .title {
    padding: 10px 12px;
  }

  .splash h1 {
    font-size: clamp(22px, 7vw, 30px);
  }
}



.splash .author-info {
  margin-top: 12px;
  display: block;
}



.splash .title {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.splash h1 {
  margin-bottom: 8px;
}


.splash .orbit {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 6px auto 6px;
  pointer-events: none;
  animation: orbit-rotate 22s linear infinite;
  will-change: transform;
  opacity: .95;
}

.splash .chip {
  --N: 8;
  --radius: 140px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform:
    rotate(calc(360deg/var(--N) * var(--i))) translate(var(--radius)) rotate(calc(-1 * 360deg/var(--N) * var(--i)));
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

@keyframes orbit-rotate {
  from {
    transform: rotate(0deg)
  }

  to {
    transform: rotate(360deg)
  }
}


@media (max-width: 480px) {
  .splash .orbit {
    width: 260px;
    height: 260px
  }

  .splash .chip {
    --radius: 112px;
    padding: 5px 9px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .splash .orbit {
    animation: none
  }
}



.chips-carousel {
  margin: 8px auto 6px;
  max-width: 900px;
}

.chips-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px;
}

.chips-viewport::-webkit-scrollbar {
  display: none
}

.chips-rail {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.chip {
  scroll-snap-align: center;
}

.chips-ctrl {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px
}

@media (max-width: 480px) {
  .chips-rail {
    gap: 8px
  }
}


@media (prefers-reduced-motion: reduce) {
  .chips-viewport {
    scroll-behavior: auto;
  }
}



.chips-carousel .chip,
.chips-rail .chip {
  position: static !important;

  transform: none !important;

}

.chips-viewport {
  scroll-behavior: smooth;
}



.splash .title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: calc(100dvh - 160px);

  padding: 12px 16px;
  text-align: center;
}

.splash h1 {
  margin-bottom: 8px;
}

.splash .chips-carousel {
  margin-top: 10px;
}

.splash .author-info {
  margin-top: auto;
}


.splash .enter {
  margin-top: 8px;
}

@media (max-height: 620px) {
  .splash .title {
    min-height: calc(100dvh - 120px);
  }
}




.splash .title {
  display: grid;
  grid-template-rows: 1fr auto auto 1fr;

  justify-items: center;

  align-content: center;

  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;

  padding: 12px 16px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
}

.splash h1 {
  grid-row: 2;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.splash .chips-carousel {
  grid-row: 3;
  margin: 6px 0 0 0;
  max-width: min(900px, 100%);
}

.splash .author-info {
  grid-row: 4;
  align-self: end;
  margin-top: 12px;
}

.splash .enter {
  grid-row: 4;
  margin-top: 6px;
}


@media (max-width: 480px) {
  .splash .chips-viewport {
    padding-inline: 12px;
  }

  .splash .chips-rail {
    gap: 8px
  }

  .splash .chip {
    padding: 5px 9px;
  }
}


.splash {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}



.splash .title {
  display: grid;
  grid-template-rows: 1fr auto auto auto 1fr;

  justify-items: center;

  align-content: center;

  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;

  padding: 12px 16px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
}

.splash h1 {
  grid-row: 2;
  margin: 0 0 8px 0;
  line-height: 1.25;
}

.splash .chips-carousel {
  grid-row: 3;
  margin: 6px 0 0 0;
  max-width: min(900px, 100%);
}

.splash .author-info {
  grid-row: 4;
  align-self: start;
  margin-top: clamp(14px, 3.5vh, 28px);
}

.splash .enter {
  grid-row: 4;
  margin-top: 6px;
}


@media (max-width: 480px) {
  .splash .chips-viewport {
    padding-inline: 12px;
  }

  .splash .chips-rail {
    gap: 8px
  }

  .splash .chip {
    padding: 5px 9px
  }

  .splash .author-info {
    margin-top: clamp(12px, 4vh, 24px);
  }
}



.splash .title {
  box-sizing: border-box;
  max-width: min(92vw, 720px);
  margin-inline: auto;
  display: grid;
  grid-template-rows: 1fr auto auto auto 1fr;

  justify-items: center;
  align-content: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;

  padding: 12px 16px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
}

.splash h1 {
  grid-row: 2;
  margin: 0 0 8px 0;
  line-height: 1.25;
  font-size: clamp(20px, 7.2vw, 36px);

  overflow-wrap: anywhere;
  word-break: break-word;
}

.splash .chips-carousel {
  grid-row: 3;
  margin-top: 6px;
  width: 100%;
}

.splash .chips-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.splash .chips-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
}

.splash .chip {
  scroll-snap-align: center;
  white-space: nowrap;
}

.splash .author-info {
  grid-row: 4;
  align-self: start;
  margin-top: clamp(12px, 3.5vh, 24px);
  width: 100%;
}

.splash .enter {
  grid-row: 4;
  margin-top: 8px;
}

@media (max-width: 380px) {
  .splash h1 {
    font-size: clamp(18px, 6.5vw, 28px);
  }

  .splash .chips-rail {
    gap: 8px;
  }

  .splash .chip {
    padding: 5px 9px;
  }
}


.splash {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}




.splash h1 {
  overflow-wrap: anywhere;

  word-break: break-word;

  font-size: clamp(18px, 6.4vw, 34px);
}


.splash .title {
  grid-template-rows: 1fr auto auto auto auto 1fr;

}

.splash .author-info {
  grid-row: 4;
  margin-top: clamp(12px, 3vh, 24px);
}

.splash .enter {
  grid-row: 5;
  margin-top: 8px;
}


.splash .chips-carousel {
  width: 100%;
  max-width: min(900px, 100%);
}

.splash .chips-viewport {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.splash .chips-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
}

.splash .chip {
  white-space: nowrap;
  scroll-snap-align: center;
  font-size: clamp(12px, 3.6vw, 16px);
}

@media (max-width: 380px) {
  .splash h1 {
    font-size: clamp(16px, 6vw, 26px);
  }

  .splash .chips-rail {
    gap: 8px
  }

  .splash .chip {
    padding: 5px 9px
  }
}



.splash .title {
  max-width: min(92vw, 720px);
  margin-inline: auto;
}

.splash h1 {
  font-size: clamp(18px, 6.2vw, 34px);
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0 0 8px 0;
}

.splash .author-info {
  margin-top: clamp(12px, 3vh, 24px);
}

.splash .enter {
  margin-top: clamp(16px, 4vh, 32px);
  position: relative;
  z-index: 5;

}

.splash .chips-carousel {
  position: relative;
  z-index: 1;
}



.splash .title {
  max-width: min(94vw, 720px);
  margin-inline: auto;
  padding-inline: 12px;
  box-sizing: border-box;
}

.splash h1 {
  font-size: clamp(16px, 5.4vw, 30px);

  max-width: min(88vw, 640px);
  margin: 0 auto 8px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;

  word-break: break-word;

  line-break: loose;

}

@media (max-width: 360px) {
  .splash h1 {
    font-size: clamp(15px, 5.2vw, 24px);
  }
}


.splash .chips-carousel {
  width: 100%;
  max-width: 100%;
}

.splash .chips-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-inline: 8px;
}

.splash .chips-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.splash .chip {
  white-space: nowrap;
  scroll-snap-align: center;
  font-size: clamp(12px, 3.6vw, 16px);
}


.splash .author-info {
  margin-top: clamp(12px, 3vh, 24px);
}

.splash .enter {
  margin-top: clamp(16px, 4vh, 32px);
  position: relative;
  z-index: 5;
  pointer-events: auto;
}



.puzzle-3x3 .puzzle-wrap {
  display: flex;
  justify-content: center;
}

.puzzle-3x3 {
  --tile: 96px;
}

.puzzle-3x3 {
  --tile: 96px;
}

.puzzle-3x3 .board {
  width: calc(var(--tile) * 3);
  height: calc(var(--tile) * 3);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px auto;
  background: rgba(255, 255, 255, .04);
  border: 1px dashed rgba(255, 255, 255, .2);
  border-radius: 10px;
}

.puzzle-3x3 .slot {
  width: var(--tile);
  height: var(--tile);
  background: rgba(255, 255, 255, .04);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, .15);
  background-size: 300% 300%;
  background-repeat: no-repeat;
}

.puzzle-3x3 .slot.filled {
  border-style: solid;
}

.puzzle-3x3 .tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: calc(var(--tile) + 4px);
}

.puzzle-3x3 .piece {
  width: var(--tile);
  height: var(--tile);
  background-size: 300% 300%;
  background-repeat: no-repeat;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

@media (max-width: 520px) {
  .puzzle-3x3 {
    --tile: 96px;
  }

  .puzzle-3x3 .board {
    --tile: 88px;
  }
}

@media (max-width: 420px) {
  .puzzle-3x3 {
    --tile: 96px;
  }

  .puzzle-3x3 .board {
    --tile: 78px;
  }
}



.puzzle-3x3 .slot {
  position: relative;
  overflow: hidden;
}

.puzzle-3x3 .slot .piece {
  position: absolute;
  inset: 0;
  background-size: 300% 300%;
  background-repeat: no-repeat;
  border-radius: 8px;
}



.puzzle-3x3 {
  --tile: 96px;
}

.puzzle-3x3 .board {
  position: relative;
  border: 2px solid rgba(var(--grid-color-rgb), .85);
}

.puzzle-3x3 .board::before {
  content: none;
}



.puzzle-3x3 .board,
.puzzle-3x3 .slot,
.puzzle-3x3 .piece {
  box-sizing: border-box;
}

.puzzle-3x3 .slot {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.puzzle-3x3 .slot .piece {
  position: absolute;
  inset: 0;
  background-size: 300% 300%;
  background-repeat: no-repeat;
  border-radius: 8px;
  transform: translateZ(0);

  z-index: 2;

}

.puzzle-3x3 .board::before {
  content: none;
}





.puzzle-3x3 .tray,
.puzzle-3x3 {
  --tile: 96px;
}

.puzzle-3x3 .board {
  touch-action: none;
}


.puzzle-3x3 .piece.placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06));
  position: relative;
}

.puzzle-3x3 .piece.placeholder::after {
  content: attr(data-num);
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 12px;
  opacity: .8;
}



.puzzle-3x3 .puzzle-win {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  z-index: 9999;
  animation: fadeIn .18s ease-out;
}

.puzzle-3x3 .win-card {
  background: rgba(255, 255, 255, .92);
  color: #111;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  padding: 20px 22px;
  min-width: 260px;
  text-align: center;
}

.puzzle-3x3 .win-card h3 {
  font-size: 20px;
  margin: 0 0 6px;
}

.puzzle-3x3 .win-card p {
  margin: 0 0 12px;
  color: #333;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}


.puzzle-3x3 .confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.puzzle-3x3 .confetti {
  position: absolute;
  top: -10px;
  left: var(--x);
  width: 6px;
  height: 10px;
  background: hsl(calc(var(--h, 0) * 1deg), 80%, 60%);
  transform: rotate(0deg) translateZ(0);
  animation: fall var(--d) ease-in forwards;
}

.puzzle-3x3 .confetti:nth-child(4n) {
  background: #ff6b6b
}

.puzzle-3x3 .confetti:nth-child(4n+1) {
  background: #ffd93d
}

.puzzle-3x3 .confetti:nth-child(4n+2) {
  background: #6bcBef
}

.puzzle-3x3 .confetti:nth-child(4n+3) {
  background: #95e06c
}

@keyframes fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(70vh) rotate(540deg);
    opacity: 0;
  }
}


.puzzle-3x3 .sr-live {
  position: absolute;
  left: -9999px;
}



.puzzle-3x3 .card {
  position: relative;
}

.puzzle-3x3 .board {
  position: relative;
  border: 2px solid rgba(var(--grid-color-rgb), .85);
  overflow: hidden;
  z-index: 1;
}

.puzzle-3x3 .slot .piece {
  z-index: 2;
}

.puzzle-3x3 .actions {
  position: relative;
  z-index: 5;
}





.puzzle-3x3 {

  --grid-thickness: 2px;

  --grid-color-rgb: 160, 160, 165;

  --grid-alpha: .85;

}

.puzzle-3x3 .board {
  position: relative;

}

.puzzle-3x3 .board::before {
  content: none;
}

.puzzle-3x3 .slot .piece {
  z-index: 2;
  position: absolute;
  inset: 0;
}


.puzzle-3x3 .grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.puzzle-3x3 .grid-lines .line {
  position: absolute;
  background: rgba(var(--grid-color-rgb), var(--grid-alpha));
  border-radius: 1px;
}

.puzzle-3x3 .grid-lines .v1 {
  top: 0;
  bottom: 0;
  width: var(--grid-thickness);
  left: calc(var(--tile) + (var(--gap) / 2));
}

.puzzle-3x3 .grid-lines .v2 {
  top: 0;
  bottom: 0;
  width: var(--grid-thickness);
  left: calc(var(--tile)*2 + var(--gap)*1.5);
}

.puzzle-3x3 .grid-lines .h1 {
  left: 0;
  right: 0;
  height: var(--grid-thickness);
  top: calc(var(--tile) + (var(--gap) / 2));
}

.puzzle-3x3 .grid-lines .h2 {
  left: 0;
  right: 0;
  height: var(--grid-thickness);
  top: calc(var(--tile)*2 + var(--gap)*1.5);
}


.hero-title {
  font-size: var(--hero-title-size);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 16px 0;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--ink2);
  margin: 0 0 8px 0;
  text-align: center;
}

.hero-description {
  font-size: 1rem;
  color: var(--ink2);
  margin: 0 0 32px 0;
  text-align: center;
}

.section-title {
  font-size: var(--section-title-size);
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px 0;
  color: var(--ink);
}

.card-title {
  font-size: var(--card-title-size);
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--ink);
}


.unified-card {
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: all 0.3s var(--ease-smooth);
}

.unified-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(217, 58, 58, 0.2);
}


.unified-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.unified-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.unified-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}


@media (max-width: 768px) {
  .hero-title {
    font-size: var(--hero-title-size-mobile);
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: var(--section-title-size-mobile);
  }
  
  .card-title {
    font-size: var(--card-title-size-mobile);
  }
  
  .unified-grid-2,
  .unified-grid-3,
  .unified-grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}