@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --body: "DM Sans", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Arial Black", Arial, sans-serif;
  --ink: #271f2c;
  --paper: #fbf9f3;
  --purple: #563181;
  --rule: #dcd7cc;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--body); }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, select:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #7549bb; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(90%, 1320px); margin-inline: auto; }
.sr-only, .icon-definitions {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 10px 16px; transform: translateY(-170%); background: white; }
.skip:focus { transform: none; }
.ico { display: block; width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.announcement { display: flex; align-items: center; justify-content: center; gap: .85rem; min-height: 30px; padding: 4px 12px; background: #33233f; color: #fff9ec; font-size: .77rem; font-weight: 600; letter-spacing: .025em; text-align: center; }
.tiny-star, .spark { display: block; flex: none; background: currentColor; clip-path: polygon(50% 0,61% 35%,100% 50%,61% 61%,50% 100%,38% 63%,0 50%,38% 36%); }
.tiny-star { width: 10px; height: 10px; color: #ffdb6e; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { position: relative; min-height: 84px; display: flex; align-items: center; gap: clamp(2rem,5vw,5rem); }
.brand, .footer-brand { display: inline-flex; flex: none; }
.brand img { display: block; width: 92px; height: auto; }
.main-nav, .header-actions { display: flex; align-items: center; }
.main-nav { gap: clamp(1.5rem,2.5vw,2.6rem); }
.main-nav a, .main-nav button, .mobile-nav button, .mobile-nav a, .site-footer button {
  appearance: none; border: 0; padding: 0; background: transparent; font-size: .94rem; font-weight: 600; text-decoration: none;
}
.main-nav button, .main-nav a { position: relative; padding-block: 8px; }
.main-nav .active-nav::after { content: ""; position: absolute; inset: auto 0 2px; height: 3px; background: #edb128; border-radius: 50%; transform: rotate(-2deg); }
.main-nav button:hover, .main-nav a:hover, .text-btn:hover, .site-footer button:hover { color: var(--purple); }
.header-actions { margin-left: auto; gap: 14px; }
.icon-btn, .bag-btn { border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; }
.icon-btn:hover, .bag-btn:hover { background: #eee9df; }
.header-actions .ico { width: 22px; height: 22px; }
.header-rule { width: 1px; height: 23px; background: var(--rule); }
.bag-btn { gap: .44rem; min-height: 40px; font-size: .94rem; font-weight: 700; padding: 4px 8px; border-radius: 7px; }
.bag-count { min-width: 22px; padding: .08rem .3rem; border-radius: 12px; background: #eee6fb; color: #50376b; text-align: center; font-size: .75rem; }
.menu-btn { display: none; }
.mobile-nav { position: absolute; inset: 100% 0 auto; z-index: 5; flex-direction: column; align-items: stretch; border: 1px solid var(--rule); border-radius: 0 0 12px 12px; background: var(--paper); box-shadow: 0 10px 14px #2a172214; }
.mobile-nav > * { text-align: left; padding: .75rem 1.1rem !important; }

/* The hero is a printed puzzle spread with the supplied character in the foreground. */
.hero { position: relative; isolation: isolate; overflow: hidden; container-type: inline-size; margin-top: clamp(16px,1.7vw,26px); background: #ffdb74; border-radius: 18px; }
.hero-copy { position: relative; z-index: 2; width: 54%; padding: clamp(34px,3.8cqw,55px) 0 clamp(36px,3.9cqw,60px) clamp(30px,4.7cqw,70px); }
.eyebrow { margin: 0; text-transform: uppercase; font-size: .74rem; font-weight: 700; letter-spacing: .14em; }
.hero-kicker { display: flex; gap: .65rem; align-items: center; }
.kicker-line { width: 25px; height: 3px; background: var(--purple); transform: rotate(-4deg); }
.hero h1 { margin: .93rem 0 1rem; font: 800 clamp(3.55rem,6.85cqw,6.2rem)/.9 var(--display); letter-spacing: -.06em; }
.hero h1 span { color: var(--purple); }
.hero-intro { max-width: 415px; width: 91%; margin: 0; font-size: clamp(1rem,1.38cqw,1.13rem); line-height: 1.46; }
.hero-actions { display: flex; align-items: center; gap: clamp(16px,2cqw,28px); margin-top: clamp(19px,2.1cqw,29px); }
.primary-btn { display: inline-flex; gap: .65rem; align-items: center; padding: .8rem 1.35rem; min-height: 47px; border-radius: 8px; background: var(--ink); color: #fff9ee; text-decoration: none; font-size: .95rem; font-weight: 700; transition: background .16s, transform .16s; }
.primary-btn .ico { width: 18px; height: 18px; }
.primary-btn:hover { background: #4d3264; transform: translateY(-2px); }
.text-btn { padding: .48rem .05rem .25rem; border: 0; border-bottom: 1.5px solid currentColor; background: transparent; font-size: .93rem; font-weight: 700; }
.hero-art { position: absolute; isolation: isolate; inset: 0 0 0 50%; overflow: visible; }
.sun-disc { position: absolute; width: 37cqw; aspect-ratio: 1; top: 11%; left: 18%; background: #ffbc49; border-radius: 50%; }
.dot-print { position: absolute; background-image: radial-gradient(#a36f28 1.1px, transparent 1.45px); background-size: 7px 7px; opacity: .47; }
.dot-top { width: 25%; height: 76%; right: -2%; top: -15%; transform: rotate(9deg); mask-image: linear-gradient(140deg, transparent 10%,black 70%); }
.dot-bottom { width: 31%; height: 33%; bottom: -9%; left: 4%; transform: rotate(-8deg); mask-image: linear-gradient(20deg, black 30%,transparent 92%); }
.hero-mascot { position: absolute; z-index: 2; bottom: -1.1%; left: 14.5%; width: auto; height: 94%; max-width: 83%; object-fit: contain; object-position: bottom; transform: rotate(2deg); transform-origin: 50% 100%; }
.puzzle-slip { position: absolute; background: #fff0b1; color: #76552b; border: 1.5px solid #8e6a31; border-radius: 3px; box-shadow: 3px 4px 0 #a7752c60; padding: 6px; }
.number-slip { width: clamp(80px,10.7cqw,150px); aspect-ratio: 1; top: 13%; right: 4.4%; transform: rotate(13deg); }
.number-fragment { display: grid; grid-template: repeat(3,1fr)/repeat(3,1fr); height: 100%; border: 1.5px solid; }
.number-fragment span { display: grid; place-items: center; border-right: 1px solid; border-bottom: 1px solid; font: 600 clamp(15px,1.7cqw,26px)/1 var(--display); }
.number-fragment span:nth-child(3n) { border-right: none; }
.number-fragment span:nth-last-child(-n+3) { border-bottom: none; }
.number-fragment span:nth-child(5) { background: #ffd570; }
.word-slip { width: clamp(104px,12.6cqw,166px); height: clamp(80px,9.8cqw,132px); left: 0; bottom: 8%; transform: rotate(-13deg); }
.word-fragment { position: relative; display: grid; height: 100%; grid-template: repeat(4,1fr)/repeat(5,1fr); }
.word-fragment span { display: grid; place-items: center; font: 600 clamp(11px,1.04cqw,15px)/1 monospace; }
.word-fragment::after { content: ""; position: absolute; border: 2px solid #ba633c; border-radius: 18px; top: 26%; left: 0; width: 80%; height: 24%; transform: rotate(-1.5deg); }
.spark { position: absolute; }
.spark-purple { top: 12%; left: 2%; width: 3.85cqw; height: 4.9cqw; color: #634087; transform: rotate(13deg); }
.spark-ink { top: 27%; left: -1%; width: 1.5cqw; height: 1.88cqw; color: #4a3248; transform: rotate(-9deg); }
.spark-white { bottom: 16%; right: 8.5%; width: 3.1cqw; height: 4cqw; color: #fff5ca; transform: rotate(16deg); }

.shelf { scroll-margin-top: 16px; margin-top: clamp(36px,3.8vw,58px); margin-bottom: clamp(54px,6vw,92px); }
.shelf-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 15px; }
.shelf h2 { margin: 0; font: 800 clamp(2.25rem,3.25vw,3.1rem)/1 var(--display); letter-spacing: -.065em; }
.heading-dot { color: #8351aa; }
.result-count { color: #6b626c; font-size: .9rem; }
.shelf-heading .shelf-clear { margin-left: auto; }
.shelf-clear { border: 0; padding: .28rem 0; background: none; color: var(--purple); font-size: .86rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.shelf-clear:hover { color: var(--ink); }
.shelf-tools { display: grid; grid-template-columns: minmax(165px, 1.4fr) minmax(130px, 1.1fr) minmax(120px, 1fr) minmax(214px, 1.5fr) minmax(111px, .8fr) minmax(137px, 1fr); gap: 12px; margin: 22px 0 24px; padding: 16px 18px; background: #f2eee5; border-radius: 12px; }
.shelf-field { display: grid; gap: 5px; min-width: 0; font-size: .81rem; font-weight: 650; color: #504751; }
.shelf-input-wrap { display: block; position: relative; min-width: 0; }
.shelf-input-wrap :is(select, input) { width: 100%; min-height: 42px; border: 1px solid #c9c2b8; border-radius: 7px; background: #fffdf8; color: var(--ink); font-size: .91rem; }
.shelf-input-wrap select { appearance: none; padding: 7px 28px 7px 11px; font-weight: 450; }
.shelf-input-wrap input { padding: 7px 10px 7px 36px; font-weight: 400; }
.shelf-input-wrap input::placeholder { color: #746c75; opacity: 1; }
.shelf-input-wrap > .ico { pointer-events: none; position: absolute; top: 50%; right: 9px; width: 16px; height: 16px; transform: translateY(-50%); }
.shelf-search .ico { right: auto; left: 11px; width: 17px; height: 17px; }
.shelf-empty { padding: 42px 20px; border: 1px dashed #c6b8d0; border-radius: 12px; text-align: center; background: #f4eef7; }
.shelf-empty h3 { margin: 0; font: 750 1.5rem/1.2 var(--display); letter-spacing: -.035em; }
.shelf-empty p { margin: 8px 0 10px; font-size: .94rem; }
#shelf-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding-top: 22px; margin-top: 34px; border-top: 1px solid var(--rule); }
.page-button { min-height: 42px; min-width: 42px; padding: .4rem .6rem; border: 1px solid var(--rule); border-radius: 7px; background: #fffdf8; font-size: .9rem; font-weight: 600; }
.page-direction { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding-inline: .8rem; }
.page-button[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-button:enabled:not([aria-current="page"]):hover { color: var(--purple); border-color: #b59fc5; background: #f0e9f4; }
.page-button:disabled { cursor: default; color: #716b72; border-color: transparent; background: transparent; }
.book-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 34px clamp(15px,1.65vw,24px); }
.catalog-book { min-width: 0; position: relative; }
.book-open { display: block; text-decoration: none; }
.book-title-link { color: inherit; text-decoration: none; }
.book-title-link:hover { text-decoration: underline; text-underline-offset: .17em; }
.book-open::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.book-open:focus-visible { outline: 0; }
.book-open:focus-visible::after { outline: 3px solid #7549bb; outline-offset: 4px; }
.book-well { position: relative; display: grid; place-items: center; container-type: inline-size; aspect-ratio: 1.28; border-radius: 12px; overflow: hidden; background: var(--well); }
.book-object { display: block; position: relative; width: 46%; aspect-ratio: .71; transform: rotate(-6deg); transform-origin: 48% 75%; box-shadow: 5px 7px 0 -1px #fff9e8,6px 8px 0 -1px #47363e59,10px 15px 13px -2px #281f3d35; transition: transform .24s ease, box-shadow .24s ease; }
.catalog-book:nth-child(4n + 2) .book-object { transform: rotate(5deg); }
.catalog-book:nth-child(4n + 3) .book-object { transform: rotate(-4deg); }
.catalog-book:nth-child(4n + 4) .book-object { transform: rotate(6deg); }
.catalog-book:has(.book-open:is(:hover,:focus-visible)) .book-object { transform: translateY(-4px) rotate(0); }
.card-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; }
.card-category { color: #5c4566; font-size: .71rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.card-price { color: var(--ink); font-size: .94rem; font-weight: 700; }
.card-title { margin: 4px 0; font: 750 clamp(1.2rem,1.65vw,1.48rem)/1.12 var(--display); letter-spacing: -.045em; }
.card-detail { display: block; color: #666167; font-size: .86rem; line-height: 1.42; }
.quick-add { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 33px; height: 33px; padding: 0; border: 1px solid #281d302b; border-radius: 50%; color: var(--ink); background: #fffdf3e8; transition: background .15s, color .15s; }
.quick-add .ico { width: 17px; height: 17px; }
.quick-add:hover { color: white; background: var(--ink); }
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { padding-block: 23px; display: flex; gap: 25px; align-items: center; }
.footer-brand img { width: 65px; height: auto; }
.footer-inner p { color: #6d666a; font-size: .8rem; }
.site-footer button { margin-left: auto; font-size: .88rem; }

@media (min-width: 1600px) { .hero-mascot { left: 17%; } }
@media (max-width: 1100px) {
  .shelf-tools { grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .shell { width: 92%; }
  .header-inner { gap: 2.5rem; min-height: 74px; }
  .brand img { width: 81px; }
  .hero-copy { padding-left: 4.2cqw; }
  .hero-mascot { left: 7%; height: 88%; }
  .spark-purple { left: -1%; }
  .hero-intro { max-width: 355px; }
  .word-slip { left: -3%; }
  .book-grid { column-gap: 15px; }
  .shelf-tools { gap: 8px; padding: 12px; }
}
@media (max-width: 800px) {
  .book-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .header-inner { gap: 2rem; }
  .main-nav { gap: 1.3rem; }
  .hero h1 { font-size: clamp(2.7rem,7.4cqw,4rem); }
  .hero-art { left: 52%; }
  .hero-mascot { left: 1%; max-width: 92%; height: 86%; }
  .number-slip { top: 16%; }
  .hero-actions { gap: 15px; }
  .primary-btn { padding: .7rem .95rem; }
  .text-btn { font-size: .86rem; }
  .card-title { font-size: 1.28rem; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 66px; }
  .brand img { width: 73px; }
  .main-nav, .header-rule { display: none; }
  .header-actions { gap: 2px; }
  .menu-btn, .mobile-nav { display: flex; }
  .hero { border-radius: 14px; margin-top: 14px; }
  .hero-copy { width: 100%; padding: 26px 23px 0; }
  .hero h1 { margin: 12px 0; font-size: clamp(2.25rem,13cqw,4.2rem); }
  .hero-intro { max-width: 380px; width: 100%; font-size: .98rem; }
  .hero-actions { margin-top: 16px; }
  .hero-kicker { font-size: .66rem; }
  .hero-art { position: relative; inset: auto; margin-top: 12px; height: clamp(170px,49cqw,226px); }
  .hero-mascot { left: 36%; height: 101%; width: auto; }
  .sun-disc { left: 37%; width: 62%; top: 0; }
  .number-slip { top: 1%; right: 6%; width: 16cqw; min-width: 60px; }
  .word-slip { left: 12%; top: 30%; bottom: auto; width: 24cqw; height: 17cqw; }
  .spark-purple { top: 3%; left: 30%; width: 6cqw; height: 8cqw; }
  .spark-ink { top: 13%; left: 23%; width: 2.6cqw; height: 3.2cqw; }
  .spark-white { right: 6%; bottom: 23%; width: 5cqw; height: 7cqw; }
  .dot-bottom { left: 4%; }
  .shelf { margin-top: 31px; }
  .shelf h2 { font-size: clamp(1.8rem,8.8vw,2.4rem); }
  .shelf-heading h2 { width: 100%; }
  .shelf-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 15px 0 20px; padding: 12px; gap: 9px; }
  .shelf-search, .shelf-language { grid-column: 1 / -1; }
  .shelf-input-wrap :is(select, input) { font-size: 1rem; }
  #shelf-pages { margin-top: 26px; gap: 5px; }
  .page-button { min-width: 36px; padding-inline: .4rem; }
  .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px 12px; }
  .book-well { aspect-ratio: 1.04; border-radius: 9px; }
  .book-object { width: 53%; }
  .card-meta { padding-top: 10px; }
  .card-category { font-size: .65rem; letter-spacing: .07em; }
  .card-title { font-size: 1.15rem; }
  .card-detail, .card-price { font-size: .8rem; }
  .quick-add { width: 29px; height: 29px; top: 6px; right: 6px; }
  .footer-inner { gap: 14px; flex-wrap: wrap; }
  .footer-inner p { margin: 0; line-height: 1.3; max-width: 15ch; }
}
@media (max-width: 420px) {
  .shelf-input-wrap select { padding-inline: 8px 22px; }
  .shelf-field:not(.shelf-search) .ico { right: 6px; width: 13px; }
  #shelf-pages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .page-direction:first-child { grid-row: 2; grid-column: 1 / span 2; }
  .page-direction:last-child { grid-row: 2; grid-column: -3 / -1; }
}
@media (max-width: 360px) {
  .shelf-tools { padding-inline: 8px; column-gap: 6px; }
  .hero-copy { padding-inline: 17px; }
  .hero-actions { gap: 11px; }
  .bag-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
