:root {
  --green: #4f6b4f;
  --light-green: #a6bca1;
  --brown: #2f2a26;
  --cream: #f3f0e6;
  --rose: #b85c5c;
  --gold: #d6b75a;
  --purple: #766a94;
  --soft-white: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--brown);
  font-family: Georgia, "Times New Roman", serif;
  background: #f8f3e8;
}

img {
  max-width: 100%;
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 240, 230, 0.95);
  border-bottom: 1px solid rgba(79, 107, 79, 0.2);
}

.topbar-inner {
  width: 92%;
  max-width: 1150px;
  margin: auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.small-logo {
  width: 54px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  color: var(--green);
  text-decoration: none;
  font-weight: bold;
}

.nav-links a:hover {
  color: var(--rose);
}

.menu-button {
  display: none;
  padding: 10px 18px;
  border: 0;
  border-radius: 25px;
  background: var(--green);
  color: var(--cream);
  font-weight: bold;
}

.hero,
.section {
  width: 92%;
  max-width: 1150px;
  margin: auto;
  padding: 80px 0;
}

.hero {
  min-height: calc(100vh - 86px);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.small-title {
  margin: 0 0 12px;
  color: var(--rose);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: bold;
}

h1,
h2,
h3 {
  color: var(--green);
}

h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.96;
}

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.main-logo {
  width: min(260px, 58%);
  margin: 30px auto 20px;
}

.intro-text,
.section-heading p,
.feature-copy p,
.about-box p,
.slide p,
.spider-card p {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(47, 42, 38, 0.78);
}

.intro-text {
  max-width: 830px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.main-button,
.light-button {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
}

.main-button {
  color: var(--cream);
  background: var(--green);
}

.light-button {
  color: var(--brown);
  background: var(--gold);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.center-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.book-carousel {
  position: relative;
  max-width: 850px;
  min-height: 720px;
  margin: 0 auto;
  padding: 30px 70px 65px;
  text-align: center;
  border-radius: 42px;
  background: var(--soft-white);
  box-shadow: 0 24px 60px rgba(47, 42, 38, 0.18);
}

.slide {
  display: none;
}

.active-slide {
  display: block;
}

.slide img {
  max-height: 520px;
  margin: 14px auto 18px;
  border-radius: 20px;
  box-shadow: 0 16px 35px rgba(47, 42, 38, 0.18);
  background: white;
}

.book-badge,
.feature-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 16px;
  border-radius: 30px;
  color: var(--cream);
  background: var(--purple);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: bold;
}

.book-button,
.coming-soon-button {
  display: inline-block;
  margin-top: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  text-decoration: none;
  font-weight: bold;
}

.book-button:hover {
  background: var(--rose);
}

.coming-soon-button,
.coming-soon-badge {
  background: var(--rose);
}

.arrow {
  position: absolute;
  top: 45%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--cream);
  background: var(--green);
  font-size: 2rem;
  cursor: pointer;
}

.left-arrow {
  left: 16px;
}

.right-arrow {
  right: 16px;
}

.arrow:hover {
  background: var(--rose);
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
}

.dot {
  width: 13px;
  height: 13px;
  margin: 0 5px;
  border: 0;
  border-radius: 50%;
  background: var(--light-green);
  cursor: pointer;
}

.active-dot {
  background: var(--rose);
}

.character-grid,
.spider-grid {
  display: grid;
  gap: 22px;
}

.character-grid {
  grid-template-columns: repeat(4, 1fr);
}

.image-card,
.spider-card,
.feature-box,
.about-box {
  overflow: hidden;
  border-radius: 28px;
  background: var(--soft-white);
  box-shadow: 0 16px 34px rgba(47, 42, 38, 0.16);
}

.image-card img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: top;
}

.spider-grid {
  grid-template-columns: repeat(5, 1fr);
}

.spider-card {
  padding: 20px;
  text-align: center;
}

.spider-card img {
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 12px;
}

.feature-box {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 35px;
  padding: clamp(28px, 5vw, 55px);
  background: linear-gradient(135deg, rgba(118, 106, 148, 0.14), rgba(214, 183, 90, 0.22)), var(--soft-white);
}

