/* StoryPress — Apple-Clean Mobile-First Library & Sunlit Natural White Oak Bookshelves
   Bright alabaster gallery (#FAF8F5), single-row frosted header, chapternav quick-launchers,
   standing 3D hardcovers with on-book jacket titles, and sunlit white oak floating shelves. */

:root {
  --bg: #FAF8F5;
  --pedestal: #F2EFE9;
  --pedestal-hover: #EAE5DC;
  --surface: #FFFFFF;
  --indigo: #9A3B1E;
  --indigo-dark: #7C2D14;
  --indigo-soft: #FBF1EB;
  --brass: #C89B54;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --line: #E5E2DC;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* 1. Single-Row Frosted Translucent Header (Apple.com Style) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 248, 245, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: var(--ink);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.subpage-back-pill {
  appearance: none;
  background: rgba(29, 29, 31, 0.06);
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  white-space: nowrap;
}
.subpage-back-pill:hover {
  background: rgba(29, 29, 31, 0.11);
}

.main-nav {
  display: none !important;
}

.nav-item {
  appearance: none;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-item:hover, .nav-item.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Funnel Progress Breadcrumbs */
.funnel-steps {
  display: none;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.funnel-steps::-webkit-scrollbar { display: none; }
.funnel-steps.visible { display: flex; }

.f-step {
  appearance: none;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.f-step.active {
  background: rgba(29, 29, 31, 0.08);
  color: var(--ink);
  font-weight: 700;
}
.f-step.done { color: var(--ink); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-right .btn {
  white-space: nowrap;
}

.header-text-link {
  appearance: none;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 2px;
  white-space: nowrap;
}
.header-text-link:hover {
  color: var(--indigo);
}

html.sp-subroute #page-home:not(.hydrated) {
  display: none !important;
}

/* Clean Pill Buttons */
.btn {
  appearance: none;
  border: 1px solid #D6D3CD;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.16s ease;
}
.btn:hover {
  border-color: #A8A39B;
  background: #F5F3EF;
}

.btn-primary, .btn-crimson {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
  padding: 9px 18px;
}
.btn-primary:hover, .btn-crimson:hover {
  background: #333336;
  border-color: #333336;
  color: #FFFFFF;
}

.btn-teal, .btn-soft {
  background: #F1EEE8;
  border-color: #E0DBD1;
  color: var(--ink);
}
.btn-teal:hover, .btn-soft:hover {
  background: #E7E2D9;
  border-color: #CFC8BC;
}

.btn-small {
  font-size: 12.5px;
  padding: 6px 14px;
}

.route-page { display: none; }
.route-page.active { display: block; }

/* 2. Gallery Container, Chapternav Strip & Filter Pills */
.gallery-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px 64px;
}

.gallery-hero-center {
  text-align: center;
  margin: 0 0 16px;
}
.gallery-h1 {
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.7vw, 33px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}
.gallery-sub {
  margin: 7px auto 0;
  max-width: 660px;
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--muted);
}
.gallery-pillars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.78;
}
.voice-demo-strip {
  max-width: 880px;
  margin: 14px auto 0;
  background: #FFFFFF;
  border: 1.5px solid #D7ECE4;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  text-align: left;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.06);
}
.voice-demo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E5E7EB;
}
.voice-demo-meta {
  flex: 1;
  min-width: 190px;
}
.voice-demo-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}
.voice-demo-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.voice-demo-progress {
  margin-top: 6px;
  height: 4px;
  background: #EEF2F6;
  border-radius: 999px;
  overflow: hidden;
}
.voice-demo-progress-fill {
  height: 100%;
  width: 0%;
  background: #0F766E;
  transition: width 0.12s linear;
}
.voice-demo-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.voice-demo-btn {
  appearance: none;
  border: 1px solid #C8D6D0;
  background: #F4FBF8;
  color: #0F766E;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.voice-demo-btn:hover {
  background: #E2F6EF;
}
.voice-demo-btn.playing {
  background: #0F766E;
  border-color: #0F766E;
  color: #FFFFFF;
}
@media (max-width: 640px) {
  .voice-demo-strip {
    padding: 12px;
  }
  .voice-demo-actions {
    width: 100%;
  }
  .voice-demo-actions .btn-primary {
    flex: 1 1 100%;
    text-align: center;
    justify-content: center;
  }
}
.voice-payoff-card {
  margin-bottom: 18px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #F0FDF9 0%, #FFFDF9 72%);
  border: 1.5px solid #BCE3D6;
}
.voice-payoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 196px;
  gap: 20px;
  align-items: center;
}
.voice-qr-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.voice-qr-box {
  width: 144px;
  height: 144px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: #FFFFFF;
}
.voice-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 760px) {
  .voice-payoff-grid {
    grid-template-columns: 1fr;
  }
  .voice-qr-panel {
    max-width: 220px;
  }
}

