/* Color & Print (/color/) and Color it here (/color/online/).
   Coloring pages hang on a clothesline across the spotted wall; posters are taped up; grown-up lists stay calm and scannable. */

.page-color main { overflow-x: clip; }
/* jump targets land below the sticky top bar */
.page-color main [id] { scroll-margin-top: 96px; }

/* ---------- head: a sign and the red easel board on the spotted wall, Pepper sitting on the floor ---------- */
.cp-head { --floor-h: clamp(36px, 3.4vw, 48px); position: relative; padding: clamp(28px, 4.5vw, 64px) 0 calc(var(--floor-h) * 0.5); }
.cp-head__in {
  position: relative; z-index: 1; display: grid; column-gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: auto 1fr; grid-template-areas: "text easel" "pup easel";
}
.cp-head__text { grid-area: text; position: relative; background: var(--wall); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow-1); }
.cp-head__text::before, .cp-head__text::after { content: ""; position: absolute; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f6dc8f, var(--brass) 55%, #8a6418); box-shadow: 0 1px 2px rgb(0 0 0 / 0.35); }
.cp-head__text::before { left: 12px; }
.cp-head__text::after { right: 12px; }
.cp-head h1 { font-size: clamp(2.6rem, 4vw + 1rem, 4.6rem); margin-bottom: 0.2em; color: var(--red); }
.cp-head .lede { margin-bottom: 1.1em; color: var(--ink); }
.cp-head__pup { grid-area: pup; align-self: end; justify-self: end; width: clamp(130px, 12vw, 180px); margin: 24px 8% 0 0; }

.jump { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 6px 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  color: var(--spot); background: var(--cream); border-radius: 999px; text-decoration: none;
  box-shadow: inset 0 0 0 2px rgb(30 28 28 / 0.14);
}
.jump a:hover { background: var(--yellow); color: var(--spot); }
/* the category links again, at the end of the long coloring line */
.jump-again { width: fit-content; max-width: 100%; margin-top: clamp(36px, 5vw, 60px); padding: 18px clamp(18px, 2.4vw, 26px) 20px; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.jump-again p { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--spot); }

/* the big "Color it here" door: a red bay-door board holding a half-colored page */
.easel {
  --legs: calc(var(--floor-h) * 0.5 + clamp(24px, 3vw, 40px)); /* from the board's bottom edge down to the floor */
  grid-area: easel; align-self: end; margin-bottom: var(--legs);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: end;
  gap: 14px 18px; padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 28px) 30px;
  background: var(--red); color: #fff; text-decoration: none; border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  isolation: isolate;
}
.easel::before { /* bay-door panel lines */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 62px, rgb(0 0 0 / 0.13) 62px 65px, rgb(255 255 255 / 0.07) 65px 67px);
}
.easel::after { /* reflective trim along the bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: linear-gradient(to bottom, var(--trim-lime) 0 4px, var(--trim-silver) 4px 8px, var(--trim-lime) 8px 12px);
}
.easel:hover, .easel:focus-visible { color: #fff; box-shadow: 0 8px 18px rgb(60 30 20 / 0.22), 0 22px 44px rgb(60 30 20 / 0.2); }
.easel:hover::after, .easel:focus-visible::after { background: linear-gradient(to bottom, var(--trim-lime) 0 4px, var(--trim-lit) 4px 8px, var(--trim-lime) 8px 12px); }
.easel__paper {
  grid-column: 1 / -1; display: block; background: #fff; border-radius: 6px; padding: 4%;
  width: min(100%, 420px); justify-self: center;
  transform: rotate(-2deg); box-shadow: 0 3px 6px rgb(0 0 0 / 0.2), 0 12px 24px rgb(0 0 0 / 0.18);
  transition: transform 0.45s var(--ease-bounce);
}
.easel:hover .easel__paper, .easel:focus-visible .easel__paper { transform: rotate(0.5deg) scale(1.02); }
.easel__crayons { position: absolute; right: clamp(16px, 4%, 40px); top: 46%; display: flex; gap: 6px; transform: rotate(18deg); pointer-events: none; }
.easel__crayons svg { width: clamp(18px, 2vw, 24px); height: auto; filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.25)); }
.easel__crayons svg:nth-child(2) { margin-top: 14px; }
.easel__crayons svg:nth-child(3) { margin-top: 4px; }
.easel__label { display: grid; gap: 2px; }
/* the board stands on two wooden easel legs with rubber feet on the floor, each with a contact shadow */
.easel__label::before, .easel__label::after {
  content: ""; position: absolute; z-index: -2; top: calc(100% - 6px); height: calc(var(--legs) + 6px); width: 44px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgb(60 30 20 / 0.42), rgb(60 30 20 / 0.16) 60%, transparent) 50% 100% / 44px 10px no-repeat,
    linear-gradient(#2b2523, #3b3330) 50% calc(100% - 3px) / 22px 7px no-repeat,
    linear-gradient(90deg, #8a5530, #b0743f 45%, #8a5530) 50% 0 / 14px calc(100% - 8px) no-repeat;
}
.easel__label::before { left: 14%; transform: rotate(4deg); transform-origin: 50% 0; }
.easel__label::after { right: 14%; transform: rotate(-4deg); transform-origin: 50% 0; }
.easel__t { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.6vw + 1.3rem, 2.8rem); line-height: 1; }
.easel__s { font-weight: 700; font-size: 1.02rem; color: #fff; }
.easel__go {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--yellow); color: var(--spot); border: 3px solid var(--spot);
  transition: transform 0.35s var(--ease-bounce);
}
.easel__go .icon { width: 30px; height: 30px; margin-left: 4px; }
.easel:hover .easel__go { transform: scale(1.08); }

@media (max-width: 860px) {
  .cp-head__in { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "text" "easel" "pup"; row-gap: 24px; }
  .easel { --legs: 120px; margin-bottom: 0; } /* the legs reach past Pepper's row (24px gap + 96px) to the floor */
  .cp-head__in { grid-template-rows: auto auto 96px; }
  .cp-head__pup { align-self: end; justify-self: center; }
  .cp-head__pup { width: 104px; margin: -8px 8px 0 0; }
  .easel__paper { width: min(100%, 340px); }
}

/* ---------- section heads ---------- */
.coloring, .activities, .posters, .events { padding: clamp(56px, 7vw, 96px) 0; }
.coloring h2, .activities h2, .posters h2, .events h2, .bingo h2 { margin-bottom: 0.3em; }
.sec-head { max-width: 68ch; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head .lede { max-width: none; }

/* ---------- coloring pages on the clothesline ---------- */
.coloring { position: relative; background: var(--wall); }
.coloring .wrap { position: relative; }
.set { margin-top: clamp(36px, 5vw, 64px); }
.set__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.set__head h3 { margin: 0; font-size: clamp(1.7rem, 1.2vw + 1.2rem, 2.3rem); }
.set__age { display: block; margin-top: 4px; font-family: var(--font-body); font-weight: 800; font-size: 1rem; color: var(--ink-soft); letter-spacing: 0; }
.posters .set__head { margin-bottom: 28px; }
.posters .set__head .lede { margin: 0; }

.btn small { display: block; flex-basis: 100%; margin-top: 1px; font-family: var(--font-body); font-weight: 800; font-size: 0.72em; letter-spacing: 0; opacity: 0.92; text-align: center; }
.btn:has(small) { flex-wrap: wrap; row-gap: 0; }
.getall { flex: none; }

.line {
  --gap: clamp(16px, 2.2vw, 30px);
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 42vw), 1fr));
  gap: clamp(30px, 3vw, 44px) var(--gap);
}
#big-and-easy .line { grid-template-columns: repeat(auto-fill, minmax(min(176px, 42vw), 1fr)); }
.line > li { position: relative; padding-top: 14px; }
.line > li::before { /* the rope: each page carries its stretch of line, so every row reads as one rope */
  content: ""; position: absolute; top: 14px; left: calc(var(--gap) / -2 - 2px); right: calc(var(--gap) / -2 - 2px); height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(115deg, #b9a37e 0 4px, #8f7a57 4px 6px);
  box-shadow: 0 2px 2px rgb(60 30 20 / 0.18);
}
.sheet { position: relative; display: grid; gap: 4px; text-decoration: none; color: var(--spot); }
.sheet::before { /* clothespin */
  content: ""; position: absolute; top: -12px; left: 16%; width: 12px; height: 36px; margin-left: -6px; z-index: 2;
  border-radius: 3px 3px 4px 4px;
  background: linear-gradient(to right, #d9ae6c 0 5px, #8b6435 5px 7px, #c99a5b 7px);
  box-shadow: 0 2px 3px rgb(60 30 20 / 0.3);
  transition: transform 0.4s var(--ease-bounce);
}
.sheet__paper {
  display: block; margin-top: 1px; background: #fff; border-radius: 3px; overflow: hidden;
  box-shadow: 0 1px 2px rgb(60 30 20 / 0.18), 0 8px 16px rgb(60 30 20 / 0.14);
  transform-origin: 50% 0; transform: rotate(var(--tilt, -1.2deg));
  transition: transform 0.45s var(--ease-bounce), box-shadow 0.3s var(--ease-out);
}
.line > li:nth-child(3n+2) .sheet { --tilt: 1.4deg; }
.line > li:nth-child(3n) .sheet { --tilt: -0.4deg; }
.line > li:nth-child(4n) .sheet { --tilt: 2deg; }
.sheet__paper img { width: 100%; height: auto; }
.sheet__t { margin-top: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; line-height: 1.15; }
.sheet__m { font-size: 0.86rem; font-weight: 700; color: var(--ink-soft); }
.sheet:hover .sheet__paper, .sheet:focus-visible .sheet__paper { transform: rotate(0deg) translateY(-4px); box-shadow: 0 4px 8px rgb(60 30 20 / 0.18), 0 18px 30px rgb(60 30 20 / 0.18); }
.sheet:hover .sheet__t { color: var(--red-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.sheet:focus-visible { outline: none; }
.sheet:focus-visible .sheet__paper { outline: 4px solid var(--sky-deep); outline-offset: 4px; }

/* posters: taped up, no rope */
.line--posters { grid-template-columns: repeat(auto-fill, minmax(min(190px, 42vw), 1fr)); }
.line--posters > li::before { content: none; }
.line--posters .sheet::before {
  top: -4px; left: 50%; width: 64px; height: 22px; margin-left: -32px; border-radius: 2px;
  background: rgb(242 184 46 / 0.78); box-shadow: none; transform: rotate(-4deg);
}
.line--posters > li:nth-child(even) .sheet::before { transform: rotate(5deg); }

/* ---------- puzzle packs ---------- */
.activities { background: var(--cream); }
.pack {
  display: grid; grid-template-columns: clamp(110px, 16vw, 200px) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px);
  padding: clamp(24px, 3vw, 36px) 0; border-top: 3px dotted rgb(30 28 28 / 0.22);
}
.pack:last-of-type { border-bottom: 3px dotted rgb(30 28 28 / 0.22); }
.pack__cover { display: block; align-self: start; background: #fff; border-radius: 3px; overflow: hidden; transform: rotate(-2deg); box-shadow: var(--shadow-1); }
.pack:nth-of-type(2) .pack__cover { transform: rotate(1.5deg); }
.pack__body { max-width: 68ch; }
.pack h3 { margin-bottom: 0.25em; font-size: clamp(1.6rem, 1vw + 1.2rem, 2.1rem); }
.pack__age {
  display: inline-block; vertical-align: 0.2em; margin-left: 6px; padding: 3px 12px; border-radius: 999px;
  background: var(--yellow); font-family: var(--font-body); font-weight: 900; font-size: 0.9rem; color: var(--spot);
}
.pack__get { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.pack__pages summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer;
  font-weight: 800; color: var(--red-deep); list-style: none;
}
.pack__pages summary::-webkit-details-marker { display: none; }
.pack__pages summary::before {
  content: ""; width: 10px; height: 10px; border: solid currentColor; border-width: 0 3px 3px 0;
  transform: rotate(-45deg); transition: transform 0.25s var(--ease-out); margin-right: 4px;
}
.pack__pages[open] summary::before { transform: rotate(45deg); }
.pack__pages summary span { color: var(--ink-soft); font-weight: 700; }
.pack__pages summary:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* compact file lists (single pages, event files) */
.files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.files a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  min-height: 60px; padding: 6px 10px 6px 6px; border-radius: 12px; text-decoration: none; color: var(--spot);
}
.files a:hover { background: rgb(255 255 255 / 0.85); }
.files img { grid-row: 1 / 3; width: 40px; height: auto; max-height: 52px; object-fit: contain; object-position: top; background: #fff; border-radius: 2px; box-shadow: 0 1px 3px rgb(60 30 20 / 0.25); }
.files__t { font-weight: 800; line-height: 1.2; align-self: end; }
.files a:hover .files__t { color: var(--red-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.files__m { font-size: 0.86rem; font-weight: 700; color: var(--ink-soft); align-self: start; }

/* ---------- bingo ---------- */
.bingo { padding: clamp(56px, 7vw, 96px) 0; }
.bingo__in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.bingo__card { position: relative; display: block; max-width: 340px; justify-self: center; background: #fff; border-radius: 3px; transform: rotate(-3deg); box-shadow: var(--shadow-2); transition: transform 0.45s var(--ease-bounce); }
.bingo__card:hover { transform: rotate(0deg) scale(1.02); }
.bingo__card img { width: 100%; border-radius: 3px; }
.bingo__card::before { /* taped to the wall like the posters */
  content: ""; position: absolute; top: -11px; left: 50%; width: 84px; height: 24px; margin-left: -42px; z-index: 1; border-radius: 2px;
  background: rgb(242 184 46 / 0.8); transform: rotate(3deg);
}
.bingo__text { background: rgb(255 253 248 / 0.95); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 40px); box-shadow: var(--shadow-1); max-width: 60ch; }
.bingo__text p { color: var(--ink-soft); }
@media (max-width: 760px) {
  .bingo__in { grid-template-columns: 1fr; }
  .bingo__card { max-width: 230px; }
}

/* ---------- posters ---------- */
.posters { background: var(--wall); }

/* ---------- events ---------- */
.events { background: var(--paper); border-top: 1px solid rgb(30 28 28 / 0.08); }
.events__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.events__cols h3 { margin-bottom: 0.2em; }
.events__note { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 6px; }
.events .files { grid-template-columns: 1fr; }
.events__fine { margin: 36px 0 0; max-width: 68ch; font-size: 0.95rem; color: var(--ink-soft); }
@media (max-width: 960px) {
  .events__cols { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pack { grid-template-columns: 1fr; }
  .pack__cover { width: 120px; }
  .set__head .getall { width: 100%; }
}

/* =========================================================
   Color it here (/color/online/)
   ========================================================= */
.page-color-online { background: var(--cream); }
.ci { padding: 14px 0 48px; }
.ci__top { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-bottom: 10px; }
.ci__top h1 { margin: 0; font-size: clamp(1.7rem, 1.2vw + 1.2rem, 2.4rem); color: var(--red); }
.ci__top .backlink { min-height: 48px; }

.ci__stage {
  display: grid; gap: clamp(12px, 2vw, 24px);
  grid-template-columns: 150px minmax(0, 1fr) clamp(260px, 24vw, 330px);
  grid-template-areas: "pics art tools" "pics art more" "pics art parts";
  grid-template-rows: auto auto 1fr;
  align-items: start;
}
.ci__art { grid-area: art; position: relative; display: grid; place-items: center; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: clamp(8px, 1.2vw, 16px); }
.ci__art canvas {
  display: block; max-width: 100%; max-height: calc(100svh - 190px); width: auto; height: auto;
  touch-action: pan-y; cursor: crosshair; border-radius: 6px;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.ci__art canvas:focus-visible { outline: 4px solid var(--sky-deep); outline-offset: 4px; }
.ci__art[data-tool="spots"] canvas { cursor: copy; }
.ci__cursor { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid var(--sky-deep); box-shadow: 0 0 0 3px #fff; pointer-events: none; display: none; }
.ci__art:focus-within .ci__cursor[data-on="true"], .ci__art[data-hint="on"] .ci__cursor { display: block; }
.ci__loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); }
.ci__loading[hidden] { display: none; }

/* crayons: never narrower than 44px; as many columns as the space really holds */
.ci__tools { grid-area: tools; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.ci__tools > * { min-width: 0; }
.crayons { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px 4px; padding: 10px 8px 4px; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.crayon {
  position: relative; display: grid; justify-items: center; align-content: end; min-width: 44px; min-height: 76px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--c); border-radius: 10px;
}
.crayon svg { width: 100%; max-width: 30px; height: 70px; transition: transform 0.3s var(--ease-bounce); filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2)); }
.crayon .rim { stroke: rgb(30 28 28 / 0.35); stroke-width: 1.4; }
.crayon:hover svg { transform: translateY(-4px); }
.crayon[aria-checked="true"] svg { transform: translateY(-10px); }
.crayon[aria-checked="true"]::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--spot); }
.crayon:focus-visible { outline-offset: 0; }
.ci__now { display: flex; align-items: center; gap: 10px; min-height: 30px; margin: 8px 0 0; font-weight: 800; font-size: 1rem; }
.ci__now i, .tool__dot { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--now, #cc3329); box-shadow: inset 0 0 0 2px rgb(30 28 28 / 0.35); }

.toolrow, .ci__more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ci__more { grid-area: more; }
.tool {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; min-width: 0; padding: 6px 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.05; text-align: center; color: var(--spot);
  background: #fff; border: 3px solid var(--spot); border-radius: 16px; cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}
.tool .icon, .tool svg { width: 26px; height: 26px; flex: none; }
.tool:hover { transform: translateY(-2px); background: var(--cream); }
.tool[aria-pressed="true"] { background: var(--yellow); }
.tool:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.tool--save { background: var(--red); color: #fff; }
.tool--save:hover { background: var(--red-deep); }
.tool--more, .tool--save-tray { display: none; }
.tool--more[aria-expanded="true"] { background: var(--cream); }

/* Parts: every named space in the picture as a big button (same fill as tapping it); folds away on phones */
.parts { grid-area: parts; }
.parts[hidden] { display: none; }
.parts summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-height: 44px; padding: 4px 0 6px; cursor: pointer; list-style: none; border-radius: 10px; }
.parts summary::-webkit-details-marker { display: none; }
.parts summary::before { content: ""; align-self: center; width: 10px; height: 10px; margin: 0 2px 0 4px; border: solid var(--spot); border-width: 0 3px 3px 0; transform: rotate(-45deg); transition: transform 0.2s var(--ease-out); }
.parts[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.parts h2 { font-size: 1.15rem; margin: 0; }
.parts__hint { font-weight: 700; color: var(--ink-soft); }
.parts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.part {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 12px 6px 10px; text-align: left;
  background: #fff; border: 3px solid transparent; border-radius: 16px; box-shadow: var(--shadow-1); cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.15; color: var(--spot);
  transition: transform 0.2s var(--ease-out), border-color 0.2s;
}
.part i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--pc, #fff); box-shadow: inset 0 0 0 2px rgb(30 28 28 / 0.4); }
.part:hover { border-color: var(--yellow); transform: translateY(-2px); }
.ci__art[data-tool="spots"] ~ .parts .part i { background-image: radial-gradient(circle at 34% 38%, var(--spot) 0 3px, transparent 3.5px), radial-gradient(circle at 68% 64%, var(--spot) 0 4px, transparent 4.5px); }

.pics { grid-area: pics; min-width: 0; }
.pics h2 { font-size: 1.15rem; margin: 0 0 6px; }
.pics__list { list-style: none; margin: 0; padding: 4px 8px 12px 4px; display: grid; grid-template-columns: 1fr; gap: 12px; max-height: calc(100svh - 200px); overflow-y: auto; scrollbar-width: thin; }
.pic {
  display: grid; gap: 4px; justify-items: center; width: 100%; min-height: 64px; padding: 8px 6px 10px; border: 3px solid transparent; border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-1); cursor: pointer; font: inherit; font-weight: 800; font-size: 0.86rem; line-height: 1.15; color: var(--spot);
}
.pic img { width: 96px; height: 80px; object-fit: contain; }
.pic:hover { border-color: var(--yellow); }
.pic[aria-pressed="true"] { border-color: var(--red); background: var(--paper); }

.print-only { display: none; }

/* up to 900px: a "Pick a picture" strip right under the title, swiped sideways */
@media (max-width: 900px) {
  .pics { display: flex; align-items: center; gap: 4px 12px; }
  .pics h2 { flex: none; width: 4.6em; margin: 0; font-size: 1.05rem; line-height: 1.1; }
  .pics__list { flex: 1; display: flex; gap: 10px; max-height: none; overflow: auto hidden; padding: 4px 4px 16px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .pics__list li { flex: none; scroll-snap-align: start; }
  .pic { width: 92px; padding: 6px 4px 8px; font-size: 0.8rem; box-shadow: 0 1px 2px rgb(60 30 20 / 0.12), 0 4px 8px rgb(60 30 20 / 0.1); }
  .pic img { width: 64px; height: 60px; }
  .ci__art canvas { max-height: 62svh; }
  .parts__list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
/* 760-900px: canvas with the tools beside it */
@media (min-width: 760px) and (max-width: 900px) {
  .ci__stage { grid-template-columns: minmax(0, 1fr) 268px; grid-template-areas: "pics pics" "art tools" "art more" "parts parts"; grid-template-rows: auto auto 1fr auto; }
  .ci__art canvas { max-height: min(70svh, 560px); }
}
/* phones: picture strip, the picture, then a crayon tray that stays at the bottom of the screen while you color */
@media (max-width: 759px) {
  .ci { padding-top: 6px; }
  .ci__top { margin-bottom: 6px; }
  .ci__top h1 { font-size: 1.5rem; }
  .ci__stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pics" "art" "tools" "more" "parts"; grid-template-rows: none; gap: 10px; }
  .pics { display: block; }
  .pics h2 { width: auto; margin: 0 0 2px; font-size: 1rem; }
  .pics__list { padding-bottom: 14px; margin-bottom: -6px; }
  .ci__art canvas { max-height: calc(100svh - 470px); min-height: 200px; width: auto; max-width: 100%; height: auto; }
  .ci__tools {
    position: sticky; bottom: 0; z-index: 30; gap: 8px; margin-inline: -6px; padding: 0 6px calc(8px + env(safe-area-inset-bottom));
    background: var(--cream); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 14px -6px rgb(60 30 20 / 0.28);
  }
  .crayons { display: flex; gap: 2px; padding: 10px 6px 2px; overflow: auto hidden; scrollbar-width: none; border-radius: 0 0 16px 16px; box-shadow: inset 0 0 0 2px rgb(30 28 28 / 0.08); }
  .crayons::-webkit-scrollbar { display: none; }
  .crayon { flex: 0 0 44px; min-height: 58px; }
  .crayon svg { height: 52px; }
  .crayon[aria-checked="true"] svg { transform: translateY(-6px); }
  .ci__now { display: none; }
  .ci__tools[data-open="true"] .crayons { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); column-gap: 2px; padding-inline: 4px; overflow: visible; }
  .ci__tools[data-open="true"] .ci__now { display: flex; margin-top: 4px; font-size: 0.95rem; min-height: 26px; }
  .toolrow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .tool { min-height: 56px; font-size: 0.92rem; border-radius: 14px; }
  .tool .icon, .tool svg { width: 24px; height: 24px; }
  .tool--more { display: inline-flex; }
  /* Save picture rides in the crayon tray on phones, so it is always on screen while coloring */
  .tool--save-tray { display: inline-flex; }
  .ci__more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci__more .tool--save-side { display: none; }
  .tool--more .tool__dot { width: 24px; height: 24px; }
  .ci__more .tool { min-height: 56px; }
  .parts__list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media print {
  body.page-color-online > *:not(main), .page-color-online main > *:not(.print-only) { display: none !important; }
  .page-color-online { background: #fff; }
  .print-only { display: block !important; width: 100%; max-height: 100vh; object-fit: contain; }
}

/* phones: the detailed set and the posters hang three to a row so the line doesn't go on forever (two below 400px) */
@media (max-width: 560px) {
  #detailed .line, .line--posters { --gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  #detailed .sheet__t, .line--posters .sheet__t { font-size: 0.9375rem; line-height: 1.2; }
  #detailed .sheet__m, .line--posters .sheet__m { font-size: 0.8125rem; }
  .line--posters .sheet::before { width: 44px; margin-left: -22px; height: 16px; }
}
/* narrow phones: two to a row so every title and its page count stay easy to read */
@media (max-width: 399px) {
  #detailed .line, .line--posters { --gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
}

/* links to the accessible text versions of the PDFs (/color/safety-posters/, /grown-ups/…) */
.textversion { margin: 10px 0 0; font-size: 0.95rem; font-weight: 700; color: var(--ink-soft); }
.textversion a { display: inline-block; padding: 8px 0; font-weight: 800; color: var(--red-deep); }
.posters .textversion { margin-top: 18px; }