.feature-box img {
  max-height: 430px;
  margin: auto;
  border-radius: 22px;
  box-shadow: 0 16px 35px rgba(47, 42, 38, 0.18);
}

.about-box {
  display: grid;
  grid-template-columns: 360px 1fr;
  align-items: center;
  gap: 50px;
  padding: clamp(28px, 5vw, 55px);
  color: var(--cream);
  background: linear-gradient(135deg, var(--green), #314a36);
}

.about-box h2 {
  color: var(--gold);
}

.about-box p {
  color: rgba(243, 240, 230, 0.9);
}

.author-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 30px;
  border: 8px solid rgba(243, 240, 230, 0.58);
}

.footer {
  padding: 42px 16px 55px;
  text-align: center;
  color: var(--green);
}

.footer img {
  width: 92px;
  margin: 0 auto 12px;
  border-radius: 50%;
}

@media (max-width: 950px) {
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spider-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-box,
  .about-box {
    grid-template-columns: 1fr;
  }

  .author-photo {
    max-width: 360px;
    margin: auto;
  }
}

@media (max-width: 650px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 86px;
    left: 0;
    right: 0;
    padding: 18px;
    text-align: center;
    background: var(--cream);
  }

  .nav-links.show-menu {
    display: grid;
    gap: 14px;
  }

  .book-carousel {
    padding: 24px 20px 65px;
  }

  .arrow {
    top: auto;
    bottom: 18px;
  }

  .left-arrow {
    left: 24px;
  }

  .right-arrow {
    right: 24px;
  }

  .character-grid,
  .spider-grid {
    grid-template-columns: 1fr;
  }
}

/* Willow Wood Memory Match */
.hero-tree-logo {
  width: min(360px, 58%);
  max-height: 320px;
  object-fit: contain;
  background: transparent;
}

.topbar .small-logo {
  object-fit: contain;
}

.memory-section {
  max-width: 1180px;
}

.memory-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 42px;
  background: linear-gradient(135deg, rgba(166, 188, 161, 0.58), rgba(243, 240, 230, 0.9));
  box-shadow: 0 24px 60px rgba(47, 42, 38, 0.16);
}

.memory-shell::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  background: url("assets/willow-tree.png") center / contain no-repeat;
  opacity: 0.055;
  pointer-events: none;
}

.memory-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 22px;
  margin: 0 auto 28px;
  color: var(--green);
  font-size: 1.08rem;
}