/* Apple.com Chapternav Quick-Create Strip */
.chapternav-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-width: 880px;
  margin: 0 auto 18px;
}

.chapternav-item {
  appearance: none;
  background: #FFFFFF;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.chapternav-item:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 29, 31, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.chapternav-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #F5F2EC;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chapternav-item:first-child .chapternav-icon {
  background: #FBF1EB;
  color: var(--indigo);
}
.chapternav-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Category Filter Pills */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.cat-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(29, 29, 31, 0.05);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #424245;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cat-pill:hover {
  background: rgba(29, 29, 31, 0.09);
  color: var(--ink);
}
.cat-pill.active {
  background: var(--ink);
  color: #FFFFFF;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.library-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12.5px;
}
.library-footer-links .nav-item {
  font-size: 12.5px;
}

/* 3. Standalone Pedestals (Personalizer & Publish Previews) */
.mb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
}
.mb-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mb-pedestal {
  background: var(--pedestal);
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mb-book-cover {
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  border-radius: 2px 6px 6px 2px;
  padding: 10px 10px 26px 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    -1px 0 0 #DDD7CC,
    0 14px 28px rgba(29, 29, 31, 0.12),
    0 2px 6px rgba(29, 29, 31, 0.06);
}
.mb-book-hinge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 1.5px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.11), rgba(255, 255, 255, 0.85));
  pointer-events: none;
  z-index: 3;
}
.mb-book-art {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #F0ECE4;
}
.mb-book-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mb-book-microtitle {
  position: absolute;
  left: 15px;
  right: 10px;
  bottom: 7px;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   SUNLIT NATURAL WHITE OAK FLOATING BOOKSHELVES
   ========================================================= */
.oak-library-stage {
  width: 100%;
  min-width: 0;
}

.oak-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.oak-shelf-section {
  min-width: 0;
}

.oak-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding: 0 4px;
}

.oak-section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.oak-see-all {
  appearance: none;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--indigo);
  cursor: pointer;
  padding: 4px 2px;
}
.oak-see-all:hover {
  text-decoration: underline;
}

/* Curated Swimlane Shelf: Horizontal Touch-Swipe on Mobile, 4-Column Row on Desktop */
.oak-swimlane-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.oak-swimlane-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  min-width: 0;
}

@media (min-width: 821px) {
  .oak-swimlane-track > .oak-slot:nth-child(n+5) {
    display: none;
  }
}

