:root {
  --sky: #36aff3;
  --green: #7ac900;
  --forest: #003c28;
  --ink: #10251d;
  --paper: #fbfcf7;
  --white: #ffffff;
  --coral: #ff5c43;
  --yellow: #ffd33d;
  --lavender: #b7a6ff;
  --muted: #63716b;
  --line: #163c2f;
  --soft-line: rgba(16, 37, 29, 0.16);
  --shadow: 7px 7px 0 var(--ink);
  --radius: 6px;
  --font-display: "Arial Black", "Trebuchet MS", Arial, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --ink: #f4f7f1;
  --paper: #102019;
  --white: #172a22;
  --forest: #081812;
  --muted: #aab7b1;
  --line: #a9e78a;
  --soft-line: rgba(244, 247, 241, 0.17);
  --shadow: 7px 7px 0 #000;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; transition: background .2s ease, color .2s ease; }
body.reader-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.shell.narrow { width: min(760px, calc(100% - 48px)); }
.screen-reader-text { position: absolute; overflow: hidden; clip: rect(0 0 0 0); width: 1px; height: 1px; white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 9999; padding: 10px 14px; background: var(--yellow); color: #10251d; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 2px solid var(--line); backdrop-filter: blur(12px); }
.header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { position: relative; width: 158px; height: 54px; overflow: hidden; flex: 0 0 auto; }
.brand img { position: absolute; width: 178px; max-width: none; height: 178px; left: -10px; top: -61px; object-fit: contain; }
.desktop-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); margin-left: auto; }
.desktop-nav a { position: relative; font-weight: 750; font-size: 14px; }
.desktop-nav a::after { content: ""; position: absolute; height: 3px; left: 0; right: 100%; bottom: -8px; background: var(--green); transition: right .18s ease; }
.desktop-nav a:hover::after, .desktop-nav a:focus-visible::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--white); cursor: pointer; font-weight: 900; }
.icon-button:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
.theme-toggle .moon-icon { display: none; }
html[data-theme="dark"] .theme-toggle .sun-icon { display: none; }
html[data-theme="dark"] .theme-toggle .moon-icon { display: inline; }
.account-button { min-height: 42px; display: inline-flex; align-items: center; padding: 0 18px; background: var(--forest); border: 2px solid var(--forest); color: #fff; font-weight: 800; font-size: 14px; border-radius: var(--radius); }
.account-button:hover { background: var(--green); color: #10251d; }
.menu-toggle, .mobile-nav { display: none; }
.menu-toggle span { width: 17px; height: 2px; background: currentColor; display: block; margin: 2px; }

.eyebrow { margin: 0 0 16px; display: flex; align-items: center; gap: 9px; color: var(--forest); font-size: 12px; line-height: 1.2; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.eyebrow span { width: 28px; height: 3px; background: var(--green); }
.eyebrow--light { color: #fff; }
h1, h2, h3 { margin-top: 0; font-family: var(--font-display); letter-spacing: 0; line-height: .98; }
h1 { font-size: clamp(44px, 7vw, 94px); }
h2 { font-size: clamp(34px, 4vw, 58px); }
h3 { font-size: 22px; }

.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 24px; padding: 0 20px; border: 2px solid currentColor; border-radius: var(--radius); font-weight: 900; cursor: pointer; }
.button span { font-size: 20px; line-height: 1; }
.button--primary { background: var(--green); color: #10251d; box-shadow: 5px 5px 0 var(--forest); }
.button--primary:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--forest); }
.button--ink { background: var(--forest); color: #fff; box-shadow: 5px 5px 0 var(--green); }
.button--light { background: #fff; color: #10251d; box-shadow: 5px 5px 0 #10251d; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; border-bottom: 2px solid currentColor; }

.hero-band { overflow: hidden; border-bottom: 2px solid var(--line); background: var(--paper); }
.hero-grid { min-height: min(680px, calc(100vh - 118px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .92fr); align-items: center; gap: 40px; padding-block: 52px; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { max-width: 680px; margin-bottom: 28px; color: var(--forest); text-transform: uppercase; }
.hero-copy h1 em { color: var(--sky); font-style: normal; -webkit-text-stroke: 2px var(--forest); paint-order: stroke fill; }
html[data-theme="dark"] .hero-copy h1, html[data-theme="dark"] .hero-stats strong { color: var(--ink); }
html[data-theme="dark"] .hero-copy h1 em { -webkit-text-stroke-color: var(--line); }
html[data-theme="dark"] .hero-copy .eyebrow { color: var(--muted); }
.hero-lede { max-width: 590px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 34px; }
.hero-stats { display: flex; gap: 46px; margin-top: 46px; }
.hero-stats div { display: grid; }
.hero-stats strong { font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--forest); }
.hero-stats span { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.hero-visual { position: relative; min-height: 540px; isolation: isolate; }
.hero-visual::before { content: ""; position: absolute; width: 390px; height: 390px; top: 72px; left: 54px; background: var(--sky); border: 3px solid var(--line); border-radius: 50%; z-index: -2; }
.hero-visual::after { content: ""; position: absolute; width: 150px; height: 150px; right: -18px; bottom: 35px; background: var(--green); border: 3px solid var(--line); transform: rotate(16deg); z-index: -1; }
.book-stack { position: absolute; width: 330px; height: 430px; left: 95px; top: 52px; perspective: 900px; }
.hero-book { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 32px; border: 3px solid #10251d; box-shadow: 12px 12px 0 #10251d; color: #10251d; transform-origin: bottom center; }
.hero-book--back { background: var(--coral); transform: rotate(12deg) translate(58px, -4px); }
.hero-book--middle { background: var(--yellow); transform: rotate(-9deg) translate(-48px, 8px); }
.hero-book--front { background: #fff; transform: rotate(1deg); overflow: hidden; }
.hero-book--back span, .hero-book--middle span { font-family: var(--font-display); font-size: 54px; line-height: .9; }
.hero-book--back i, .hero-book--middle i { font-size: 18px; font-weight: 900; font-style: normal; }
.hero-book--front img { position: absolute; width: 290px; top: -12px; left: 18px; }
.hero-book--front b { position: relative; font-family: var(--font-display); font-size: 37px; line-height: .95; }
.hero-book--front small { margin-top: 10px; font-weight: 900; }
.orbit { position: absolute; z-index: 3; display: grid; place-items: center; width: 74px; height: 74px; border: 3px solid #10251d; border-radius: 50%; font-family: var(--font-display); font-size: 15px; color: #10251d; }
.orbit--one { top: 16px; left: 5px; background: var(--green); transform: rotate(-13deg); }
.orbit--two { right: 12px; top: 124px; background: var(--yellow); transform: rotate(10deg); }
.hero-scribble { position: absolute; right: 4px; bottom: 76px; font-family: var(--font-display); font-size: 18px; line-height: .9; color: var(--forest); transform: rotate(-7deg); text-align: center; }

.marquee-band { overflow: hidden; border-bottom: 2px solid var(--line); background: var(--forest); color: #fff; }
.marquee-band div { width: max-content; min-width: 100%; display: flex; align-items: center; justify-content: space-around; gap: 34px; padding: 16px 20px; font-family: var(--font-display); font-size: 16px; }
.marquee-band i { color: var(--green); font-style: normal; }

.catalog-section { padding: 92px 0 110px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading h2 { margin-bottom: 0; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.book-card { min-width: 0; }
.book-cover { position: relative; aspect-ratio: 1450 / 2048; display: block; overflow: hidden; background: var(--book-accent); border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--line); border-radius: 3px; transition: transform .2s ease, box-shadow .2s ease; }
.book-card:hover .book-cover { transform: translate(-2px, -3px) rotate(-1deg); box-shadow: 9px 10px 0 var(--line); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.book-cover-art > span { position: relative; z-index: 2; font-family: var(--font-display); font-size: 120px; line-height: 1; color: #fff; -webkit-text-stroke: 3px #10251d; }
.book-cover-art i { position: absolute; width: 180px; height: 180px; border: 28px solid rgba(255,255,255,.4); border-radius: 50%; transform: rotate(20deg); }
.book-age { position: absolute; top: 10px; right: 10px; padding: 4px 7px; background: #fff; color: #10251d; border: 2px solid #10251d; font-size: 11px; font-weight: 900; }
.book-card-copy { padding: 20px 2px 0; }
.book-category { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.book-card h3 { margin-bottom: 6px; line-height: 1.08; overflow-wrap: anywhere; }
.book-author { margin: 0; color: var(--muted); font-size: 14px; }
.book-card-bottom { min-height: 46px; display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 14px; border-top: 1px solid var(--soft-line); padding-top: 12px; }
.round-arrow { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid var(--line); border-radius: 50%; background: var(--white); font-size: 17px; font-weight: 900; }
.round-arrow:hover { background: var(--green); color: #10251d; }
.demo-cover-word { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 22px; font-family: var(--font-display); font-size: clamp(28px, 3vw, 43px); line-height: .88; text-transform: uppercase; color: #10251d; overflow-wrap: anywhere; }
.demo-shape { position: absolute; width: 66%; aspect-ratio: 1; top: 16%; left: 17%; border: 18px solid #fff; border-radius: 50%; }
.demo-shape--2 { border-radius: 0; transform: rotate(45deg); }
.demo-shape--3 { border-width: 3px; box-shadow: inset 0 0 0 22px #fff; transform: skew(-12deg); }
.demo-shape--4 { border-radius: 50% 0; transform: rotate(20deg); }

.feature-band { overflow: hidden; background: var(--sky); color: #10251d; border-block: 2px solid #10251d; }
.feature-grid { min-height: 600px; display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 70px; padding-block: 74px; }
.feature-intro h2 { margin-bottom: 24px; color: #003c28; }
.feature-intro > p:not(.eyebrow) { max-width: 450px; font-size: 19px; }
.feature-intro .button { margin-top: 18px; }
.device-scene { position: relative; min-height: 430px; }
.device { position: absolute; background: #f8fff5; border: 4px solid #10251d; box-shadow: 11px 11px 0 #10251d; overflow: hidden; }
.device--desktop { width: min(520px, 85%); aspect-ratio: 1.45; right: 0; top: 20px; border-radius: 8px; }
.device--phone { width: 154px; aspect-ratio: .52; left: 8%; bottom: 0; border-radius: 26px; transform: rotate(-4deg); }
.device-top { display: block; height: 28px; border-bottom: 3px solid #10251d; background: var(--green); }
.mini-library { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 34px; }
.mini-library i { aspect-ratio: .7; border: 2px solid #10251d; background: var(--yellow); box-shadow: 4px 4px 0 #10251d; }
.mini-library i:nth-child(2) { background: var(--coral); }
.mini-library i:nth-child(3) { background: var(--sky); }
.mini-page { padding: 36px 18px; }
.mini-page b { display: block; font-family: var(--font-display); font-size: 30px; margin-bottom: 25px; }
.mini-page i { display: block; height: 6px; margin: 10px 0; background: #10251d; }
.mini-page i:nth-of-type(2) { width: 70%; }
.sync-badge { position: absolute; right: 2%; bottom: 4%; display: flex; align-items: center; gap: 8px; padding: 12px 17px; border: 3px solid #10251d; background: var(--yellow); font-weight: 900; box-shadow: 5px 5px 0 #10251d; transform: rotate(4deg); }
.sync-badge span { font-size: 22px; }

.social-section { padding: 110px 0; background: var(--paper); }
.social-grid { display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: 80px; }
.social-copy > p:not(.eyebrow) { max-width: 440px; color: var(--muted); font-size: 18px; }
.social-copy .button { margin-top: 20px; }
.family-board { position: relative; min-height: 470px; border: 3px solid var(--line); background: var(--yellow); box-shadow: 10px 10px 0 var(--line); overflow: hidden; }
.family-board::before, .family-board::after { content: ""; position: absolute; width: 210px; height: 210px; border: 3px solid #10251d; border-radius: 50%; }
.family-board::before { left: -80px; top: -80px; background: var(--sky); }
.family-board::after { right: -55px; bottom: -65px; background: var(--green); }
.family-line { position: absolute; left: 22%; right: 20%; top: 48%; height: 3px; background: #10251d; transform: rotate(-9deg); }
.person-chip { position: absolute; z-index: 2; min-width: 150px; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: 24px 20px; align-items: center; column-gap: 10px; padding: 10px; border: 3px solid #10251d; background: #fff; color: #10251d; box-shadow: 5px 5px 0 #10251d; }
.person-chip > span { grid-row: 1 / 3; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #10251d; background: var(--sky); font-weight: 900; }
.person-chip b { line-height: 1; }
.person-chip small { color: #52625c; }
.person-chip--one { left: 9%; top: 18%; transform: rotate(-3deg); }
.person-chip--two { right: 8%; top: 16%; transform: rotate(4deg); }
.person-chip--three { right: 25%; bottom: 11%; transform: rotate(-2deg); }
.person-chip--two > span { background: var(--coral); }
.person-chip--three > span { background: var(--lavender); }
.shared-shelf { position: absolute; z-index: 2; left: 31%; top: 41%; width: 210px; padding: 18px; display: flex; align-items: end; gap: 8px; border: 3px solid #10251d; background: var(--forest); color: #fff; box-shadow: 6px 6px 0 #10251d; transform: rotate(2deg); }
.shared-shelf i { width: 25px; height: 68px; border: 2px solid #fff; background: var(--sky); }
.shared-shelf i:nth-child(2) { height: 57px; background: var(--green); }
.shared-shelf i:nth-child(3) { height: 72px; background: var(--coral); }
.shared-shelf strong { margin-left: 4px; font-size: 12px; }

.archive-hero, .dashboard-hero { padding: 74px 0 70px; border-bottom: 2px solid var(--line); background: var(--sky); color: #10251d; }
.archive-hero h1, .dashboard-hero h1 { max-width: 900px; margin-bottom: 18px; }
.archive-hero > .shell > p:last-child, .dashboard-hero > .shell > p:last-child { max-width: 640px; font-size: 19px; }
.archive-catalog { padding-top: 40px; }
.category-filter { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 30px; scrollbar-width: none; }
.category-filter a { flex: 0 0 auto; padding: 9px 15px; border: 2px solid var(--line); border-radius: 999px; background: var(--white); font-size: 13px; font-weight: 800; }
.category-filter a:hover, .category-filter .is-active { background: var(--forest); color: #fff; }
.pagination { margin-top: 60px; }
.nav-links { display: flex; justify-content: center; gap: 8px; }
.page-numbers { min-width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); }
.page-numbers.current { background: var(--green); color: #10251d; }
.empty-state { min-height: 320px; display: grid; place-items: center; align-content: center; text-align: center; border: 3px dashed var(--line); padding: 40px; }
.empty-state > span { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: var(--green); color: #10251d; font-family: var(--font-display); font-size: 30px; }
.empty-state h2 { margin-bottom: 8px; font-size: 34px; }
.empty-state p { margin: 0 0 24px; color: var(--muted); }

.product-page { padding: 78px 0 110px; }
.product-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); gap: clamp(54px, 8vw, 110px); align-items: start; }
.product-cover { position: relative; }
.product-cover > img, .product-cover-placeholder { position: relative; z-index: 2; width: 100%; aspect-ratio: 1450 / 2048; object-fit: cover; border: 3px solid var(--line); background: var(--book-accent); box-shadow: 10px 10px 0 var(--line); }
.product-cover > i { position: absolute; width: 80%; aspect-ratio: 1; left: -18%; bottom: -11%; background: var(--sky); border: 3px solid var(--line); border-radius: 50%; }
.product-cover-placeholder { display: grid; place-items: center; overflow: hidden; }
.product-cover-placeholder span { font-family: var(--font-display); font-size: 190px; color: #fff; -webkit-text-stroke: 4px #10251d; }
.product-cover-placeholder small { position: absolute; bottom: 24px; left: 24px; font-weight: 900; color: #10251d; }
.product-copy { padding-top: 20px; }
.product-copy h1 { margin-bottom: 18px; font-size: clamp(48px, 7vw, 84px); }
.product-author { margin-top: 0; color: var(--muted); font-size: 18px; font-weight: 700; }
.product-description { max-width: 680px; margin: 34px 0; color: var(--muted); font-size: 18px; }
.product-facts { display: flex; gap: 12px; margin-bottom: 34px; }
.product-facts span { min-width: 112px; display: grid; gap: 3px; padding: 12px; border: 2px solid var(--line); background: var(--white); }
.product-facts b { font-family: var(--font-display); font-size: clamp(14px, 1.7vw, 20px); overflow-wrap: anywhere; }
.product-facts span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.product-buy { min-width: min(100%, 360px); }
.product-copy form { display: inline; }
.secure-note { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.secure-note span { color: var(--green); }

.reader-shell { position: fixed; z-index: 300; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: #d9e7df; color: #10251d; }
.reader-shell.is-night { background: #0d1712; color: #eef8f1; }
.reader-toolbar { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 10px 24px; border-bottom: 2px solid currentColor; background: #fff; color: #10251d; }
.reader-shell.is-night .reader-toolbar, .reader-shell.is-night .reader-progress { background: #17251e; color: #eef8f1; }
.reader-back { font-weight: 850; }
.reader-title { display: grid; text-align: center; line-height: 1.2; }
.reader-title span { color: #63716b; font-size: 12px; }
.reader-tools { justify-self: end; display: flex; gap: 8px; }
.reader-stage { min-height: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr) 62px; align-items: center; gap: 18px; padding: 24px; }
.reader-book { position: relative; height: 100%; min-height: 0; display: grid; place-items: center; perspective: 1400px; }
#pdf-canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; box-shadow: 10px 12px 30px rgba(0,0,0,.24); transform-origin: left center; }
#pdf-canvas.is-turning-next { animation: pageNext .35s ease; }
#pdf-canvas.is-turning-prev { animation: pagePrev .35s ease; transform-origin: right center; }
@keyframes pageNext { 50% { transform: rotateY(-18deg) scale(.985); } }
@keyframes pagePrev { 50% { transform: rotateY(18deg) scale(.985); } }
.reader-loading { position: absolute; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.reader-loading span { width: 18px; height: 18px; border: 3px solid rgba(16,37,29,.25); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reader-nav { width: 52px; height: 52px; border: 2px solid currentColor; border-radius: 50%; background: #fff; color: #10251d; cursor: pointer; font-size: 22px; font-weight: 900; }
.reader-nav:disabled { opacity: .28; cursor: not-allowed; }
.reader-progress { min-height: 58px; display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 16px; padding: 10px 24px; border-top: 2px solid currentColor; background: #fff; font-size: 13px; font-weight: 800; }
.reader-progress span:last-child { text-align: right; }
.reader-progress input { accent-color: var(--green); }

.library-section, .account-section, .page-band { min-height: 50vh; padding: 60px 0 110px; }
.dashboard-hero { background: var(--green); }
.account-hero { background: var(--yellow); }
.notice-banner { margin-bottom: 24px; padding: 14px 18px; border: 2px solid var(--line); background: var(--green); color: #10251d; font-weight: 800; box-shadow: 4px 4px 0 var(--line); }
.login-callout { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 44px; border: 3px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.login-callout h2 { margin-bottom: 15px; }
.login-callout p:last-child { color: var(--muted); }
.library-tabs { display: flex; gap: 4px; margin-bottom: 36px; border-bottom: 2px solid var(--line); }
.library-tabs button { padding: 14px 18px; border: 0; border-bottom: 5px solid transparent; background: transparent; cursor: pointer; font-weight: 850; }
.library-tabs button.is-active { border-bottom-color: var(--green); }
.library-tabs span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; border-radius: 50%; background: var(--soft-line); font-size: 11px; }
.library-panel { display: none; }
.library-panel.is-active { display: block; }

.auth-grid { display: grid; grid-template-columns: 1fr .8fr; border: 3px solid var(--line); box-shadow: var(--shadow); }
.auth-panel, .auth-side { padding: clamp(32px, 5vw, 64px); }
.auth-panel { background: var(--white); }
.auth-side { background: var(--forest); color: #fff; }
.auth-panel h2, .auth-side h2 { font-size: 40px; }
.auth-side > span { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 46px; border-radius: 50%; background: var(--green); color: #10251d; font-size: 28px; }
.auth-side p { color: rgba(255,255,255,.74); }
.auth-side .button { margin-top: 18px; }
#loginform { display: grid; gap: 16px; }
#loginform p { margin: 0; }
#loginform label { display: grid; gap: 7px; font-weight: 800; font-size: 13px; }
#loginform input[type="text"], #loginform input[type="password"] { width: 100%; min-height: 48px; border: 2px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); padding: 8px 12px; }
#loginform .login-remember label { display: flex; align-items: center; }
#loginform input[type="submit"] { min-height: 50px; border: 2px solid var(--forest); background: var(--green); color: #10251d; font-weight: 900; box-shadow: 4px 4px 0 var(--forest); cursor: pointer; }
.auth-panel > .text-link { margin-top: 22px; }
.registration-note { padding: 12px; border: 1px solid rgba(255,255,255,.35); }
.profile-strip { display: flex; align-items: center; gap: 18px; margin-bottom: 34px; padding-bottom: 26px; border-bottom: 2px solid var(--line); }
.profile-strip img { width: 62px; height: 62px; border: 2px solid var(--line); border-radius: 50%; }
.profile-strip small, .profile-strip p { color: var(--muted); }
.profile-strip h2, .profile-strip p { margin: 0; }
.profile-strip h2 { font-size: 28px; }
.profile-strip .text-link { margin-left: auto; }
.connection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.connection-panel { display: flex; flex-direction: column; min-height: 440px; border: 3px solid var(--line); background: var(--white); padding: 30px; box-shadow: 7px 7px 0 var(--line); }
.connection-panel--family { background: color-mix(in srgb, var(--yellow) 26%, var(--white)); }
.connection-heading { display: flex; gap: 16px; padding-bottom: 24px; border-bottom: 2px solid var(--line); }
.connection-heading h2 { margin-bottom: 6px; font-size: 30px; }
.connection-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.connection-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid var(--line); border-radius: 50%; background: var(--sky); color: #10251d; font-size: 22px; }
.connection-panel--family .connection-icon { background: var(--green); }
.member-list { flex: 1; padding: 22px 0; }
.member-list > p { color: var(--muted); }
.member { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 22px 20px; align-items: center; column-gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--soft-line); }
.member img { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; }
.member span { color: var(--muted); font-size: 12px; }
.invite-form label { display: grid; gap: 8px; font-size: 12px; font-weight: 850; text-transform: uppercase; }
.invite-form label > span { display: grid; grid-template-columns: 1fr 48px; }
.invite-form input { min-width: 0; min-height: 48px; border: 2px solid var(--line); border-right: 0; background: var(--paper); color: var(--ink); padding: 10px 12px; }
.invite-form button { border: 2px solid var(--line); background: var(--green); color: #10251d; font-size: 20px; font-weight: 900; cursor: pointer; }
.game-page-hero { background: var(--yellow); color: #10251d; }
.game-page-hero .eyebrow { color: #10251d; }
.game-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.game-page-heading > div:first-child > p:last-child { max-width: 650px; }
.game-page-best { width: 124px; height: 124px; display: grid; place-items: center; align-content: center; flex: 0 0 auto; border: 3px solid #10251d; border-radius: 50%; background: var(--coral); text-align: center; transform: rotate(4deg); }
.game-page-best span, .game-page-best small { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.game-page-best strong { font-family: var(--font-display); font-size: 34px; line-height: 1; }
.game-page-section { min-height: 60vh; padding: 70px 0 110px; }
.book-game-tabs { width: min(calc(100% - 40px), 800px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 auto 30px max(20px, calc((100vw - 1180px) / 2)); border: 3px solid var(--line); background: var(--white); box-shadow: 5px 5px 0 var(--line); }
.book-game-tabs button { min-width: 0; min-height: 68px; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 22px 18px; align-content: center; column-gap: 10px; padding: 8px 14px; border: 0; border-right: 2px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.book-game-tabs button:last-child { border-right: 0; }
.book-game-tabs button > span { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; align-self: center; border: 2px solid var(--line); border-radius: 50%; background: var(--paper); font-family: var(--font-display); font-size: 15px; }
.book-game-tabs button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 13px; }
.book-game-tabs button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.book-game-tabs button.is-active { background: var(--green); color: #10251d; }
.book-game-tabs button.is-active > span { background: var(--yellow); color: #10251d; }
.book-game-tabs button.is-active small { color: #10251d; }
.book-game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .38fr); align-items: start; gap: 28px; }
.book-game-stage { min-width: 0; }
.book-game-panel[hidden] { display: none; }
.book-game-topline { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px; border: 3px solid var(--line); border-bottom: 0; background: var(--forest); color: #fff; }
.book-game-topline > strong { font-family: var(--font-display); font-size: 12px; text-transform: uppercase; }
.book-game-topline > div { display: flex; align-items: baseline; gap: 8px; }
.book-game-topline span { color: rgba(255,255,255,.7); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.book-game-topline b { font-family: var(--font-display); font-size: 24px; }
.book-game-progress { height: 11px; overflow: hidden; border: 3px solid var(--line); border-block-width: 0 3px; background: var(--soft-line); }
.book-game-progress i { display: block; width: 0; height: 100%; background: var(--green); transition: width .1s linear; }
.book-game-card { min-height: 430px; display: grid; align-content: center; gap: 18px; padding: clamp(30px, 5vw, 58px); border: 3px solid var(--line); border-top: 0; background: var(--yellow); color: #10251d; box-shadow: 8px 8px 0 var(--line); }
.book-game-card > span { justify-self: start; padding: 5px 9px; border: 2px solid #10251d; background: #fff; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.book-game-card h2 { margin: 0; font-size: clamp(34px, 4.6vw, 54px); }
.book-game-card > p { max-width: 700px; margin: 0; font-size: clamp(17px, 2vw, 21px); }
.book-game-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.book-game-choice { min-height: 60px; padding: 11px 14px; border: 3px solid #10251d; background: #fff; color: #10251d; box-shadow: 4px 4px 0 #10251d; cursor: pointer; font-weight: 900; text-align: left; }
.book-game-choice:hover:not(:disabled), .book-game-choice:focus-visible { background: var(--sky); transform: translate(-1px, -1px); }
.book-game-choice.is-correct { background: var(--green); }
.book-game-choice.is-wrong { background: var(--coral); }
.book-game-choice:disabled { cursor: default; opacity: 1; }
.book-game-actions { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; }
.book-game-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.book-game-actions .button { flex: 0 0 auto; }
.book-game-actions .button[hidden] { display: none; }
.book-catch-field { position: relative; min-height: 490px; overflow: hidden; touch-action: none; border: 3px solid var(--line); border-top: 0; background-color: var(--sky); background-image: linear-gradient(var(--soft-line) 1px, transparent 1px), linear-gradient(90deg, var(--soft-line) 1px, transparent 1px); background-size: 36px 36px; box-shadow: 8px 8px 0 var(--line); outline: none; }
.book-catch-field::after { content: ""; position: absolute; inset: auto 0 0; height: 76px; border-top: 3px solid var(--line); background: var(--green); }
.book-catch-field:focus-visible { outline: 4px solid var(--coral); outline-offset: 3px; }
.book-catch-message { position: absolute; z-index: 2; left: 50%; top: 42%; width: min(82%, 430px); transform: translate(-50%, -50%); text-align: center; transition: opacity .16s ease; }
.book-catch-message > span { display: inline-flex; margin-bottom: 12px; padding: 5px 8px; border: 2px solid #10251d; background: var(--yellow); color: #10251d; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.book-catch-message h2 { margin-bottom: 10px; color: #10251d; font-size: clamp(36px, 5vw, 52px); }
.book-catch-message p { margin: 0; color: #10251d; font-size: 16px; }
.book-catch-field.is-playing .book-catch-message { opacity: 0; pointer-events: none; }
.book-catch-items { position: absolute; z-index: 3; inset: 0 0 76px; overflow: hidden; pointer-events: none; }
.book-catch-item { position: absolute; top: 0; left: 0; width: 34px; height: 49px; display: grid; place-items: center; border: 3px solid #10251d; border-radius: 2px; background: var(--coral); color: #10251d; box-shadow: 4px 4px 0 #10251d; font-family: var(--font-display); font-size: 12px; will-change: transform; }
.book-catch-item::before { content: ""; position: absolute; inset: 5px 5px 12px; border: 2px solid currentColor; border-radius: 50% 50% 3px 3px; opacity: .42; }
.book-catch-item::after { content: "E"; position: relative; z-index: 1; }
.book-catch-item:nth-child(3n+2) { background: var(--yellow); }
.book-catch-item:nth-child(3n) { background: var(--paper); }
.book-catch-item.is-gold { width: 38px; height: 54px; background: var(--yellow); }
.book-catch-item.is-gold::after { content: "★"; }
.book-catch-shelf { position: absolute; z-index: 5; left: 0; bottom: 21px; width: 126px; height: 57px; display: flex; align-items: end; justify-content: center; gap: 4px; will-change: transform; }
.book-catch-shelf i { width: 24px; height: 38px; border: 3px solid #10251d; border-bottom: 0; background: var(--yellow); }
.book-catch-shelf i:nth-child(2) { height: 48px; background: var(--coral); }
.book-catch-shelf i:nth-child(3) { height: 33px; background: var(--paper); }
.book-catch-shelf b { position: absolute; inset: auto 0 0; height: 13px; border: 3px solid #10251d; background: var(--forest); box-shadow: 4px 4px 0 #10251d; }
.book-catch-actions > div { display: flex; align-items: center; gap: 9px; }
.book-catch-move { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; font-size: 22px; font-weight: 900; }
.book-catch-move:hover, .book-catch-move:focus-visible { background: var(--sky); }
.book-catch-pop { position: absolute; z-index: 7; pointer-events: none; color: #10251d; font-family: var(--font-display); font-size: 16px; animation: book-catch-pop .55s ease forwards; }
@keyframes book-catch-pop { to { transform: translateY(-35px) scale(1.2); opacity: 0; } }
.book-glider-progress i { width: 100%; background: var(--coral); }
.book-glider-field { position: relative; min-height: 490px; overflow: hidden; touch-action: manipulation; border: 3px solid var(--line); border-top: 0; background: var(--yellow); color: #10251d; box-shadow: 8px 8px 0 var(--line); outline: none; }
.book-glider-field::before, .book-glider-field::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; height: 18px; border-block: 3px solid #10251d; background: var(--paper); }
.book-glider-field::before { top: 0; }
.book-glider-field::after { bottom: 0; }
.book-glider-field:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }
.book-glider-skywords { position: absolute; z-index: 0; inset: 30px 18px; display: flex; flex-direction: column; justify-content: space-around; overflow: hidden; color: color-mix(in srgb, #10251d 13%, transparent); font-family: var(--font-display); font-size: clamp(44px, 8vw, 86px); line-height: .8; pointer-events: none; }
.book-glider-skywords span:nth-child(2) { align-self: end; }
.book-glider-message { position: absolute; z-index: 2; left: 50%; top: 46%; width: min(82%, 440px); transform: translate(-50%, -50%); text-align: center; transition: opacity .16s ease; }
.book-glider-message > span { display: inline-flex; margin-bottom: 12px; padding: 5px 8px; border: 2px solid #10251d; background: var(--sky); color: #10251d; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.book-glider-message h2 { margin-bottom: 10px; color: #10251d; font-size: clamp(36px, 5vw, 52px); }
.book-glider-message p { margin: 0; color: #10251d; font-size: 16px; }
.book-glider-field.is-playing .book-glider-message { opacity: 0; pointer-events: none; }
.book-glider-gates { position: absolute; z-index: 3; inset: 18px 0; overflow: hidden; pointer-events: none; }
.book-glider-gate { position: absolute; top: 0; left: 0; width: 58px; border: 3px solid #10251d; background: var(--forest); box-shadow: 5px 5px 0 #10251d; will-change: transform; }
.book-glider-gate::before { content: "STORY GATE"; position: absolute; left: 50%; top: 50%; color: #fff; font-family: var(--font-display); font-size: 8px; white-space: nowrap; transform: translate(-50%, -50%) rotate(90deg); }
.book-glider-gate::after { content: ""; position: absolute; left: 13px; right: 13px; height: 18px; border: 3px solid #10251d; background: var(--coral); }
.book-glider-gate.is-top::after { bottom: -10px; }
.book-glider-gate.is-bottom::after { top: -10px; }
.book-glider-book { position: absolute; z-index: 5; left: 0; top: 0; width: 54px; height: 40px; will-change: transform; }
.book-glider-book i { position: absolute; top: 3px; width: 29px; height: 32px; border: 3px solid #10251d; background: #fff; box-shadow: 2px 3px 0 #10251d; }
.book-glider-book i:first-child { left: 0; transform: skewY(-10deg); transform-origin: right center; }
.book-glider-book i:nth-child(2) { right: 0; transform: skewY(10deg); transform-origin: left center; background: var(--sky); }
.book-glider-book i::after { content: ""; position: absolute; inset: 7px 5px; border-block: 2px solid #10251d; }
.book-glider-book b { position: absolute; z-index: 2; left: 50%; top: 3px; bottom: 2px; width: 3px; background: #10251d; transform: translateX(-50%); }
.book-glider-book.is-crashed { filter: grayscale(.45); }
.book-glider-actions > div { display: flex; align-items: center; gap: 9px; }
.book-glider-lift { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--sky); color: #10251d; cursor: pointer; font-size: 24px; font-weight: 900; box-shadow: 3px 3px 0 var(--line); }
.book-glider-lift:hover, .book-glider-lift:focus-visible { background: var(--coral); }
.book-glider-lift:disabled { cursor: default; opacity: .45; box-shadow: none; }
.book-game-leaderboard { overflow: hidden; border: 3px solid var(--line); background: var(--white); box-shadow: 8px 8px 0 var(--line); }
.book-game-leaderboard header { position: relative; padding: 27px 23px 21px; border-bottom: 3px solid var(--line); background: var(--sky); color: #10251d; }
.book-game-leaderboard header .eyebrow { margin-bottom: 6px; color: #10251d; }
.book-game-leaderboard header h2 { margin: 0; font-size: 29px; }
.book-game-leaderboard header small { position: absolute; right: 14px; top: 16px; padding: 4px 7px; border: 2px solid #10251d; background: var(--yellow); color: #10251d; font-size: 8px; font-weight: 900; text-transform: uppercase; transform: rotate(4deg); }
.book-game-leaderboard ol { margin: 0; padding: 8px 18px; list-style: none; counter-reset: wp-leaderboard; }
.book-game-leaderboard li { min-height: 60px; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--soft-line); counter-increment: wp-leaderboard; }
.book-game-leaderboard li::before { content: counter(wp-leaderboard); width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--paper); font-family: var(--font-display); font-size: 10px; }
.book-game-leaderboard li:first-child::before { background: var(--yellow); color: #10251d; }
.book-game-leaderboard li.is-player::before { background: var(--green); color: #10251d; }
.book-game-leaderboard li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 850; }
.book-game-leaderboard li strong { font-family: var(--font-display); font-size: 13px; }
.book-game-leaderboard footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 21px; border-top: 3px solid var(--line); background: var(--green); color: #10251d; }
.book-game-leaderboard footer span { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.book-game-leaderboard footer strong { font-family: var(--font-display); font-size: 14px; }
.game-signin-note { margin-top: 30px; color: var(--muted); font-size: 14px; }
.game-signin-note a { color: var(--ink); font-weight: 900; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 3px; }
.content-entry h1 { font-size: clamp(42px, 6vw, 72px); }
.entry-content { font-size: 18px; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; }

.site-footer { background: var(--forest); color: #fff; border-top: 2px solid #10251d; padding: 58px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .6fr; gap: 50px; }
.footer-logo { width: 140px; height: 75px; object-fit: cover; object-position: 50% 49%; background: #fff; }
.footer-grid > div { display: flex; flex-direction: column; align-items: start; gap: 9px; }
.footer-grid p, .footer-grid a { color: rgba(255,255,255,.7); font-size: 14px; }
.footer-grid a:hover { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 45px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.58); font-size: 12px; }

.ai-launcher { position: fixed; z-index: 150; right: 22px; bottom: 22px; min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 5px 16px 5px 5px; border: 2px solid #10251d; border-radius: 999px; background: var(--yellow); color: #10251d; box-shadow: 4px 4px 0 #10251d; cursor: pointer; }
.ai-launcher span { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #10251d; border-radius: 50%; background: var(--sky); font-family: var(--font-display); font-size: 11px; }
.ai-launcher strong { font-size: 13px; }
.ai-panel { position: fixed; z-index: 160; right: 22px; bottom: 82px; width: min(370px, calc(100vw - 28px)); height: min(540px, calc(100vh - 110px)); display: grid; grid-template-rows: auto 1fr auto auto; border: 3px solid #10251d; background: var(--paper); color: var(--ink); box-shadow: 9px 9px 0 #10251d; transform: translateY(14px) scale(.98); transform-origin: bottom right; opacity: 0; visibility: hidden; transition: .18s ease; }
.ai-panel.is-open { transform: none; opacity: 1; visibility: visible; }
.ai-head { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 2px solid var(--line); background: var(--forest); color: #fff; }
.ai-head > div { display: grid; grid-template-columns: 12px 1fr; grid-template-rows: 22px 18px; column-gap: 9px; }
.ai-status { grid-row: 1 / 3; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.ai-head small { color: rgba(255,255,255,.66); }
.ai-head .icon-button { width: 34px; height: 34px; border-color: #fff; background: transparent; color: #fff; font-size: 22px; }
.ai-messages { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.ai-message { max-width: 84%; margin: 0; padding: 10px 12px; border: 2px solid var(--line); background: var(--white); font-size: 13px; }
.ai-message--user { align-self: end; background: var(--sky); color: #10251d; }
.ai-message--mark { align-self: start; box-shadow: 3px 3px 0 var(--line); }
.ai-suggestions { display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px; border-top: 1px solid var(--soft-line); }
.ai-suggestions button { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 11px; }
.ai-form { display: grid; grid-template-columns: 1fr 44px; padding: 10px; border-top: 2px solid var(--line); }
.ai-form input { min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 8px; outline: none; }
.ai-form button { border: 2px solid var(--line); border-radius: 50%; background: var(--green); color: #10251d; font-weight: 900; cursor: pointer; }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .mobile-nav { position: fixed; top: 76px; inset-inline: 0; display: grid; padding: 18px 24px 24px; border-bottom: 2px solid var(--line); background: var(--paper); transform: translateY(-140%); opacity: 0; transition: .2s ease; }
  .mobile-nav.is-open { transform: none; opacity: 1; }
  .mobile-nav a { padding: 13px 0; border-bottom: 1px solid var(--soft-line); font-weight: 850; }
  .hero-grid { grid-template-columns: 1fr .8fr; gap: 10px; }
  .hero-visual { transform: scale(.8); transform-origin: center; margin-inline: -60px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid { gap: 30px; }
  .device--phone { left: -2%; }
  .social-grid { gap: 35px; }
  .family-board { min-height: 420px; }
  .shared-shelf { left: 24%; }
}

@media (max-width: 760px) {
  .shell, .shell.narrow { width: min(100% - 28px, 620px); }
  .header-row { min-height: 66px; }
  .brand { width: 126px; height: 48px; }
  .brand img { width: 150px; height: 150px; left: -12px; top: -51px; }
  .account-button { display: none; }
  .mobile-nav { top: 66px; }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; padding: 48px 0 30px; }
  .hero-copy h1 { font-size: clamp(44px, 14vw, 66px); }
  .hero-copy h1 em { -webkit-text-stroke-width: 1px; }
  .hero-actions { align-items: start; flex-direction: column; gap: 20px; }
  .hero-stats { display: none; }
  .hero-visual { min-height: 420px; transform: scale(.65); transform-origin: top center; margin: 20px -110px -145px; }
  .marquee-band div { justify-content: flex-start; }
  .catalog-section { padding: 68px 0 78px; }
  .section-heading { align-items: start; flex-direction: column; margin-bottom: 28px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
  .book-cover { box-shadow: 4px 4px 0 var(--line); }
  .book-card h3 { font-size: 18px; }
  .demo-cover-word { font-size: clamp(24px, 8vw, 36px); }
  .feature-grid, .social-grid { grid-template-columns: 1fr; gap: 35px; }
  .feature-grid { padding: 62px 0 30px; }
  .device-scene { min-height: 390px; }
  .social-section { padding: 72px 0 85px; }
  .family-board { min-height: 430px; }
  .person-chip { min-width: 132px; grid-template-columns: 39px 1fr; }
  .person-chip > span { width: 39px; height: 39px; }
  .person-chip--one { left: 4%; }
  .person-chip--two { right: 3%; top: 25%; }
  .person-chip--three { right: 7%; }
  .shared-shelf { left: 12%; top: 46%; }
  .archive-hero, .dashboard-hero { padding: 54px 0; }
  .archive-hero h1, .dashboard-hero h1 { font-size: clamp(42px, 13vw, 64px); }
  .product-page { padding: 45px 0 80px; }
  .product-grid { grid-template-columns: 1fr; gap: 54px; }
  .product-cover { width: min(78vw, 400px); margin-inline: auto; }
  .product-copy h1 { font-size: clamp(46px, 13vw, 72px); }
  .reader-toolbar { grid-template-columns: auto 1fr auto; padding: 8px 12px; }
  .reader-back { font-size: 0; }
  .reader-back::first-letter { font-size: 22px; }
  .reader-title { text-align: left; overflow: hidden; }
  .reader-title strong, .reader-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reader-tools .reader-theme { display: none; }
  .reader-stage { grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 3px; padding: 10px 5px; }
  .reader-nav { width: 39px; height: 39px; }
  .reader-progress { grid-template-columns: 58px 1fr 63px; gap: 8px; padding-inline: 12px; }
  .login-callout { align-items: stretch; flex-direction: column; padding: 28px; }
  .auth-grid, .connection-grid { grid-template-columns: 1fr; }
  .auth-side > span { margin-bottom: 30px; }
  .profile-strip { align-items: flex-start; flex-wrap: wrap; }
  .profile-strip .text-link { width: 100%; margin-left: 80px; }
  .game-page-heading { align-items: flex-start; flex-direction: column; }
  .game-page-best { width: 100px; height: 100px; align-self: flex-end; margin-top: -70px; }
  .book-game-tabs { width: min(100% - 28px, 620px); margin: 0 auto 28px; }
  .book-game-tabs button { min-height: 62px; grid-template-columns: 30px minmax(0, 1fr); padding: 7px 9px; column-gap: 7px; }
  .book-game-tabs button > span { width: 28px; height: 28px; }
  .book-game-tabs button b { font-size: 11px; }
  .book-game-tabs button small { font-size: 8px; }
  .book-game { grid-template-columns: 1fr; }
  .book-game-card { min-height: 400px; padding: 30px 22px; }
  .book-game-choices { grid-template-columns: 1fr; }
  .book-game-actions { align-items: stretch; flex-direction: column; }
  .book-game-actions .button { width: 100%; }
  .book-catch-field { min-height: 440px; }
  .book-catch-message { top: 38%; }
  .book-catch-actions > div { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .book-catch-actions .button { min-width: 0; }
  .book-glider-field { min-height: 440px; }
  .book-glider-message { top: 42%; }
  .book-glider-actions > div { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr); }
  .book-glider-actions .button { min-width: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { align-items: start; flex-direction: column; gap: 8px; }
  .ai-launcher { right: 14px; bottom: 14px; }
  .ai-launcher strong { display: none; }
  .ai-launcher { width: 48px; padding: 5px; }
  .ai-panel { right: 14px; bottom: 74px; }
  .page-template-page-play .ai-launcher, .page-template-page-play .ai-panel { display: none; }
}

@media (max-width: 390px) {
  .hero-stats { flex-direction: column; gap: 14px; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { width: min(100%, 290px); margin-inline: auto; }
  .product-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
  .product-facts span { min-width: 0; }
  .family-board { margin-inline: -6px; }
  .shared-shelf { width: 180px; }
}

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