.memory-reset {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.memory-game {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: clamp(12px, 2vw, 20px);
  max-width: 860px;
  margin: 0 auto;
}

.memory-card {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 120px;
  border: 0;
  border-radius: 30px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(47, 42, 38, 0.18);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.memory-card:hover {
  transform: translateY(-3px);
}

.memory-card:focus-visible {
  outline: 4px solid #d9b759;
  outline-offset: 5px;
}

.memory-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-card.flipped,
.memory-card.matched {
  box-shadow: 0 0 0 4px rgba(217, 183, 89, 0.7), 0 12px 25px rgba(47, 42, 38, 0.18);
}

.memory-card.matched {
  cursor: default;
  opacity: 0.86;
}

.memory-message {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 28px auto 0;
  text-align: center;
  color: rgba(47, 42, 38, 0.78);
  font-size: 1.12rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .memory-game {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
  }
  .memory-card {
    border-radius: 22px;
  }
}

@media (max-width: 460px) {
  .memory-game {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

/* Willow Wood Studio homepage refresh */
.brand-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.small-logo {
  width: 230px;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
}

.hero {
  padding-top: 46px;
  padding-bottom: 90px;
}

.lantern-banner {
  width: min(760px, 94%);
  max-height: 190px;
  object-fit: contain;
  margin: 0 auto 34px;
}

.hero-introduction {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(28px, 6vw, 78px);
  text-align: left;
}

.hero-copy {
  max-width: 680px;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(3rem, 6.2vw, 6rem);
  line-height: 0.98;
}

.creative-roles {
  margin: 24px 0 0;
  color: var(--rose);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: bold;
  letter-spacing: 0.035em;
}

.creative-roles span {
  padding: 0 0.28em;
  color: var(--gold);
}

.hero .intro-text {
  margin: 22px 0 0;
  max-width: 650px;
}

.hero .hero-buttons {
  justify-content: flex-start;
}

.guardian-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: end;
  min-height: 500px;
}

.guardian-wrap::before {
  content: "";
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 183, 90, 0.32), rgba(214, 183, 90, 0) 68%);
  filter: blur(5px);
}

.guardian-image {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  max-height: 620px;
  object-fit: contain;
  object-position: center bottom;
}

.footer-logo {
  width: min(210px, 55vw);
  margin: 0 auto 18px;
}

@media (max-width: 900px) {
  .small-logo {
    width: 190px;
    height: 56px;
  }

  .hero-introduction {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .hero h1 {
    margin-left: auto;
    margin-right: auto;
  }

  .hero .hero-buttons {
    justify-content: center;
  }

  .guardian-wrap {
    min-height: 0;
  }

  .guardian-image {
    width: min(460px, 88vw);
  }
}

@media (max-width: 620px) {
  .topbar-inner {
    min-height: 74px;
  }

  .small-logo {
    width: 155px;
    height: 48px;
  }

  .lantern-banner {
    width: 100%;
    margin-bottom: 20px;
  }

  .hero {
    padding-top: 28px;
  }

  .creative-roles {
    line-height: 1.8;
  }
}

/* Final Willow Wood Studio refinement */
.topbar-inner {
  min-height: 92px;
}

.small-logo {
  width: clamp(190px, 20vw, 255px);
  height: auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  padding-top: 105px;
}

.hero-branch {
  position: absolute;
  top: -190px;
  right: -95px;
  width: min(430px, 34vw);
  height: auto;
  transform: rotate(7deg);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

.hanging-lantern-wrap {
  position: absolute;
  top: -8px;
  right: clamp(120px, 17vw, 245px);
  width: 112px;
  height: 260px;
  z-index: 1;
  pointer-events: none;
}

.hanging-lantern-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 78px;
  background: rgba(47, 42, 38, 0.62);
}

.hanging-lantern {
  position: absolute;
  top: 63px;
  left: 50%;
  width: 108px;
  height: 205px;
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(214, 183, 90, 0.32));
  animation: lantern-breathe 4.8s ease-in-out infinite;
}

@keyframes lantern-breathe {
  0%, 100% { filter: drop-shadow(0 14px 20px rgba(214, 183, 90, 0.26)); }
  50% { filter: drop-shadow(0 18px 34px rgba(214, 183, 90, 0.52)); }
}

.hero-introduction {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 720px;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 5.4vw, 5.35rem);
  line-height: 0.98;
  text-wrap: balance;
}

.guardian-wrap {
  min-height: 440px;
}

.guardian-image {
  width: min(455px, 100%);
  max-height: 560px;
}

.stories-heading {
  max-width: 980px;
}

.stories-heading h2 {
  white-space: nowrap;
  font-size: clamp(2.4rem, 5vw, 4.35rem);
}

.book-flowers {
  width: min(470px, 78vw);
  max-height: 390px;
  object-fit: contain;
  margin: 22px auto 16px;
  filter: drop-shadow(0 18px 24px rgba(47, 42, 38, 0.10));
}

.memory-shell {
  background: rgba(243, 240, 230, 0.88);
  border: 1px solid rgba(79, 107, 79, 0.16);
}

.memory-shell::before {
  display: none;
}

.memory-card img {
  object-fit: cover;
}

.about-box h2 {
  max-width: 720px;
  font-size: clamp(2.1rem, 4.5vw, 4rem);
}

.about-box strong {
  color: var(--gold);
}

.footer-logo {
  width: min(280px, 70vw) !important;
  border-radius: 0 !important;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 120px;
  }
  .hero-branch {
    top: -220px;
    right: -145px;
    width: 460px;
  }
  .hanging-lantern-wrap {
    right: 65px;
  }
  .hero h1 {
    font-size: clamp(2.9rem, 9vw, 5rem);
  }
}