@media (max-width: 820px) {
  .oak-swimlane-track {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 46%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .oak-swimlane-track::-webkit-scrollbar {
    display: none;
  }
  .oak-swimlane-track > .oak-slot {
    scroll-snap-align: start;
  }
}

/* Category View Multi-Row Oak Shelf Grid */
.oak-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.oak-grid > .oak-slot {
  margin-bottom: 28px;
}

.oak-slot {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

/* Sunlit Alabaster Wall Backboard Above the Oak Plank */
.oak-nook {
  flex: 1;
  padding: 8px 8px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(250, 248, 245, 0) 0%, rgba(235, 226, 211, 0.42) 100%);
}

/* Standing 3D Hardcover Volume (Title Printed Cleanly on Front Jacket Above Shelf!) */
.oak-book {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 242px;
  background: #FFFFFF;
  border-radius: 3px 7px 7px 2px;
  border: 1px solid #EAE5DC;
  box-shadow:
    2px 0 0 #FAF7F2,
    3px 0 0 #D8D1C5,
    4px 0 0 #F6F2EA,
    0 10px 22px rgba(45, 34, 20, 0.13),
    0 2px 5px rgba(45, 34, 20, 0.06);
  transform-origin: bottom center;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.oak-slot:hover .oak-book {
  transform: translateY(-5px);
  box-shadow:
    2px 0 0 #FAF7F2,
    3px 0 0 #D8D1C5,
    4px 0 0 #F6F2EA,
    0 16px 30px rgba(45, 34, 20, 0.18),
    0 4px 8px rgba(45, 34, 20, 0.08);
}

.mb-book-spine-band {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 6px;
  border-radius: 3px 0 0 2px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0%, rgba(255, 255, 255, 0.28) 42%, rgba(0, 0, 0, 0.14) 100%),
    var(--spine-cloth, #7C2D1E);
  z-index: 2;
  pointer-events: none;
}

.oak-book-main {
  display: block;
  text-decoration: none;
  color: inherit;
}

.oak-book-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 7px 7px 0 11px;
}

.oak-book-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  background: #F2EFE8;
}

.oak-book-title-wrap {
  padding: 7px 8px 3px 11px;
}

.oak-book-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.24;
  min-height: 2.48em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oak-book-foot {
  padding: 0 8px 7px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.oak-book-cat {
  font-size: 10.5px;
  font-weight: 600;
  color: #86868B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oak-book-cust {
  font-size: 11px;
  font-weight: 700;
  color: var(--indigo);
  white-space: nowrap;
  flex-shrink: 0;
}
.oak-book-cust:hover {
  text-decoration: underline;
}

.oak-pub-toggle {
  appearance: none;
  background: #F2EFE9;
  border: 1px solid #DFDAD0;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.oak-pub-toggle.is-live {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #047857;
}

/* Natural White Oak Floating Shelf Ledge */
.oak-plank {
  width: 100%;
  position: relative;
  z-index: 3;
}

.oak-plank-top {
  height: 7px;
  background: linear-gradient(180deg, #D5BC97 0%, #E7D4B5 52%, #F1E3CA 100%);
  border-radius: 2px 2px 0 0;
}

.oak-plank-face {
  height: 11px;
  background: linear-gradient(180deg, #DFC5A0 0%, #CEAE82 58%, #B89465 100%);
  border-top: 1px solid rgba(255, 251, 243, 0.78);
  border-bottom: 1px solid #A48154;
  border-radius: 0 0 3px 3px;
  box-shadow:
    0 11px 20px rgba(56, 39, 18, 0.10),
    0 2px 4px rgba(56, 39, 18, 0.05);
}

.oak-grid .oak-plank-top,
.oak-grid .oak-plank-face {
  border-radius: 0;
}

/* Empty Slot Extensions on Partial Final Grid Rows */
.oak-empty-slot { display: none; }

@media (max-width: 680px) {
  .oak-empty-slot.vis-2col { display: flex; }
}
@media (min-width: 681px) and (max-width: 1040px) {
  .oak-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .oak-empty-slot.vis-3col { display: flex; }
}
@media (min-width: 1041px) {
  .oak-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .oak-empty-slot.vis-4col { display: flex; }
}

@media (min-width: 681px) {
  .oak-sections-stack { gap: 36px; }
  .oak-grid > .oak-slot { margin-bottom: 34px; }
  .oak-nook { padding: 12px 14px 0; }
  .oak-book-art { padding: 8px 8px 0 13px; }
  .oak-book-title-wrap { padding: 8px 10px 4px 13px; }
  .oak-book-title { font-size: 14px; }
  .oak-book-foot { padding: 0 10px 8px 13px; }
}

/* Empty Personal Shelf State */
.empty-oak-bay {
  grid-column: 1 / -1;
}
.empty-oak-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px 14px 4px 4px;
  padding: 30px 22px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(45, 34, 20, 0.07);
}

/* Studio Compact Subpage Headers (/kids-quick, /roast-quick, /seek-quick) */
.studio-compact-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.studio-compact-head .funnel-title {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
}
.studio-jump-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--indigo);
  white-space: nowrap;
}

