@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fredoka-400.woff2") format("woff2");
}
@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fredoka-600.woff2") format("woff2");
}
@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fredoka-700.woff2") format("woff2");
}
@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/nunito-400.woff2") format("woff2");
}
@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/nunito-700.woff2") format("woff2");
}

:root {
  --sky: #7ec8f8;
  --sky-deep: #4aa3e0;
  --cream: #fff6e8;
  --paper: #fffdf8;
  --ink: #2a2a4a;
  --ink-soft: #4a4a68;
  --wood: #c48a4a;
  --wood-dark: #8a5424;
  --wood-edge: #6a3b16;
  --pink: #f4a7c3;
  --yellow: #ffe066;
  --green: #6fbe5a;
  --coral: #ef6f5e;
  --shadow: 0 12px 28px rgba(42, 42, 74, 0.14);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Nunito, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 224, 102, 0.35), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(126, 200, 248, 0.45), transparent 30%),
    linear-gradient(180deg, #bfe9ff 0%, #efe7c8 38%, #f3e2b8 70%, #e8c992 100%);
  min-height: 100vh;
  line-height: 1.5;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: var(--ink);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

.store {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
  background: #8fd3f7;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
}
.welcome {
  max-width: 40rem;
  margin: 1.35rem auto 0.25rem;
  text-align: center;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.welcome strong {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  color: var(--ink);
  display: block;
  font-size: 1.45rem;
  margin-bottom: 0.2rem;
}

.aisle {
  margin: 2.2rem 0 2.6rem;
}
.aisle-sign-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.35rem;
}
.aisle-sign {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  background: #fff8dc;
  color: var(--ink);
  border: 4px solid #e2b65a;
  border-radius: 16px;
  padding: 0.35rem 1.2rem 0.45rem;
  box-shadow: 0 6px 0 #c9922d;
  position: relative;
}
.aisle-sign::before,
.aisle-sign::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 2px;
  height: 18px;
  background: #8a5424;
}
.aisle-sign::before { left: 18%; }
.aisle-sign::after { right: 18%; }
.aisle-note {
  text-align: center;
  margin: 0.55rem 0 0.9rem;
  color: var(--ink-soft);
}

.shelf {
  background:
    linear-gradient(180deg, #e2b67a 0%, #c48a4a 55%, #a66b32 100%);
  border-radius: 8px 8px 18px 18px;
  padding: 1.4rem 1.1rem 0;
  box-shadow: var(--shadow);
  position: relative;
}
.shelf-plank {
  height: 22px;
  margin: 0 -4px;
  background:
    linear-gradient(180deg, #8a5424 0%, #6a3b16 100%);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 16px rgba(80, 40, 10, 0.25);
}
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem 1.2rem;
  align-items: start;
  padding-bottom: 0.2rem;
}

.toy { min-width: 0; }
.toy-box {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  display: block;
}
.toy-box:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 6px;
  border-radius: 12px;
}

.box-stage {
  perspective: 900px;
  margin: 0 auto;
  width: min(100%, 280px);
}
.box {
  position: relative;
  transform-style: preserve-3d;
}
.box-lid {
  height: 22px;
  border-radius: 10px 10px 2px 2px;
  transform-origin: bottom center;
  transition: transform 0.45s ease;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.35);
  border: 2px solid rgba(42,42,74,0.12);
  border-bottom: 0;
}
.toy.is-open .box-lid {
  transform: translateY(-6px) rotateX(-72deg);
}
.box-face {
  position: relative;
  border-radius: 2px 2px 16px 16px;
  overflow: hidden;
  border: 3px solid rgba(42,42,74,0.12);
  border-top: 0;
  background: #fff;
  box-shadow: 0 8px 0 rgba(80, 40, 10, 0.12);
}
.box-face img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.just-in {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--coral);
  color: #fff;
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(120, 30, 20, 0.25);
}
.hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(255,253,248,0.94);
  color: var(--ink);
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}

.toy-title {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0.7rem 0 0.15rem;
  line-height: 1.15;
}
.toy-artist {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.panel {
  display: none;
  background: var(--paper);
  border-radius: 18px;
  margin: 0.85rem auto 0.4rem;
  padding: 0.95rem 1rem 1.05rem;
  width: min(100%, 280px);
  box-shadow: inset 0 0 0 3px rgba(42,42,74,0.06);
  text-align: left;
}
.toy.is-open .panel { display: block; }
.blurb { margin: 0 0 0.7rem; }
.preview-label {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
audio {
  width: 100%;
  height: 40px;
  margin-bottom: 0.75rem;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.links a,
.clips a {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--accent, var(--sky-deep));
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(42,42,74,0.18);
}
.links a:hover, .clips a:hover { filter: brightness(1.06); }
.links a:focus-visible, .clips a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.clips-label {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.clips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.clips a {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 2px solid rgba(42,42,74,0.16);
  padding: 0.32rem 0.6rem;
}

.close-box {
  display: block;
  margin: 0.85rem auto 0;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.2rem;
}

.footer {
  margin-top: 2.8rem;
  text-align: center;
  background: rgba(255,253,248,0.86);
  border-radius: 24px;
  padding: 1.4rem 1.1rem 1.5rem;
  box-shadow: var(--shadow);
}
.footer .parent {
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.footer a { color: #1d4f8c; }
.footer .more, .footer .privacy {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer .privacy { font-size: 0.88rem; margin-top: 0.8rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (min-width: 800px) {
  .store { padding: 1.75rem 1.5rem 4rem; }
  .welcome { font-size: 1.22rem; }
  .welcome strong { font-size: 1.7rem; }
  .aisle-sign { font-size: 1.85rem; }
  .shelf-grid { gap: 1.6rem 1.5rem; padding: 0 0.6rem 0.2rem; }
  .box-stage, .panel { width: min(100%, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .box-lid { transition: none; }
}