@media (max-width: 650px) {
  .topbar-inner {
    min-height: 84px;
  }
  .small-logo {
    width: 180px;
  }
  .hero {
    padding-top: 145px;
  }
  .hero-branch {
    top: -210px;
    right: -210px;
    width: 430px;
    opacity: 0.6;
  }
  .hanging-lantern-wrap {
    top: -4px;
    right: 32px;
    transform: scale(0.78);
    transform-origin: top right;
  }
  .hero h1 br {
    display: none;
  }
  .stories-heading h2 {
    white-space: normal;
  }
}

/* July refinement: centered lantern, calmer hierarchy, updated brand assets */
.hero {
  overflow: visible;
  min-height: auto;
  padding-top: 38px;
}

.hero-branch,
.hanging-lantern-wrap {
  display: none !important;
}

.center-lantern-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 auto 24px;
  pointer-events: none;
}

.center-lantern {
  width: clamp(92px, 10vw, 138px);
  height: clamp(150px, 17vw, 220px);
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(214, 183, 90, 0.38));
  animation: lantern-breathe 4.8s ease-in-out infinite;
}

.hero-introduction {
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.hero h1 {
  max-width: 620px;
  font-size: clamp(2rem, 3.15vw, 3rem);
  line-height: 1.08;
}

.hero .small-title {
  margin-bottom: 10px;
}

.hero .intro-text {
  max-width: 610px;
}

.guardian-wrap {
  min-height: 390px;
}

.guardian-image {
  width: min(430px, 100%);
  max-height: 520px;
}

.brave-heading {
  max-width: 1120px;
}

.brave-heading h2 {
  max-width: 1120px;
  font-size: clamp(1.8rem, 3.1vw, 2.45rem);
  line-height: 1.12;
  text-wrap: balance;
}

.brave-heading p:last-child {
  max-width: 900px;
}

.spiders-heading {
  max-width: 900px;
}

.spiders-heading h2 {
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.05;
  text-wrap: balance;
}

.memory-card img {
  object-fit: contain;
  background: #4f6b4f;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 30px;
  }
  .hero h1 {
    font-size: clamp(2.15rem, 7vw, 3.1rem);
  }
  .center-lantern-wrap {
    margin-bottom: 12px;
  }
}

@media (max-width: 650px) {
  .hero {
    padding-top: 24px;
  }
  .center-lantern {
    width: 96px;
    height: 160px;
  }
  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }
  .brave-heading h2 {
    font-size: clamp(1.7rem, 7.2vw, 2.2rem);
  }
  .spiders-heading h2 {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
  }
}


/* Final finishing touches: lantern vines, cream memory cards, quieter about subtitle */
.center-lantern-wrap {
  position: relative;
  min-height: clamp(150px, 18vw, 220px);
  align-items: center;
  overflow: visible;
}

.center-vine {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 88vw);
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 0;
  pointer-events: none;
}

.center-lantern {
  position: relative;
  z-index: 1;
}

.about-box h2 {
  max-width: 720px;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.25;
  margin-bottom: 18px;
}

@media (max-width: 650px) {
  .center-lantern-wrap {
    min-height: 142px;
  }
  .center-vine {
    width: 120vw;
  }
  .about-box h2 {
    font-size: clamp(1.08rem, 5vw, 1.35rem);
  }
}

/* July 2026 updates: smaller vines, mobile title spacing, game levels, artist portrait */
.center-vine {
  width: min(450px, 44vw);
}

.welcome-of {
  white-space: nowrap;
}

.difficulty-picker {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 auto 18px;
}

.difficulty-label {
  width: 100%;
  text-align: center;
  color: var(--green);
  font-weight: 700;
}

.difficulty-button {
  border: 2px solid var(--green);
  border-radius: 999px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.difficulty-button:hover {
  transform: translateY(-2px);
}

.difficulty-button.active {
  background: var(--green);
  color: #fff;
}

.memory-game.level-medium {
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  max-width: 980px;
}

.memory-game.level-hard {
  grid-template-columns: repeat(6, minmax(88px, 1fr));
  max-width: 1080px;
}

.footer p span {
  color: #b53f72;
}

@media (max-width: 760px) {
  .center-vine {
    width: min(360px, 72vw);
  }
  .hero h1 br {
    display: none;
  }
  .memory-game.level-medium,
  .memory-game.level-hard {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
  }
}

@media (max-width: 460px) {
  .center-vine {
    width: 78vw;
  }
  .memory-game.level-medium,
  .memory-game.level-hard {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

/* Compact, phone-friendly memory board */
.memory-game,
.memory-game.level-medium,
.memory-game.level-hard {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.memory-card {
  min-height: 0;
  border-radius: 16px;
  box-shadow: 0 7px 15px rgba(47, 42, 38, 0.16);
}

.memory-card.match-pop {
  animation: willowMatchPop 0.42s ease;
}

@keyframes willowMatchPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12) rotate(-2deg); }
  75% { transform: scale(0.97) rotate(1deg); }
  100% { transform: scale(1); }
}

.memory-game.game-complete {
  animation: willowGlow 1.1s ease-in-out;
}

@keyframes willowGlow {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 18px rgba(217, 183, 89, 0.85)); }
}