/* Fallback Meta Classes Outside Shelf */
.mb-card-meta {
  padding: 10px 2px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.mb-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  width: 100%;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mb-card-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 700;
}
.mb-link-primary { color: var(--indigo); }
.mb-link-primary:hover { text-decoration: underline; }
.mb-link-muted { color: var(--muted); }
.mb-link-muted:hover { color: var(--ink); }

/* 4. Zero-Clutter Quick Kids Book Studio (/kids-quick) */
.qk-studio {
  max-width: 1220px;
  margin: 28px auto 72px;
  padding: 0 32px;
}

.qk-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 36px;
  align-items: start;
}

.qk-panel {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 8px 28px rgba(20, 18, 42, 0.04);
}

.qk-step-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
}

.age-pills {
  display: flex;
  gap: 6px;
}
.age-pill {
  appearance: none;
  background: #FFFFFF;
  border: 1px solid #D6D5E2;
  border-radius: 8px;
  padding: 9px 11px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.age-pill.selected {
  background: var(--indigo-soft);
  border-color: var(--indigo);
  color: var(--indigo);
}

.qk-interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.qk-interest-chip {
  appearance: none;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: all 0.14s ease;
}
.qk-interest-chip:hover {
  border-color: #B8B6CB;
}
.qk-interest-chip.selected {
  border-color: var(--indigo);
  background: var(--indigo-soft);
}
.qk-interest-chip img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.qk-interest-chip strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

/* Inline Mad-Libs Fill-In Sentence Card */
.fillin-sentence-box {
  background: var(--pedestal);
  border-radius: 10px;
  padding: 15px 16px;
  font-size: 14px;
  line-height: 2.05;
  color: var(--ink);
  margin-bottom: 16px;
}

.inline-blank {
  border: none;
  border-bottom: 2px solid var(--indigo);
  background: #FFFFFF;
  border-radius: 5px 5px 0 0;
  padding: 2px 9px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--indigo);
  width: 148px;
  margin: 0 2px;
}
.inline-blank:focus {
  outline: none;
  background: var(--indigo-soft);
}

.mood-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}
.mood-tab {
  appearance: none;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.mood-tab.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

/* Right Sticky Live 9-Slide Studio Stage on /kids-quick */
.qk-stage {
  position: sticky;
  top: 88px;
  background: var(--pedestal);
  border-radius: 14px;
  padding: 28px 28px 22px;
}

.qk-stage-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

/* Live Open Two-Page Spread inside Preview Pedestal */
.preview-spread {
  background: #FFFFFF;
  border-radius: 6px;
  min-height: 360px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(20, 18, 42, 0.12), 0 2px 8px rgba(20, 18, 42, 0.05);
}
.preview-spread-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 24px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.preview-left {
  padding: 22px;
  background: #FAF9FC;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-left img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.preview-right {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.slide-pills {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.slide-pill {
  appearance: none;
  border: 1px solid #D9D8E6;
  background: #FFFFFF;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.slide-pill.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #FFFFFF;
}

/* 5. Guided Custom Funnel & Open-Book Studio Editor */
.funnel-container {
  max-width: 880px;
  margin: 38px auto 80px;
  padding: 0 28px;
}
.funnel-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 6px;
  display: block;
}
.funnel-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 10px 0;
  color: var(--ink);
}
.funnel-lead {
  font-size: 15.5px;
  color: var(--muted);
  margin: 0 0 26px 0;
  max-width: 660px;
}

.big-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}
.big-choice-card {
  background: #FFFFFF;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: all 0.18s ease;
}
.big-choice-card:hover { border-color: #B8B6CB; }
.big-choice-card.selected {
  border-color: var(--indigo);
  box-shadow: 0 10px 28px rgba(81, 56, 238, 0.12);
}
.big-choice-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}
.big-choice-body { padding: 16px 20px 18px; }
.big-choice-body strong {
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}
.big-choice-body span { font-size: 14px; color: var(--muted); }

