/* Magic Tree Tales site stylesheet: generated by scripts/build-site.mjs, do not edit.
 * Edit site/site.css (site styles) or design/src/shared/core.css (shared core), then npm run build-site.
 * The block between the core-css markers is the shared core; node scripts/sync-core.mjs keeps it in sync too. */

/* ---------- fonts (self hosted, SIL Open Font License 1.1, see /fonts/LICENSE-*.txt) ---------- */
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/lexend-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/lexend-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Luckiest Guy"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/luckiest-guy-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }

/* @core-css:start */
/* Magic Tree Tales shared core styles: artwork protection, grown-up gate, motion safety.
 * Concepts may restyle the gate with their own tokens; keep the protection rules intact. */

/* Artwork: CSS background with a transparent overlay so there is no image element to save. */
.art {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  transition: filter .25s ease;
}
.art--contain { background-size: contain; }
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
}
img, .art, .art-zone {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* Blur shield: tab hidden, window blurred, PrintScreen, printing. */
.mtt-shield .art { filter: blur(24px) saturate(.6); }
@media print {
  .art { filter: blur(24px) !important; }
}

/* Grown-up gate (default look, concepts restyle via --gate-* tokens). */
.gate {
  --gate-bg: #fffdf6;
  --gate-ink: #1d1a2f;
  --gate-accent: #6b2fd6;
  --gate-accent-ink: #ffffff;
  --gate-radius: 24px;
  border: 0;
  padding: 0;
  border-radius: var(--gate-radius);
  background: var(--gate-bg);
  color: var(--gate-ink);
  width: min(92vw, 440px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.gate::backdrop { background: rgba(20, 16, 40, .6); }
.gate__inner { padding: 28px 24px 24px; display: grid; gap: 12px; }
.gate__badge { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gate-accent); }
.gate__title { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.gate__help { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.gate__number { margin: 4px 0; font-size: 3rem; font-weight: 800; text-align: center; letter-spacing: .05em; }
.gate__label { font-weight: 700; }
.gate__input {
  font: inherit; font-size: 1.2rem; min-height: 52px; padding: 10px 14px;
  border: 3px solid currentColor; border-radius: 14px; background: #fff; color: var(--gate-ink);
}
.gate__msg { margin: 0; min-height: 1.4em; color: #b00020; font-weight: 700; }
.gate__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.gate__btn {
  font: inherit; font-weight: 800; font-size: 1.1rem; min-height: 52px; min-width: 120px; padding: 10px 20px;
  border-radius: 999px; border: 3px solid var(--gate-accent); background: var(--gate-accent); color: var(--gate-accent-ink); cursor: pointer;
}
.gate__btn--ghost { background: transparent; color: var(--gate-accent); }
.gate__btn:focus-visible, .gate__input:focus-visible { outline: 4px solid #ffbf00; outline-offset: 3px; }

/* Screen-reader only helper and route announcer. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Respect reduced motion everywhere. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
/* @core-css:end */

/* Magic Tree Tales site: Concept C (Zoo Scrapbook), adapted from design/src/concept-c/style.css for real pages.
 * The Time Tablet page uses Concept B (Time Portal), scoped under .portal (see the end of this file). */
:root {
  --sun: #ffd23f;
  --sun-tint: #fff0b3;
  --sky: #3aa6ff;
  --sky-tint: #cfeaff;
  --grass: #3cb44b;
  --grass-tint: #d3f2cd;
  --tomato: #e8402f;
  --tomato-ink: #b8291a;
  --tomato-tint: #ffd9d2;
  --ink: #1d2433;
  --ink-soft: #3b4357;
  --paper: #fff8ea;
  --dot: #eadcbc;
  --white: #ffffff;
  --link: #0b4f9c;
  --radius: 22px;
  --sticker: 0 2px 0 rgba(29, 36, 51, .12), 0 10px 22px rgba(29, 36, 51, .16);
  --sticker-lift: 0 3px 0 rgba(29, 36, 51, .14), 0 16px 30px rgba(29, 36, 51, .2);
  --display: "Luckiest Guy", "Lexend", system-ui, sans-serif;
  --body: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar-h: 72px;
}

/* gate tuned to the palette */
.gate {
  --gate-bg: var(--paper);
  --gate-ink: var(--ink);
  --gate-accent: var(--tomato-ink);
  --gate-accent-ink: #fff;
  --gate-radius: 26px;
  border: 7px solid #fff !important;
  box-shadow: var(--sticker-lift), 0 0 0 3px var(--ink) !important;
  font-family: var(--body);
}
.gate::backdrop { background: rgba(29, 36, 51, .55); }
.gate__badge { display: inline-block; justify-self: start; background: var(--sun); color: var(--ink); padding: 4px 12px; border-radius: 999px; rotate: -2deg; }
.gate__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 2rem; }
.gate__number { font-family: var(--display); font-weight: 400; color: var(--link); }
.gate__btn { box-shadow: 0 4px 0 var(--ink); }
.gate__btn:focus-visible, .gate__input:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.7px);
  background-size: 22px 22px;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
main:focus { outline: none; }
h1:focus { outline: none; }
h1:focus-visible { outline: 4px dashed var(--ink); outline-offset: 6px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -120px; z-index: 100;
  background: var(--sun); color: var(--ink); font-weight: 600; padding: 12px 20px;
  border: 3px solid var(--ink); border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.display {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  letter-spacing: .02em; line-height: 1.02;
}
h1.display { font-size: clamp(2.5rem, 9vw, 4.6rem); text-shadow: 0 4px 0 var(--sun); }
.h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: 10px; }
.lede { font-size: 1.2rem; max-width: 38rem; margin-top: 12px; }
.eyebrow { margin-bottom: 12px; }
.chip {
  display: inline-block; font-size: 1.125rem; font-weight: 600; padding: 5px 14px; border-radius: 999px;
  border: 3px solid #fff; box-shadow: var(--sticker); rotate: -2deg; background: var(--sun);
}
.chip--green { background: var(--grass-tint); }
.chip--blue { background: var(--sky-tint); }
.chip--yellow { background: var(--sun); }
.chip--red { background: var(--tomato-tint); }
.chip--white { background: #fff; border-color: var(--ink); box-shadow: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 10px 24px; border-radius: 999px;
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  font-weight: 600; font-size: 1.125rem; line-height: 1.2; text-decoration: none; color: var(--ink);
  background: #fff; cursor: pointer; text-align: center;
  transition: translate .15s ease, box-shadow .15s ease;
}
.btn:hover { translate: 0 -2px; box-shadow: 0 7px 0 var(--ink); }
.btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--ink); }
.btn--yellow { background: var(--sun); }
.btn--blue { background: var(--sky); }
.btn--red { background: var(--tomato-ink); color: #fff; }
.btn--white { background: #fff; }
.btn--small { min-height: 48px; padding: 8px 18px; font-size: 1.125rem; }

/* ---------- stickers, cards and washi tape ---------- */
.card {
  position: relative; background: #fff; border: 7px solid #fff; border-radius: var(--radius);
  box-shadow: var(--sticker); padding: 20px 18px;
}
.card--yellow { background: var(--sun-tint); }
.card--blue { background: var(--sky-tint); }
.card--green { background: var(--grass-tint); }
.card--white { background: #fff; }
.tape { position: relative; }
.tape::before {
  content: ""; position: absolute; z-index: 3; top: -22px; left: 50%; width: 104px; height: 30px;
  translate: -50% 0; rotate: -4deg; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 7px, transparent 7px 14px),
    var(--tape, rgba(58, 166, 255, .78));
  clip-path: polygon(3% 0, 97% 4%, 100% 30%, 97% 55%, 100% 80%, 96% 100%, 4% 96%, 0 70%, 3% 45%, 0 20%);
}
.tape--tl::before { left: -4px; translate: 0 0; rotate: -30deg; top: -6px; width: 76px; }
.tape--tr::before { left: auto; right: -4px; translate: 0 0; rotate: 30deg; top: -6px; width: 76px; }
.tape--tc::before { rotate: 3deg; }
:nth-child(3n+1) > .tape, .tape:nth-child(3n+1) { --tape: rgba(255, 210, 63, .85); }
:nth-child(3n+2) > .tape, .tape:nth-child(3n+2) { --tape: rgba(232, 64, 47, .7); }
:nth-child(3n) > .tape, .tape:nth-child(3n) { --tape: rgba(60, 180, 75, .72); }

/* ---------- header and main nav (mobile: bottom tab bar) ---------- */
.top { padding: 14px 16px 6px; max-width: 1240px; margin: 0 auto; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 18px 6px 8px;
  background: #fff; border-radius: 999px; box-shadow: var(--sticker); text-decoration: none; color: var(--ink);
  rotate: -1.5deg; border: 3px solid var(--ink);
}
.brand__text { font-family: var(--display); font-size: 1.45rem; text-transform: uppercase; letter-spacing: .03em; padding-top: 4px; }

.nav {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 3px solid var(--ink);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 18px rgba(29, 36, 51, .12);
}
.nav__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; width: 100%; padding: 4px 2px; border: 0; background: none; border-radius: 16px;
  color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 600; line-height: 1.1; text-align: center; cursor: pointer;
}
.tab__icon { width: 30px; height: 30px; padding: 3px; fill: var(--ink); border-radius: 12px; transition: background .2s ease, scale .2s ease; }
.tab[aria-current="page"] .tab__icon, .tab[data-current] .tab__icon, .tab[aria-expanded="true"] .tab__icon { background: var(--sun); scale: 1.1; box-shadow: 0 0 0 2px var(--ink); }
.tab:hover .tab__icon { background: var(--sun-tint); }
.nav__extra-wrap { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); }
.nav__extra, .pop {
  background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--sticker-lift); padding: 10px;
}
.nav__extra { display: none; }
.nav__extra.is-open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab--extra { background: var(--sun-tint); }
.nav__pop { position: static; }
.pop { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); }
.pop__title { font-family: var(--display); text-transform: uppercase; font-size: 1.3rem; padding: 4px 6px 8px; }
.pop__books { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pop__book {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; min-height: 48px;
  border-radius: 14px; text-decoration: none; color: var(--ink); font-size: 1rem; font-weight: 600; text-align: center; line-height: 1.15;
}
.pop__book:hover, .pop__book[aria-current="page"] { background: var(--sun-tint); }
.pop__thumb { width: 100%; border-radius: 8px; border: 3px solid #fff; box-shadow: var(--sticker); }

/* ---------- layout ---------- */
.view { max-width: 1240px; margin: 0 auto; padding: 12px 16px 48px; }
.block { margin-top: 44px; }
.block__lede { font-size: 1.15rem; margin-bottom: 18px; max-width: 40rem; }
.page-head { padding: 18px 0 8px; margin-bottom: 18px; }

/* pop in with a gentle bounce */
@media (prefers-reduced-motion: no-preference) {
  
  @keyframes popIn {
    from { opacity: 0; scale: .86; translate: 0 18px; }
    to { opacity: 1; scale: 1; translate: 0 0; }
  }
}

/* ---------- home hero ---------- */
.hero { display: grid; gap: 28px; padding-top: 12px; }
.hero__title { font-size: clamp(2.6rem, 11vw, 5.2rem); }
.hero__amp { color: var(--tomato-ink); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.collage { position: relative; aspect-ratio: 1 / .92; margin: 6px 4px 0; }
.snap { position: absolute; background: #fff; padding: 8px; border-radius: 10px; box-shadow: var(--sticker-lift); }
.snap__art { width: 100%; border-radius: 4px; }
.snap--a { width: 86%; left: 0; top: 2%; rotate: -4deg; z-index: 1; }
.snap--b { width: 52%; right: 0; top: 34%; rotate: 5deg; z-index: 2; }
.snap--c { width: 54%; left: 4%; top: 52%; rotate: -2deg; z-index: 3; }
.sticker-star {
  position: absolute; z-index: 4; width: 64px; height: 64px; background: var(--sun);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 3px 0 rgba(29, 36, 51, .25));
}
.sticker-star--1 { right: 4%; top: 6%; rotate: 12deg; }
.sticker-star--2 { left: 54%; bottom: 0; width: 46px; height: 46px; background: var(--tomato); rotate: -14deg; }

/* ---------- bookshelf ---------- */
#shelf:focus { outline: none; }
.shelf { display: grid; gap: 26px; }
.book-card {
  display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 16px; row-gap: 6px; align-items: start;
  background: var(--card, var(--sun-tint)); border: 7px solid #fff; border-radius: var(--radius);
  box-shadow: var(--sticker); padding: 16px;
  transition: rotate .25s ease, box-shadow .25s ease;
}
.book-card:nth-child(4n+2) { --card: var(--sky-tint); }
.book-card:nth-child(4n+3) { --card: var(--grass-tint); }
.book-card:nth-child(4n) { --card: var(--tomato-tint); }
.book-card:hover { rotate: 0deg; box-shadow: var(--sticker-lift); }
.book-card__cover { width: min(240px, 74%); justify-self: center; margin: 8px 0 10px; background: #fff; padding: 6px; border-radius: 8px; box-shadow: var(--sticker); rotate: -3deg; }
.book-card__art { border-radius: 3px; }
.book-card__title { font-size: 1.25rem; line-height: 1.2; font-weight: 600; }
.book-card__tag { font-size: 1.15rem; }
.book-card__credit { font-size: 1.125rem; font-style: italic; }
.site-credit { font-weight: 600; }
.book-card .btn { justify-self: start; margin-top: 6px; }

/* ---------- time tablet teaser ---------- */
.tt-teaser { display: grid; gap: 18px; }
.tt-teaser__art { border-radius: 12px; border: 6px solid #fff; box-shadow: var(--sticker); rotate: 1.5deg; }
.tt-teaser__words { display: grid; gap: 12px; justify-items: start; }
.tt-teaser__stops { font-size: 1.8rem; letter-spacing: .12em; line-height: 1.3; }

/* ---------- Polite Parrot ---------- */
.parrot { overflow: hidden; }
.parrot__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.parrot__head .h2 { margin: 0; }
.parrot__stars span[aria-hidden] { display: inline-flex; gap: 4px; }
.pstar, .stars__star {
  display: inline-block; width: 28px; height: 28px; background: #c9bfa8;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.pstar.is-on, .stars__star.is-on { background: #f5b800; }
@media (prefers-reduced-motion: no-preference) {
  .pstar.is-on { animation: starPop .5s cubic-bezier(.34, 1.56, .64, 1); }
  @keyframes starPop { from { scale: .2; rotate: -40deg; } to { scale: 1; rotate: 0deg; } }
}
.parrot__stage { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: center; margin-top: 14px; }
.parrot__bird svg { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .parrot__bird { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
  .parrot__bird.is-happy { animation: hooray .7s cubic-bezier(.34, 1.56, .64, 1) 2; }
  .parrot__bird.is-giggle { animation: giggle .18s ease-in-out 5; }
  @keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
  @keyframes hooray { 0%, 100% { translate: 0 0; scale: 1; } 40% { translate: 0 -18px; scale: 1.06; } }
  @keyframes giggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -6deg; } 75% { rotate: 6deg; } }
}
.bubble {
  position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 14px 16px;
  box-shadow: 0 4px 0 var(--ink);
}
.bubble::before {
  content: ""; position: absolute; left: -15px; top: 42%; width: 22px; height: 22px; background: #fff;
  border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); rotate: 45deg;
}
.bubble__count { font-size: 1.125rem; font-weight: 600; color: var(--ink-soft); }
.bubble__q { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.parrot__answers { display: grid; gap: 12px; margin-top: 18px; }
.answer {
  min-height: 64px; padding: 10px 18px; border-radius: 20px; border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink); font-size: 1.2rem; font-weight: 600; cursor: pointer; text-align: left;
  transition: translate .15s ease, box-shadow .15s ease;
}
.answer:hover { translate: 0 -2px; box-shadow: 0 7px 0 var(--ink); }
.answer--yellow { background: var(--sun); }
.answer--blue { background: var(--sky-tint); }
.answer--red { background: var(--tomato-tint); }
.answer.is-silly { background: #f1ece0; }
.answer.is-right { background: var(--grass); }
.answer.is-right::after { content: "  \2605"; }
.answer:disabled { cursor: default; opacity: 1; background: #f1ece0; color: var(--ink-soft); box-shadow: 0 2px 0 var(--ink-soft); border-color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .answer.is-silly { animation: giggle .18s ease-in-out 3; }
}
.parrot__msg { min-height: 1.6em; margin-top: 14px; font-weight: 600; font-size: 1.15rem; }
.parrot__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti__bit {
  position: absolute; top: -16px; left: var(--x); width: 10px; height: 16px; border-radius: 3px;
  animation: fall 1.6s ease-in var(--d) forwards;
}
@keyframes fall { to { translate: var(--dx) 560px; rotate: var(--r); opacity: .2; } }

/* ---------- reviews ---------- */
.reviews { display: grid; gap: 30px; padding-top: 10px; }
.review { display: grid; gap: 10px; padding-top: 26px; }
.review__title { font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.review__text { font-size: 1.2rem; }
.review__text p::before { content: "\201C"; }
.review__text p::after { content: "\201D"; }
.review__who { font-weight: 600; color: var(--ink-soft); }
.stars__row { display: inline-flex; gap: 4px; }
.reviews-teaser { display: grid; gap: 18px; justify-items: start; }
.review-teaser { max-width: 46rem; }
.review-teaser .review { --tilt: -1.4deg; }

/* ---------- book page ---------- */
.book-hero { display: grid; gap: 30px; padding-top: 20px; }
.book-hero__cover {
  width: min(78%, 360px); justify-self: center; background: #fff; padding: 10px; border-radius: 12px;
  box-shadow: var(--sticker-lift); rotate: -3deg;
}
.book-hero__art { border-radius: 4px; }
.book-hero__words { display: grid; gap: 14px; justify-items: start; }
.book-hero__title { font-size: clamp(2.3rem, 9vw, 4.2rem) !important; }
.book-hero__tag { font-size: 1.3rem; font-weight: 600; }
.book-hero__desc { font-size: 1.15rem; max-width: 40rem; }
.book-hero__credit { font-weight: 600; background: #fff; padding: 6px 14px; border-radius: 12px; box-shadow: var(--sticker); rotate: -1deg; }
.book-hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px; }
.book-hero__hint { font-size: 1.125rem; color: var(--ink-soft); }
.fact-stickers { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.fact-sticker {
  display: grid; padding: 8px 18px; border-radius: 18px; background: var(--sky-tint); border: 5px solid #fff;
  box-shadow: var(--sticker); font-weight: 600; line-height: 1.25;
}
.fact-sticker:nth-child(odd) { rotate: -2deg; }
.fact-sticker:nth-child(even) { rotate: 2deg; background: var(--sun-tint); }
.fact-sticker__k { font-size: 1.125rem; font-weight: 400; }
.fact-sticker--theme { align-content: center; text-transform: capitalize; background: var(--grass-tint) !important; border-radius: 999px; }
.peek { display: grid; gap: 30px; padding-top: 8px; }
.peek__item { background: #fff; padding: 8px; border-radius: 10px; box-shadow: var(--sticker); rotate: var(--tilt, 0deg); }
.peek__art { border-radius: 4px; }
.more-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.more-book { rotate: var(--tilt, 0deg); }
.more-book__link {
  display: grid; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.125rem; line-height: 1.2;
  background: #fff; padding: 6px 6px 10px; border-radius: 10px; box-shadow: var(--sticker);
}
.more-book__link:hover { box-shadow: var(--sticker-lift); }
.more-book__art { border-radius: 4px; }

/* ---------- gallery + lightbox ---------- */
.gallery { columns: 2; column-gap: 16px; padding-top: 6px; }
.gallery__item { rotate: var(--tilt, 0deg); break-inside: avoid; margin-bottom: 18px; }
.gallery__tile {
  display: block; width: 100%; padding: 7px; border: 0; background: #fff; border-radius: 10px;
  box-shadow: var(--sticker); cursor: zoom-in; transition: rotate .2s ease, scale .2s ease, box-shadow .2s ease;
}
.gallery__tile:hover { rotate: calc(var(--tilt, 0deg) * -1); scale: 1.04; box-shadow: var(--sticker-lift); }
.gallery__art { border-radius: 4px; }
.gallery__cap { display: block; padding: 8px 4px 2px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--ink); }
.lightbox {
  border: 7px solid #fff; border-radius: 26px; padding: 0; background: var(--paper); color: var(--ink);
  width: min(94vw, 920px); max-height: 94vh; box-shadow: var(--sticker-lift), 0 0 0 3px var(--ink);
}
.lightbox::backdrop { background: rgba(29, 36, 51, .72); }
.lightbox__inner { position: relative; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lightbox__inner > * { min-width: 0; }
.lightbox__close {
  position: absolute; top: 8px; right: 8px; z-index: 4; width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--ink); background: var(--sun); font-size: 2rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 0 var(--ink);
}
.lightbox__frame { background: #fff; padding: 8px; border-radius: 10px; box-shadow: var(--sticker); margin-top: 52px; }
.lightbox__art { width: 100%; max-height: 58vh; }
.lightbox__book { font-family: var(--display); text-transform: uppercase; font-size: 1.4rem; margin-top: 8px; }
.lightbox__cap { font-size: 1.15rem; }
.lightbox__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.lightbox__count { font-weight: 600; }

/* ---------- about ---------- */
.people { display: grid; gap: 40px; padding-top: 10px; }
.person { display: grid; gap: 22px; padding-top: 28px; }
.person__words { display: grid; gap: 12px; justify-items: start; }
.person__words .h2 { margin: 0; }
.polaroid { width: min(66%, 240px); justify-self: center; background: #fff; padding: 10px 10px 8px; border-radius: 6px; box-shadow: var(--sticker-lift); rotate: -4deg; }
.polaroid--right { rotate: 4deg; }
.polaroid__art { border-radius: 3px; }
.polaroid__cap { text-align: center; font-weight: 600; padding-top: 8px; }

/* ---------- contact ---------- */
.contact { max-width: 640px; padding-top: 30px; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input, .field textarea {
  font: inherit; font-size: 1.125rem; min-height: 54px; padding: 12px 14px; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 16px; background: var(--paper);
}
.field textarea { resize: vertical; min-height: 140px; }
.form .btn { justify-self: start; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#contact-status { font-weight: 600; min-height: 1.5em; }
.form__note { margin-top: 18px; padding: 12px 16px; background: var(--grass-tint); border-radius: 14px; font-size: 1.125rem; }

/* ---------- footer ---------- */
.foot {
  margin-top: 40px; background: var(--ink); color: #fff; position: relative;
  padding: 44px 16px 36px;
}
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px;
  background: radial-gradient(circle at 12px 16px, var(--ink) 12px, transparent 12.5px) 0 0 / 24px 16px repeat-x;
}
.foot__inner { max-width: 1240px; margin: 0 auto; display: grid; gap: 26px; }
.foot__name { font-size: 1.8rem; color: var(--sun); }
.foot a { color: #fff; }
.foot__nav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.foot__nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; font-weight: 600; }
.foot__label { font-weight: 600; margin-bottom: 10px; }
.foot__social ul { display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  display: inline-flex; align-items: center; min-height: 48px; padding: 6px 18px; border-radius: 999px;
  background: var(--sun); color: var(--ink) !important; font-weight: 600; text-decoration: none; border: 3px solid #fff;
}
.social:hover { background: #fff; }
.foot :focus-visible { outline-color: var(--sun); }
.foot__small { font-size: 1.125rem; color: #e5e8f0; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .book-card__cover { width: 82%; }
  .gallery { columns: 3; column-gap: 22px; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .peek { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .peek__item--wide { grid-column: span 2; }
  .parrot__stage { grid-template-columns: 150px 1fr; }
  .parrot__answers { grid-template-columns: repeat(3, 1fr); }
  .answer { text-align: center; }
  .tt-teaser { grid-template-columns: 1fr 1.1fr; align-items: center; }
}

@media (min-width: 900px) {
  .view { padding: 20px 28px 64px; }
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; padding-top: 30px; }
  .block { margin-top: 64px; }
  .card { padding: 28px; }
  .parrot { padding: 30px 34px 34px; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .book-hero { grid-template-columns: minmax(280px, 400px) 1fr; align-items: start; gap: 48px; }
  .book-hero__cover { width: 100%; }
  .peek { grid-template-columns: repeat(3, 1fr); }
  .more-books { grid-template-columns: repeat(3, minmax(0, 240px)); }
  .people { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  body { padding-bottom: 0; }
  .shelf { grid-template-columns: repeat(4, 1fr); }
  .gallery { columns: 4; }
  .top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 28px 8px; }
  .nav { position: static; background: none; border: 0; box-shadow: none; padding: 0; }
  .nav__list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .nav__more-btn { display: none; }
  .nav__extra-wrap { position: static; }
  .nav__extra, .nav__extra.is-open { display: flex; gap: 10px; background: none; border: 0; box-shadow: none; padding: 0; }
  .tab, .tab--extra {
    flex-direction: row; gap: 6px; min-height: 50px; width: auto; padding: 6px 16px 6px 8px; font-size: 1rem;
    background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink);
    transition: translate .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .nav__list > li:nth-child(odd) .tab, .nav__extra li:nth-child(even) .tab { rotate: -1.5deg; }
  .nav__list > li:nth-child(even) .tab, .nav__extra li:nth-child(odd) .tab { rotate: 1.5deg; }
  .tab:hover { translate: 0 -2px; box-shadow: 0 6px 0 var(--ink); }
  .tab__icon { width: 30px; height: 30px; }
  .tab[aria-current="page"], .tab[data-current], .tab[aria-expanded="true"] { background: var(--sun); }
  .tab[aria-current="page"] .tab__icon, .tab[data-current] .tab__icon, .tab[aria-expanded="true"] .tab__icon { background: #fff; scale: 1; }
  .nav__pop { position: relative; }
  .pop { left: 0; right: auto; bottom: auto; top: calc(100% + 12px); width: 460px; z-index: 60; }
}

/* ---------- refinements ---------- */
.brand__text { white-space: nowrap; }
@media (min-width: 900px) {
  .parrot__stage { grid-template-columns: 190px minmax(0, 620px); gap: 22px; }
  .bubble { padding: 20px 24px; }
  .bubble__q { font-size: 1.5rem; }
  .foot__inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .foot__small { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .top { max-width: 1340px; }
  .brand__text { font-size: 1.3rem; }
  .nav__list, .nav__extra, .nav__extra.is-open { flex-wrap: nowrap; gap: 8px; }
  .tab, .tab--extra { padding: 5px 14px 5px 6px; min-height: 48px; font-size: 1rem; white-space: nowrap; }
  .tab__icon { width: 28px; height: 28px; }
}

/* ---------- review fixes ---------- */
/* stars with an ink outline so empty ones read as a score */
.pstar, .stars__star { position: relative; background: var(--ink); }
.pstar::after, .stars__star::after {
  content: ""; position: absolute; inset: 4px; background: var(--paper);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.pstar.is-on, .stars__star.is-on { background: var(--ink); }
.pstar.is-on::after, .stars__star.is-on::after { background: #f5b800; }
.parrot__head { display: grid; justify-items: start; gap: 8px; }

/* review book link as a proper tap target */
.review__book-link {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border-radius: 999px;
  background: var(--sky-tint); border: 3px solid var(--ink); color: var(--ink); font-weight: 600; text-decoration: none;
}
.review__book-link:hover { background: var(--sun); }

/* footer links in a tidy grid */
@media (min-width: 900px) {
  .foot__nav ul { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 10px; }
}

@media (max-width: 639px) {
  /* parrot sits above a full-width speech bubble */
  .parrot__stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 22px; }
  .parrot__bird { width: 130px; }
  .bubble { width: 100%; }
  .bubble::before { left: 50%; top: -15px; translate: -50% 0; rotate: 135deg; }
  /* lightbox: count on its own row, buttons share the width */
  .lightbox__count { order: -1; flex-basis: 100%; text-align: center; }
  .lightbox__nav .btn { flex: 1; padding-inline: 12px; }
  .lightbox__frame { margin-top: 56px; }
}

@media (max-width: 1099px) {
  /* keep focused controls clear of the fixed bottom tab bar */
  html { scroll-padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom, 0px)); }
  html:has(body.page--time-tablet) { scroll-padding-bottom: calc(var(--bar-h) + 96px + env(safe-area-inset-bottom, 0px)); }
}

/* =====================================================================================
 * Site additions to Concept C (multi-page site, logo, claims, Colour Ronny, Time Portal)
 * ===================================================================================== */

/* ---------- logo (assets-src/brand/mtt-logo-colour.svg, inlined) ---------- */
.brand { padding: 4px 18px 4px 4px; }
.brand__logo { display: block; width: 48px; height: 48px; flex: none; }
.brand__text { font-family: var(--display); }
.tab__logo { width: 30px; height: 30px; flex: none; border-radius: 9px; }
.tab[aria-current="page"] .tab__logo { box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--sun); }
.foot__logo { display: block; width: 40px; height: 40px; flex: none; }
.foot__brand-row { display: flex; align-items: center; gap: 12px; }
.page-logo { display: block; width: 96px; height: 96px; margin-bottom: 14px; rotate: -4deg; filter: drop-shadow(0 6px 0 rgba(29, 36, 51, .18)); }

/* ---------- text size floor: nothing smaller than 18px ---------- */
.tab, .tab--extra, .pop__book, .tt-now__k { font-size: 1.125rem; }
@media (max-width: 1099px) {
  .tab { font-size: 1.125rem; letter-spacing: -.01em; }
  .nav__list .tab span { line-height: 1.05; }
}

/* ---------- pop-in order and sticker tilts (classes instead of inline styles: strict CSP) ---------- */
.i-1 { --i: 1; } .i-2 { --i: 2; } .i-3 { --i: 3; } .i-4 { --i: 4; } .i-5 { --i: 5; } .i-6 { --i: 6; }
.tilt-0 { --tilt: -2.2deg; } .tilt-1 { --tilt: 1.6deg; } .tilt-2 { --tilt: -1.2deg; }
.tilt-3 { --tilt: 2.4deg; } .tilt-4 { --tilt: -1.8deg; } .tilt-5 { --tilt: 1.1deg; }
.book-card { rotate: var(--tilt, 0deg); }
@media (prefers-reduced-motion: no-preference) {
  .pop-in { animation: popIn .62s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: min(calc(var(--i, 0) * 60ms), 240ms); }
}

/* ---------- home and shared bits ---------- */
.hero__more { font-size: 1.125rem; max-width: 38rem; margin-top: 12px; }
.book-card { position: relative; }
.book-card__link { position: static; color: var(--ink); text-decoration: none; }
.book-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.book-card__link:focus-visible { outline: none; }
.book-card:has(.book-card__link:focus-visible) { outline: 4px solid var(--ink); outline-offset: 4px; }
.book-card__more { justify-self: start; margin-top: 6px; pointer-events: none; }
.claims { display: grid; gap: 8px; margin-top: 16px; }
.claims__item { position: relative; padding: 6px 14px 6px 44px; background: #fff; border-radius: 14px; box-shadow: var(--sticker); font-weight: 600; }
.claims__item::before {
  content: ""; position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; background: #f5b800;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.claims__markets { font-weight: 600; color: var(--ink-soft); }
.more-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.nojs-note { margin-top: 12px; font-weight: 600; }
span.art { display: block; width: 100%; }
.peek__btn, .gallery__tile { cursor: zoom-in; }
.peek__btn { display: block; width: 100%; padding: 0; border: 0; background: none; }
.lightbox__art { aspect-ratio: auto; }

/* ---------- About ---------- */
.person__words p { max-width: 40rem; }

/* ---------- Contact: coming soon ---------- */
.soon { display: inline-block; font-family: var(--display); text-transform: uppercase; font-size: clamp(1.6rem, 6vw, 2.2rem);
  background: var(--sun); padding: 8px 18px 4px; border-radius: 16px; box-shadow: var(--sticker); rotate: -2deg; margin-bottom: 18px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 18px; min-width: 0; }
.form fieldset:disabled .field input, .form fieldset:disabled .field textarea { background: #f1ece0; color: var(--ink-soft); cursor: not-allowed; }
.form fieldset:disabled .btn { background: #f1ece0; color: var(--ink-soft); box-shadow: 0 2px 0 var(--ink-soft); border-color: var(--ink-soft); cursor: not-allowed; translate: none; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding-top: 40px; }
.lost .page-logo { margin: 0 auto 18px; }
.lost .lede { margin-inline: auto; }
.lost__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 24px; }

/* ---------- Colour Ronny (Rude Rhino page) ---------- */
.colour { display: grid; gap: 20px; }
.colour__canvas { background: #fff; border-radius: 18px; padding: 6px; box-shadow: var(--sticker); }
#ronny { display: block; width: 100%; height: auto; }
.ronny-lines { stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; }
.region { cursor: pointer; --fill: #ffffff; }
.region .fill { fill: var(--fill); transition: fill .25s ease; }
.region .hit { fill: transparent; stroke: none; }
.region:hover .fill { filter: brightness(.94); }
.region:focus { outline: none; }
.region:focus-visible .fill { stroke: var(--tomato-ink); stroke-width: 9; stroke-dasharray: 14 8; }
.ronny-eye { pointer-events: none; }
.ronny-eye .eye-white { fill: #fff; }
.ronny-eye .pupil, .ronny-deco { fill: var(--ink); }
.ronny-eye .pupil, .ronny-eye .shine { stroke: none; }
.ronny-eye .shine { fill: #fff; }
.ronny-deco { stroke: var(--ink); stroke-width: 6; pointer-events: none; }
.ronny-deco path { fill: none; }
.colour__status { min-height: 1.6em; margin: 8px 4px 0; font-weight: 600; text-align: center; }
.colour__label { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.swatch {
  display: grid; place-items: center; aspect-ratio: 1; min-height: 56px; width: 100%; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 4px solid #fff; box-shadow: 0 0 0 3px var(--ink); transition: scale .15s ease;
}
.swatch:hover { scale: 1.06; }
.swatch[aria-pressed="true"] { scale: 1.1; box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px var(--sun), 0 0 0 10px var(--ink); }
.swatch[aria-pressed="true"]::after { content: "\2713"; color: var(--ink); font-size: 1.6rem; font-weight: 600; text-shadow: 0 0 4px #fff; }
.colour__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.colour__actions .btn { flex: 1 1 160px; }
.colour__tip { margin-top: 16px; font-size: 1.125rem; color: var(--ink-soft); }
@media (min-width: 760px) { .colour { grid-template-columns: 1.4fr 1fr; align-items: center; gap: 30px; } }

/* =====================================================================================
 * Time Tablet page: Concept B (Time Portal) inside Concept C's header, tab bar and footer
 * ===================================================================================== */
.portal {
  --tp-night: #0a0f2e; --tp-night-2: #111845; --tp-panel: #18215c; --tp-panel-2: #212c74; --tp-line: #3b4aa8;
  --tp-ink: #f4f6ff; --tp-ink-soft: #cdd5ff; --tp-cyan: #22e3ff; --tp-sun: #ffd23f; --tp-on-bright: #0a0f2e;
  --tp-head: "Baloo 2", "Luckiest Guy", system-ui, sans-serif;
  position: relative; max-width: 1240px; margin: 12px auto 0; padding: 26px 16px 40px; border-radius: 34px;
  color: var(--tp-ink); border: 7px solid #fff; box-shadow: var(--sticker-lift);
  background-color: var(--tp-night);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 42% 62%, #bfe9ff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 44%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 82%, #fff 50%, transparent 51%),
    radial-gradient(900px 600px at 50% -10%, #1d2a86 0%, transparent 70%),
    radial-gradient(700px 500px at 100% 40%, rgba(255, 79, 184, .16) 0%, transparent 70%);
  background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 100% 100%, 100% 100%;
}
.portal :focus-visible { outline-color: var(--tp-sun); }
.portal a { color: var(--tp-cyan); }
.portal__head { text-align: center; margin-bottom: 24px; }
.portal__kicker { display: inline-block; font-family: var(--tp-head); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tp-sun); margin-bottom: 6px; }
.portal h1 { font-family: var(--tp-head); font-weight: 800; text-transform: none; letter-spacing: -.01em; line-height: 1.05;
  font-size: clamp(2.4rem, 8vw, 4rem); color: #fff; text-shadow: 0 0 18px rgba(34, 227, 255, .6); }
.portal__lede { max-width: 40rem; margin: 10px auto 0; color: var(--tp-ink-soft); }
.portal .btn--sun { background: var(--tp-sun); color: var(--tp-on-bright); border-color: #fff; box-shadow: 0 6px 0 #b8890b, 0 0 32px rgba(255, 210, 63, .45); font-family: var(--tp-head); font-weight: 800; }

.tt { display: grid; gap: 22px; }
.tt-screen {
  justify-self: center; --stop: #1d2a86;
  position: relative; overflow: hidden; isolation: isolate;
  width: min(100%, 280px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background-color: color-mix(in srgb, var(--stop) 55%, #0a0f2e);
  background-image: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .14), transparent 60%);
  border: 6px solid var(--tp-cyan);
  box-shadow: 0 0 0 8px #141a4d, 0 0 0 11px var(--tp-line), 0 0 50px rgba(34, 227, 255, .55), inset 0 0 50px rgba(0, 0, 0, .55);
  transition: background-color .4s ease;
}
.tt-portal {
  position: absolute; inset: -20%; z-index: -1; opacity: .35;
  background: repeating-conic-gradient(from 0deg, rgba(34, 227, 255, .5) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 18%, #000 60%);
  mask: radial-gradient(circle, transparent 18%, #000 60%);
}
.tt-bolts { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0; pointer-events: none; }
.tt-bolts path { fill: none; stroke: #e6fdff; stroke-width: 5; stroke-linejoin: round; filter: drop-shadow(0 0 5px var(--tp-cyan)); }
.tt-screen__content { position: relative; z-index: 2; padding: 18px 26px; }
.tt-screen__emoji { font-size: 4rem; line-height: 1.1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.tt-screen__label { margin: 4px 0 2px; font-family: var(--tp-head); font-weight: 800; font-size: 1.75rem; line-height: 1.1; color: #fff; }
.tt-screen__label:focus { outline: none; }
.tt-screen__era { font-weight: 600; color: #fff; font-size: 1.125rem; }
.tt-screen__when { margin-top: 2px; color: var(--tp-sun); font-weight: 600; font-size: 1.125rem; text-shadow: 0 1px 2px #000; }

.tt-stops { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tt-stop {
  width: 100%; min-height: 104px; padding: 8px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 22px; border: 4px solid var(--c);
  background: linear-gradient(170deg, var(--tp-panel-2), var(--tp-night-2));
  color: var(--tp-ink); font-family: var(--tp-head); font-weight: 800; font-size: 1.125rem; line-height: 1.1;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .45), 0 0 16px color-mix(in srgb, var(--c) 60%, transparent);
  transition: translate .15s ease, box-shadow .15s ease;
}
.tt-stop:hover { translate: 0 -3px; }
.tt-stop:active { translate: 0 3px; }
.tt-stop[aria-pressed="true"] { background: var(--tp-sun); color: var(--tp-on-bright); border-color: #fff; box-shadow: 0 0 0 3px var(--c), 0 0 30px rgba(255, 210, 63, .8); }
.tt-stop__emoji { font-size: 2.1rem; line-height: 1.1; }
/* Long names (Stonehenge) on narrow phones: hyphenate or break inside the button, never spill out of it. */
.tt-stop__label { max-width: 100%; text-align: center; hyphens: auto; overflow-wrap: anywhere; }

.tt-panel { display: grid; gap: 18px; align-content: start; }
#tt-next { min-height: 64px; font-size: 1.5rem; width: 100%; }
.tt-facts-card { padding: 20px; border-radius: 26px; background: linear-gradient(170deg, var(--tp-panel-2), var(--tp-panel)); border: 3px solid var(--tp-line); }
.tt-facts-card__title { font-family: var(--tp-head); font-weight: 800; font-size: 1.6rem; line-height: 1.1; color: var(--tp-sun); margin-bottom: 10px; }
.tt-facts-card__hint { color: var(--tp-ink-soft); }
.tt-facts { display: grid; gap: 10px; }
.tt-facts li { position: relative; padding: 10px 14px 10px 42px; border-radius: 16px; background: rgba(10, 15, 46, .6); border-left: 6px solid var(--stop, var(--tp-cyan)); }
.tt-facts li::before { content: "\26A1"; position: absolute; left: 12px; top: 10px; }
.tt-book-link {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px;
  border-radius: 16px; background: var(--tp-panel); border: 2px solid var(--tp-line); color: var(--tp-ink) !important; text-decoration: none;
}
.tt-book-link:hover { border-color: var(--tp-cyan); }
.tt-book-link strong { display: block; color: var(--tp-sun); font-family: var(--tp-head); font-size: 1.2rem; }
.tt-book-link .tt-book-link__art { width: 56px; flex: none; border-radius: 8px; }

/* the fact book: every stop and fact in the page (works without JavaScript) */
.factbook { margin-top: 34px; }
.factbook__title { font-family: var(--tp-head); font-weight: 800; font-size: 1.8rem; line-height: 1.1; color: #fff; margin-bottom: 6px; }
.factbook__lede { color: var(--tp-ink-soft); margin-bottom: 14px; }
.factbook__list { display: grid; gap: 10px; }
.factbook__stop { border-radius: 18px; background: rgba(24, 33, 92, .85); border: 2px solid var(--tp-line); }
.factbook__stop summary { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; font-family: var(--tp-head); font-weight: 800; font-size: 1.25rem; }
.factbook__body { padding: 0 16px 14px; }
.factbook__when { color: var(--tp-sun); font-weight: 600; margin-bottom: 8px; }
.factbook__facts { display: grid; gap: 6px; padding-left: 1.2em !important; list-style: disc !important; }
.tt-more { margin-top: 34px; }
.tt-more .h2 { color: #fff; }

@media (max-width: 400px) {
  .tt-stops { width: auto; margin-inline: -8px; gap: 6px; }
  .tt-stop { border-width: 3px; }
}
@media (min-width: 760px) {
  .portal { padding: 34px 28px 48px; }
  .tt { grid-template-columns: 660px; justify-content: center; grid-template-areas: "dial" "panel" "link"; }
  .tt-screen { grid-area: dial; place-self: center; width: 350px; }
  .tt-stops { grid-area: dial; place-self: center; position: relative; width: 660px; height: 660px; display: block; pointer-events: none; }
  .tt-stops::before {
    content: ""; position: absolute; inset: 56px; border-radius: 50%;
    border: 3px dashed rgba(34, 227, 255, .45); box-shadow: 0 0 40px rgba(34, 227, 255, .2), inset 0 0 40px rgba(34, 227, 255, .15);
  }
  .tt-stops li {
    --a: calc(var(--i) / var(--n) * 360deg - 90deg);
    position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; pointer-events: auto;
    transform: translate(-50%, -50%) rotate(var(--a)) translate(262px) rotate(calc(-1 * var(--a)));
  }
  .tt-panel { grid-area: panel; }
  .tt-book-link { grid-area: link; }
  .tt-stop { height: 100%; min-height: 0; border-radius: 50%; padding: 10px 6px; }
  .tt-stop__emoji { font-size: 2.3rem; }
}
@media (min-width: 1140px) {
  .tt { grid-template-columns: 660px minmax(0, 1fr); grid-template-areas: "dial panel" "dial link"; align-content: center; column-gap: 40px; }
  .tt-panel { align-self: end; }
  .tt-book-link { align-self: start; }
}
@media (prefers-reduced-motion: no-preference) {
  .is-travelling .tt-portal { animation: tpSwirl 1s cubic-bezier(.3, .1, .3, 1); opacity: 1; }
  .is-travelling .tt-bolts { animation: tpFlash .6s ease-in-out; }
  .is-travelling .tt-screen__content { animation: tpArrive .9s cubic-bezier(.2, .8, .3, 1.2); }
}
@keyframes tpSwirl { 0% { rotate: 0deg; scale: .3; } 60% { scale: 1.3; } 100% { rotate: 540deg; scale: 1; } }
@keyframes tpFlash { 0%, 100% { opacity: 0; } 50% { opacity: .9; } }
@keyframes tpArrive { 0% { opacity: 0; scale: .2; rotate: -40deg; } 60% { opacity: 1; } 100% { scale: 1; rotate: 0deg; } }

/* ---------- generated from content/*.json ---------- */
/* Book colours (content/books.json) */
.book--time-tablet { --book: #1f6feb; }
.book--rude-rhino { --book: #2e7dd7; }
.book--bloated-bear { --book: #b5651d; }
.book--colouring-book { --book: #e8553e; }
/* Time Tablet stops (content/time-tablet.json): colour and place on the dial */
.era--dinosaurs { --c: #3f8f3a; --i: 0; --n: 9; } .tt-screen[data-current-stop="dinosaurs"], .tt-facts[data-stop="dinosaurs"] { --stop: #3f8f3a; }
.era--stone-age { --c: #d9541e; --i: 1; --n: 9; } .tt-screen[data-current-stop="stone-age"], .tt-facts[data-stop="stone-age"] { --stop: #d9541e; }
.era--stonehenge { --c: #6d6a8a; --i: 2; --n: 9; } .tt-screen[data-current-stop="stonehenge"], .tt-facts[data-stop="stonehenge"] { --stop: #6d6a8a; }
.era--pyramids { --c: #c98a12; --i: 3; --n: 9; } .tt-screen[data-current-stop="pyramids"], .tt-facts[data-stop="pyramids"] { --stop: #c98a12; }
.era--romans { --c: #b3261e; --i: 4; --n: 9; } .tt-screen[data-current-stop="romans"], .tt-facts[data-stop="romans"] { --stop: #b3261e; }
.era--vikings { --c: #1f6f8b; --i: 5; --n: 9; } .tt-screen[data-current-stop="vikings"], .tt-facts[data-stop="vikings"] { --stop: #1f6f8b; }
.era--castles { --c: #5b4bb7; --i: 6; --n: 9; } .tt-screen[data-current-stop="castles"], .tt-facts[data-stop="castles"] { --stop: #5b4bb7; }
.era--big-ben { --c: #2b5797; --i: 7; --n: 9; } .tt-screen[data-current-stop="big-ben"], .tt-facts[data-stop="big-ben"] { --stop: #2b5797; }
.era--moon { --c: #272a5c; --i: 8; --n: 9; } .tt-screen[data-current-stop="moon"], .tt-facts[data-stop="moon"] { --stop: #272a5c; }
/* Colour Ronny swatches */
.sw-0 { --sw: #3d8bfd; }
.sw-1 { --sw: #ffd23f; }
.sw-2 { --sw: #ff4fb8; }
.sw-3 { --sw: #57c84d; }
.sw-4 { --sw: #ff8a3d; }
.sw-5 { --sw: #9b5de5; }
.sw-6 { --sw: #22e3ff; }
.sw-7 { --sw: #ef3b3b; }
/* Artwork: watermarked previews in /img, drawn as CSS backgrounds (never <img>) */
.art[data-art="bb-floor"] { --art: url(/img/bb-floor.webp?v=820d805f19); background-image: var(--art); aspect-ratio: 500 / 518; }
.art[data-art="bb-friends"] { --art: url(/img/bb-friends.webp?v=da743e82b0); background-image: var(--art); aspect-ratio: 955 / 1000; }
.art[data-art="bb-gobble"] { --art: url(/img/bb-gobble.webp?v=b3b432e10b); background-image: var(--art); aspect-ratio: 944 / 1000; }
.art[data-art="bb-munch"] { --art: url(/img/bb-munch.webp?v=712877a46f); background-image: var(--art); aspect-ratio: 477 / 413; }
.art[data-art="bb-sniff"] { --art: url(/img/bb-sniff.webp?v=6b4bdb9e6a); background-image: var(--art); aspect-ratio: 450 / 364; }
.art[data-art="bb-sunset"] { --art: url(/img/bb-sunset.webp?v=97894d92f8); background-image: var(--art); aspect-ratio: 1000 / 617; }
.art[data-art="bb-title"] { --art: url(/img/bb-title.webp?v=e8af547c12); background-image: var(--art); aspect-ratio: 1000 / 617; }
.art[data-art="bloated-bear-cover"] { --art: url(/img/bloated-bear-cover.webp?v=9819f38a97); background-image: var(--art); aspect-ratio: 810 / 1000; }
.art[data-art="colouring-book-cover"] { --art: url(/img/colouring-book-cover.webp?v=0d8b710fad); background-image: var(--art); aspect-ratio: 793 / 1000; }
.art[data-art="nick"] { --art: url(/img/nick.webp?v=fc1f9c06c0); background-image: var(--art); aspect-ratio: 403 / 604; }
.art[data-art="ross"] { --art: url(/img/ross.webp?v=124259e4b8); background-image: var(--art); aspect-ratio: 670 / 1000; }
.art[data-art="rr-charge"] { --art: url(/img/rr-charge.webp?v=1f929cd591); background-image: var(--art); aspect-ratio: 1000 / 833; }
.art[data-art="rr-roar"] { --art: url(/img/rr-roar.webp?v=062c31963e); background-image: var(--art); aspect-ratio: 928 / 1000; }
.art[data-art="rr-zoo"] { --art: url(/img/rr-zoo.webp?v=022cbe0db7); background-image: var(--art); aspect-ratio: 1000 / 410; }
.art[data-art="rude-rhino-cover"] { --art: url(/img/rude-rhino-cover.webp?v=1c7aa1e3fb); background-image: var(--art); aspect-ratio: 793 / 1000; }
.art[data-art="time-tablet-cover"] { --art: url(/img/time-tablet-cover.webp?v=831e62cac9); background-image: var(--art); aspect-ratio: 793 / 1000; }
.art[data-art="tt-dinosaur"] { --art: url(/img/tt-dinosaur.webp?v=faf09e4ebe); background-image: var(--art); aspect-ratio: 1000 / 475; }
.art[data-art="tt-museum"] { --art: url(/img/tt-museum.webp?v=d21681e044); background-image: var(--art); aspect-ratio: 1000 / 699; }
/* Lazy artwork: no picture until site.js sees it near the screen (css/nojs.css shows them all without JavaScript) */
.art[data-lazy] { background-image: none !important; }