@media (max-width: 760px) {
  .memory-shell {
    padding: 24px 14px 30px;
    border-radius: 28px;
  }
  .memory-controls {
    gap: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.95rem;
  }
  .memory-game,
  .memory-game.level-medium,
  .memory-game.level-hard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    max-width: 440px;
  }
  .memory-card {
    border-radius: 11px;
  }
  .memory-message {
    margin-top: 20px;
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .memory-game,
  .memory-game.level-medium,
  .memory-game.level-hard {
    gap: 5px;
  }
  .memory-card {
    border-radius: 9px;
  }
}


/* July 13 mobile correction: force compact playable boards and fix hero spacing */
@media (max-width: 760px) {
  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 10.8vw, 3.25rem);
    line-height: 0.98;
    overflow-wrap: normal;
    word-break: normal;
  }

  .memory-section {
    padding-left: 8px;
    padding-right: 8px;
  }

  .memory-shell {
    padding: 16px 8px 22px !important;
    border-radius: 20px;
  }

  .memory-shell .section-heading {
    margin-bottom: 12px;
  }

  .memory-shell .section-heading h2 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    line-height: 1.02;
    margin-bottom: 8px;
  }

  .memory-shell .section-heading p {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .difficulty-picker {
    gap: 6px;
    margin-bottom: 10px;
  }

  .difficulty-label {
    font-size: 0.9rem;
  }

  .difficulty-button {
    padding: 6px 12px;
    font-size: 0.88rem;
  }

  .memory-controls {
    gap: 7px 12px;
    margin-bottom: 12px;
    font-size: 0.88rem;
  }

  .memory-reset {
    padding: 8px 14px;
  }

  .memory-game.level-easy {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .memory-game.level-medium,
  .memory-game.level-hard {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .memory-game,
  .memory-game.level-easy,
  .memory-game.level-medium,
  .memory-game.level-hard {
    width: 100% !important;
    max-width: 430px !important;
    gap: 5px !important;
    margin: 0 auto !important;
  }

  .memory-card {
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 8px rgba(47, 42, 38, 0.16) !important;
  }

  .memory-message {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.35;
  }
}

@media (max-width: 380px) {
  .memory-game.level-medium,
  .memory-game.level-hard {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .memory-game,
  .memory-game.level-easy,
  .memory-game.level-medium,
  .memory-game.level-hard {
    gap: 4px !important;
  }
}


/* Memory game victory celebration */
body.celebration-open { overflow: hidden; }
.memory-celebration {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  padding: 24px; background: rgba(35, 41, 31, 0.72); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; overflow: hidden;
}
.memory-celebration.show { opacity: 1; visibility: visible; }
.celebration-card {
  position: relative; z-index: 2; width: min(92vw, 540px); max-height: 90vh; overflow: auto;
  padding: 30px; text-align: center; background: #fbf7eb; border: 2px solid rgba(82, 112, 78, .28);
  border-radius: 30px; box-shadow: 0 24px 70px rgba(0,0,0,.28); transform: translateY(16px) scale(.96);
  transition: transform .3s ease;
}
.memory-celebration.show .celebration-card { transform: translateY(0) scale(1); }
.celebration-character { width: min(210px, 52vw); aspect-ratio: 1; object-fit: contain; border-radius: 22px; margin-bottom: 8px; }
.celebration-card h2 { margin: 6px 0 10px; color: #4d6f50; }
.celebration-card p { margin: 0 auto 18px; max-width: 420px; }
.celebration-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.secondary-button { background: #dfbd56; color: #302921; }
.celebration-close { position: absolute; top: 12px; right: 15px; border: 0; background: transparent; font-size: 2rem; line-height: 1; color: #4d6f50; cursor: pointer; }
.leaf-storm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.celebration-leaf {
  position: absolute; top: -12%; opacity: .95; filter: drop-shadow(0 2px 2px rgba(0,0,0,.12));
  animation: willowLeafFall linear forwards; transform: rotate(0deg);
}
@keyframes willowLeafFall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(var(--leaf-drift), 118vh, 0) rotate(680deg); opacity: .15; }
}
@media (max-width: 600px) {
  .memory-celebration { padding: 14px; }
  .celebration-card { padding: 24px 18px 22px; border-radius: 24px; }
  .celebration-actions { flex-direction: column; }
  .celebration-actions .main-button { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .celebration-leaf { animation: none; display: none; }
  .celebration-card, .memory-celebration { transition: none; }
}

/* Custom Name Art shop */
.launch-banner {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 14px 20px;
  border: 2px solid rgba(126, 76, 104, .22);
  border-radius: 999px;
  background: linear-gradient(90deg, #f9dcea, #fff5cb, #e3f3dc);
  color: #49382f;
  text-align: center;
  box-shadow: 0 10px 28px rgba(55, 45, 35, .08);
}
.launch-banner span { font-weight: 800; letter-spacing: .08em; color: #9a245f; }
.shop-section { padding-top: 76px; }
.shop-heading { max-width: 790px; margin: 0 auto 36px; }
.custom-art-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto 44px;
}
.custom-art-card {
  margin: 0;
  overflow: hidden;
  background: #fffdf7;
  border: 1px solid rgba(86, 106, 73, .18);
  border-radius: 24px;
  box-shadow: 0 16px 38px rgba(47, 42, 38, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.custom-art-card:hover { transform: translateY(-4px); box-shadow: 0 22px 45px rgba(47, 42, 38, .16); }
.custom-art-card img { width: 100%; height: 390px; display: block; object-fit: contain; background: #fff; }
.custom-art-card figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px 18px; color: #40372f; }
.custom-art-card figcaption strong { color: #4d6f50; font-size: 1.12rem; }
.custom-art-card figcaption span { color: #7b6b60; }
.shop-purchase-card {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 38px;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto;
  padding: 42px;
  border-radius: 30px;
  background: linear-gradient(145deg, #fbf7eb, #f5ecf1);
  border: 2px solid rgba(82, 112, 78, .18);
  box-shadow: 0 22px 55px rgba(47, 42, 38, .13);
}
.shop-copy h3 { margin: 6px 0 14px; font-size: clamp(1.75rem, 3vw, 2.55rem); color: #4d6f50; }
.shop-details { margin: 20px 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.shop-details li::before { content: "✓"; margin-right: 10px; color: #9a245f; font-weight: 800; }
.shop-price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.shop-price span { font-size: 2.2rem; font-weight: 800; color: #4d6f50; }
.shop-price small { color: #74685e; }
.coupon-reminder { padding: 12px 14px; border-radius: 14px; background: #fff2bf; color: #4b3e2e; }
.stripe-checkout-box { padding: 26px; text-align: center; background: rgba(255,255,255,.82); border-radius: 24px; border: 1px solid rgba(82, 112, 78, .18); }
.secure-label { margin: 0 0 14px; font-size: .9rem; color: #75685d; }
stripe-buy-button { display: block; width: 100%; min-height: 54px; }
.stripe-fallback { display: inline-block; margin-top: 12px; color: #4d6f50; font-weight: 700; }
@media (max-width: 820px) {
  .launch-banner { margin: 18px 14px 0; border-radius: 22px; }
  .custom-art-gallery { grid-template-columns: 1fr; }
  .custom-art-card img { height: auto; max-height: 430px; }
  .shop-purchase-card { grid-template-columns: 1fr; padding: 26px 20px; }
}
@media (max-width: 520px) {
  .custom-art-card figcaption { flex-direction: column; gap: 2px; }
  .shop-section { padding-top: 54px; }
}