.length-row-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.length-card {
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.length-card.selected {
  border-color: var(--indigo);
  background: var(--indigo-soft);
}
.length-card strong { display: block; font-size: 14.5px; color: var(--ink); }
.length-card span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid #D6D5E2;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  margin-bottom: 16px;
}
.textarea { min-height: 145px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(81, 56, 238, 0.10);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.how-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
}
.step-pill {
  display: inline-block;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-weight: 700;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.photo-drop-box {
  background: var(--pedestal);
  border: 1.5px dashed #C7C5D8;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.polaroid-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.polaroid-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: 8px;
}

.style-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.style-visual-card {
  background: #FFFFFF;
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
}
.style-visual-card.selected {
  border-color: var(--indigo);
  box-shadow: 0 8px 22px rgba(81, 56, 238, 0.14);
}
.style-visual-card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  display: block;
}
.style-visual-card .sv-body { padding: 12px 14px; }
.style-visual-card strong { display: block; font-size: 14.5px; color: var(--ink); }
.style-visual-card span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.personalize-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: start;
}

.funnel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}

/* 6. Clean Mixbook Studio Open-Book Editor (/create/:slug/pages) */
.editor-theater {
  background: var(--pedestal);
  padding: 24px 24px 44px;
  min-height: calc(100vh - 68px);
}
.editor-topbar {
  max-width: 980px;
  margin: 0 auto 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hardcover-board {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 24px 54px rgba(20, 18, 42, 0.12), 0 2px 8px rgba(20, 18, 42, 0.05);
}

.open-book-editor {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.book-spine-shadow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 32px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.07) 50%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 10;
}

.editor-left-leaf {
  background: #FAF9FC;
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.editor-art-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: #ECEBF2;
}
.editor-art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-right-leaf {
  background: #FFFFFF;
  padding: 34px 38px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.inline-heading-input {
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
  width: 100%;
  padding: 4px 0;
}
.inline-heading-input:focus { outline: none; border-bottom-color: var(--indigo); }

.inline-story-textarea {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.58;
  color: var(--ink);
  width: 100%;
  min-height: 235px;
  resize: vertical;
  padding: 8px;
  margin: 8px 0;
}
.editor-right-leaf .btn-small {
  padding: 6px 10px;
  font-size: 12px;
}
details.publish-accordion > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
details.publish-accordion > summary::-webkit-details-marker { display: none; }
details.publish-accordion[open] > summary {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.inline-story-textarea:hover { background: #FAF9FC; }
.inline-story-textarea:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--indigo);
}

.inline-quote-input {
  border: 1px dashed #D6D5E2;
  border-radius: 6px;
  background: #FAF9FC;
  padding: 8px 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  width: 100%;
  color: var(--ink);
}

.safezone-overlay { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.safezone-overlay.visible { display: block; }
.bleed-box { position: absolute; inset: 1.45%; border: 2px dashed #EF4444; }
.safe-box { position: absolute; inset: 4.4%; border: 2px dashed #10B981; }

.filmstrip {
  max-width: 960px;
  margin: 18px auto 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.thumb {
  flex: 0 0 84px;
  background: #FFFFFF;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  text-align: center;
}
.thumb.active { border-color: var(--indigo); transform: translateY(-2px); }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; display: block; }
.thumb span { display: block; font-size: 11px; font-weight: 700; margin-top: 3px; color: var(--muted); }

/* Modals & Toast */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(25, 24, 37, 0.45);
  z-index: 150;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #FFFFFF;
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 26px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--ink);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 250;
}
.toast.show { opacity: 1; transform: translateY(0); }

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  display: inline-block;
}
.conn-dot.live {
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.live-bridge-banner {
  max-width: 960px;
  margin: 0 auto 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--indigo);
  border-radius: 999px;
  padding: 8px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--indigo);
  box-shadow: 0 6px 20px rgba(81, 56, 238, 0.10);
}
.live-bridge-banner.visible { display: flex; }

/* 7. Compact Quick-Create Strip & Responsive Forms */
.hero-launch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 1240px;
  margin: 12px auto 16px;
}

.launch-card {
  --card-cloth: #8C3B1A;
  appearance: none;
  font-family: var(--font-sans);
  background: linear-gradient(180deg, #FFFDF9 0%, #FAF3E5 100%);
  border: 1px solid #D8CAB2;
  border-left: 5px solid var(--card-cloth);
  border-radius: 6px 10px 10px 6px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 12px rgba(34, 22, 12, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.launch-card[data-cloth="terracotta"] { --card-cloth: #8C3B1A; }
.launch-card[data-cloth="forest"] { --card-cloth: #254F3C; }
.launch-card[data-cloth="ochre"] { --card-cloth: #9C5D1B; }
.launch-card[data-cloth="navy"] { --card-cloth: #243C56; }

.launch-card:hover {
  border-color: #B49A73;
  border-left-color: var(--card-cloth);
  box-shadow: 0 12px 26px rgba(34, 22, 12, 0.11);
  transform: translateY(-2px);
}
.launch-card.featured {
  background: linear-gradient(135deg, #FBF4E4 0%, #FFFDF9 100%);
  border-color: #D2BA93;
  border-left-color: var(--card-cloth);
}

.launch-card-copy {
  min-width: 0;
}
.catalog-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #887358;
  margin-bottom: 3px;
}
.launch-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1px;
  line-height: 1.2;
}
.launch-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.launch-cta {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #EFE5D1;
  border: 1px solid #D5C2A0;
  color: #4A3420;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.launch-card.featured .launch-cta {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #FFFDF9;
}

.qk-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.resp-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.collab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 16px;
  align-items: end;
}

.waitlist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 125px auto;
  gap: 8px;
  align-items: center;
}

.checkout-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
  align-items: end;
}

.address-row {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.9fr 70px 95px;
  gap: 8px;
  margin-bottom: 12px;
}

.publish-hero-card {
  background: linear-gradient(135deg, #FBF4E6 0%, #FFFDF9 65%);
  border: 1.5px solid #DBC8A6;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  box-shadow: 0 12px 32px rgba(40, 26, 14, 0.07);
}

.mobile-preview-jump {
  display: none;
  margin: 0;
}

@media (max-width: 960px) {
  #geminiStatusBtn, #publicNav { display: none !important; }

  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 6px;
    padding: 8px 12px;
    height: auto;
    min-height: 50px;
  }
  .header-left-group { gap: 6px; }
  .brand-logo { font-size: 16.5px; gap: 6px; min-width: 0; }
  .brand-mark { width: 24px; height: 24px; border-radius: 6px; }
  .subpage-back-pill { padding: 4px 8px; font-size: 11.5px; }
  .header-right { gap: 7px; }
  .header-text-link { font-size: 12px; padding: 4px 1px; }
  .header-right .btn-small { min-height: 32px; padding: 0 10px; font-size: 11.5px; }
  .header-inner:has(#subpageBackBtn[style*="inline"]):has(#headerStartBtn[style*="inline"]) .brand-logo > span:last-child {
    display: none;
  }
  .funnel-steps.visible {
    order: 3;
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 4px 2px 0;
    border-top: 1px solid rgba(29, 29, 31, 0.06);
  }
  .funnel-steps .f-step {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12.5px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }

  /* Global iOS Safari 16px Anti-Zoom & Thumb-Friendly Controls */
  .input, .textarea, .select, .inline-blank, .inline-heading-input, .inline-quote-input,
  .modal-card input, .modal-card textarea, .modal-card select {
    font-size: 16px !important;
  }
  .input, .select { min-height: 44px; margin-bottom: 12px; }
  .btn, .age-pill, .mood-tab, .cat-pill { min-height: 40px; }

  .gallery-wrap, .qk-studio, .funnel-container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .gallery-wrap { padding-top: 10px; padding-bottom: 44px; }
  .gallery-hero-center { margin: 0 0 10px; }
  .gallery-h1 { font-size: 22px; line-height: 1.15; }

  /* Compact Single-Row Chapternav on Mobile */
  .chapternav-strip {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin-bottom: 12px;
    padding: 2px 2px 4px;
  }
  .chapternav-strip::-webkit-scrollbar { display: none; }
  .chapternav-item {
    flex: 0 0 auto;
    min-width: 86px;
    padding: 8px 11px;
    border-radius: 12px;
    gap: 4px;
  }
  .chapternav-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .chapternav-label {
    font-size: 11px;
  }

  /* Single-Row Scrollable Category Filter Rail */
  .category-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 2px;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .cat-pill { flex-shrink: 0; white-space: nowrap; min-height: 34px; padding: 0 13px; font-size: 12.5px; }
  .gallery-toolbar { padding-bottom: 10px; margin-bottom: 14px; font-size: 12.5px; }

  .oak-section-title { font-size: 18px; }
  .oak-sections-stack { gap: 24px; }

  .qk-studio { margin-top: 10px; }
  .funnel-container { margin-top: 12px; margin-bottom: 48px; }
  .funnel-title { font-size: 22px; margin-bottom: 6px; }
  .funnel-lead { font-size: 13.5px; margin-bottom: 14px; }
  .qk-panel, .how-card { padding: 15px 13px; }

  .qk-grid,
  .personalize-grid,
  .big-choice-grid,
  .how-grid,
  .style-visual-grid,
  .open-book-editor,
  .preview-spread,
  .resp-2col,
  .collab-grid,
  .waitlist-row,
  .checkout-top-row,
  .address-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .length-row-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mb-grid:not(#mixbookGalleryMount):not(#myBooksGridMount) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .mb-pedestal { padding: 12px; }
  .mb-card:not(.oak-slot) .mb-card-meta { flex-direction: column; align-items: stretch; gap: 5px; padding-top: 8px; }
  .mb-card:not(.oak-slot) .mb-card-title { width: 100%; font-size: 13px; }
  .mb-card:not(.oak-slot) .mb-card-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .mb-card:not(.oak-slot) .mb-card-links a {
    min-height: 38px;
    border-radius: 8px;
    background: var(--pedestal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0 6px;
  }
  .mb-card:not(.oak-slot) .mb-card-links a.mb-link-primary {
    background: var(--indigo-soft);
    color: var(--indigo);
  }

  /* Compact Personalizer Summary Card */
  .personalize-grid { gap: 14px; }
  .remix-hero-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: var(--pedestal);
    padding: 10px 12px;
    border-radius: 12px;
  }
  .remix-pedestal {
    margin-bottom: 0 !important;
    padding: 6px !important;
    width: 88px;
    height: 88px;
  }
  .remix-pedestal .mb-book-cover { padding: 4px 4px 10px 7px; }
  .remix-pedestal .mb-book-microtitle { display: none; }
  #remixOverviewText {
    font-size: 12.5px !important;
    line-height: 1.38;
    margin-bottom: 6px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Clean 5-Column Age Row & Zero-Scroll Mobile Forms */
  .qk-top-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
  #qkAgePills { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: 100%; }
  #qkAgePills .age-pill { padding: 8px 4px; text-align: center; font-size: 12.5px; }
  .fillin-sentence-box { line-height: 1.65; padding: 12px; }
  .inline-blank {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px;
    padding: 6px 10px;
    margin: 4px 0;
    border: 1px solid #D6D5E2;
    border-bottom: 2px solid var(--indigo);
    border-radius: 8px;
    display: block;
  }
  #rqOccasionTabs {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 7px;
  }
  #rqOccasionTabs::-webkit-scrollbar { display: none; }
  #rqOccasionTabs .mood-tab { flex-shrink: 0; white-space: nowrap; padding: 0 14px; }

  .qk-stage { position: static; padding: 14px 12px; }
  .qk-stage-top { margin-bottom: 10px; }
  .qk-stage-top .btn-small { min-height: 40px; padding: 0 14px; }
  .preview-spread { min-height: 0; }
  .preview-spread-gutter, .book-spine-shadow { display: none !important; }
  .preview-left { padding: 8px 10px 4px; }
  .preview-left img { width: 100%; height: 180px; aspect-ratio: auto; object-fit: contain; background: #FAF7F0; }
  .preview-right { padding: 10px 14px 12px; gap: 6px; }
  .slide-pills {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 10px;
    padding-bottom: 2px;
  }
  .slide-pills::-webkit-scrollbar { display: none; }
  .slide-pill { min-height: 38px; min-width: 38px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }

  .publish-hero-card {
    grid-template-columns: 1fr;
    padding: 18px 16px;
    text-align: center;
  }
  .publish-hero-card .mb-pedestal {
    max-width: 150px;
    margin: 0 auto;
  }

  /* Compact Mobile Page Editor + Sticky Thumb Navigation */
  .editor-theater { padding: 12px 10px 28px; }
  .editor-topbar { gap: 8px; margin-bottom: 10px; }
  #editorBookTitleInput { font-size: 16.5px !important; min-width: 0; width: 100%; }
  .editor-left-leaf { padding: 12px; gap: 8px; }
  .editor-art-frame { aspect-ratio: auto; height: 200px; background: #FAF7F0; }
  .editor-art-frame img { object-fit: contain; }
  .editor-right-leaf { padding: 14px 14px 14px; }
  .inline-story-textarea {
    min-height: 165px;
    max-height: 210px;
    overflow-y: auto;
    line-height: 1.46;
    padding: 8px;
  }
  .editor-right-leaf .btn-small, .editor-left-leaf .btn-small { min-height: 38px; padding: 0 11px; }
  .editor-page-nav-bar {
    position: sticky;
    bottom: 6px;
    z-index: 45;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(20, 18, 42, 0.12);
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    gap: 6px !important;
  }
  .editor-page-ops {
    min-width: 0;
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  .editor-page-ops::-webkit-scrollbar { display: none; }
  .editor-page-ops .btn-small { flex-shrink: 0; min-height: 40px; }
  .editor-nav-turn { min-height: 42px !important; padding: 0 13px !important; }

  .mobile-preview-jump { display: inline-flex; min-height: 40px; margin-bottom: 12px; }
}

@media (max-width: 480px) {
  #qkMoodTabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Magic Wand & Hidden Realm Designer Modal (120fps GPU Portal) */
.bl-designer-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #DDD6FE;
  background: #FAF7F0;
  cursor: crosshair;
  user-select: none;
}
.bl-designer-stage > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bl-designer-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  background: rgba(11, 7, 28, 0.58);
  transition: opacity 0.16s ease;
}
.bl-designer-portal {
  position: absolute;
  left: 0;
  top: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  will-change: transform;
  contain: layout paint;
  border: 2px solid #FDE68A;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.65);
  transform: translate3d(-150px, -150px, 0);
}
.bl-designer-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 280px;
  will-change: transform;
  pointer-events: none;
}
.bl-designer-world > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.45) hue-rotate(-24deg) brightness(1.12) contrast(1.08);
}
.bl-designer-layer,
.bl-designer-edit-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.bl-designer-edit-layer { opacity: 0.92; z-index: 3; }
.bl-designer-stage.uv-testing { cursor: none; }
.bl-designer-stage.uv-testing .bl-designer-veil,
.bl-designer-stage.uv-testing .bl-designer-portal { opacity: 1; }
.bl-designer-stage.uv-testing .bl-designer-edit-layer { opacity: 0; }
.bl-designer-stage .wand-trails-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bl-designer-stage .uv-find { position: absolute; pointer-events: none; }
.bl-designer-stage .uv-custom-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bl-designer-stage .wand-sprite-wrap { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; }
.bl-designer-stage .wand-mini-tag {
  margin-top: -3px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(14, 8, 34, 0.9);
  border: 1px solid var(--wc, #FBBF24);
  color: var(--wcore, #FEF9C3);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}
.bl-designer-stage .wand-secret-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 62px;
  padding: 2px 5px;
  border-radius: 9px;
  border: 1.5px dashed var(--wc, #22D3EE);
  background: rgba(13, 8, 34, 0.92);
  color: var(--wcore, #ECFEFF);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}
.bl-find-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FAF9FC;
  font-size: 12px;
}
@media (max-width: 720px) {
  .bl-designer-grid { grid-template-columns: 1fr !important; }
}
