/* ===== D10 — ÁLBUM DE COLORIR (cartão no artigo, álbum, livro de colorir) ===== */
.coloring-reward, .coloring-album-page, .coloring-book {
  --cr-ink: var(--cy-ink, #24171a);
  --cr-muted: var(--cy-muted, #6b5a52);
  --cr-wine: var(--cy-wine, #7a2d3d);
  --cr-line: var(--cy-line2, #d8c6b0);
  --cr-paper: #fffaf1;
  --cr-sheet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M14 10h92l-2 14 3 12-2 16 2 14-3 16 2 14-1 14H16l2-12-3-14 2-16-2-14 3-16-2-14z' fill='%23fffdf7' stroke='%23d9c8b0' stroke-width='2'/%3E%3Cg fill='none' stroke='%23382c27' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M60 30l8 17 19 2-14 13 4 19-17-9-17 9 4-19-14-13 19-2z'/%3E%3Ccircle cx='34' cy='88' r='7'/%3E%3Cpath d='M74 92c6-8 16-8 22 0'/%3E%3C/g%3E%3C/svg%3E");
  --cr-sheet-done: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M14 10h92l-2 14 3 12-2 16 2 14-3 16 2 14-1 14H16l2-12-3-14 2-16-2-14 3-16-2-14z' fill='%23fffdf7' stroke='%23d9c8b0' stroke-width='2'/%3E%3Cg stroke='%23382c27' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M60 30l8 17 19 2-14 13 4 19-17-9-17 9 4-19-14-13 19-2z' fill='%23f2d35b'/%3E%3Ccircle cx='34' cy='88' r='7' fill='%23e8a0a8'/%3E%3Cpath d='M74 92c6-8 16-8 22 0' fill='none'/%3E%3C/g%3E%3C/svg%3E");
  --cr-crayon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 120'%3E%3Cpath d='M12 26h16v86H12z' fill='%23c8643b'/%3E%3Cpath d='M12 26l8-22 8 22z' fill='%23e98a5f'/%3E%3Cpath d='M17 12l3-8 3 8z' fill='%23382c27'/%3E%3Cpath d='M12 40h16v6H12zm0 50h16v6H12z' fill='%23fffaf1' opacity='.75'/%3E%3C/svg%3E");
  --cr-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'%3E%3Cpath d='M11 19v-6a9 9 0 0 1 18 0v6' fill='none' stroke='%237a2d3d' stroke-width='4'/%3E%3Crect x='6' y='18' width='28' height='22' rx='4' fill='%237a2d3d'/%3E%3Ccircle cx='20' cy='28' r='3.5' fill='%23fffaf1'/%3E%3C/svg%3E");
}

/* ---------- cartão no fim do artigo ---------- */
.coloring-reward {
  position: relative;
  display: grid;
  grid-template-columns: clamp(92px, 22%, 150px) minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 28px);
  align-items: center;
  margin: clamp(28px, 4vw, 44px) 0 clamp(22px, 3vw, 34px) !important;
  padding: clamp(18px, 2.6vw, 30px) clamp(16px, 2.6vw, 30px) !important;
  color: var(--cr-ink);
}
.coloring-reward-art { position: relative; aspect-ratio: 1; }
.coloring-reward-sheet, .coloring-empty-art .coloring-reward-sheet {
  position: absolute; inset: 4% 14% 4% 0;
  background: var(--cr-sheet) center / contain no-repeat;
  rotate: -4deg;
  filter: drop-shadow(0 6px 8px rgb(60 30 15 / 22%));
  transition: rotate .5s cubic-bezier(.2,.9,.3,1.3);
}
.coloring-reward-crayon {
  position: absolute; right: 2%; bottom: 0; width: 22%; height: 74%;
  background: var(--cr-crayon) center / contain no-repeat;
  rotate: 18deg; transform-origin: bottom center;
  filter: drop-shadow(0 4px 4px rgb(60 30 15 / 25%));
}
.coloring-reward-lock {
  position: absolute; left: 30%; top: 32%; width: 30%; aspect-ratio: 40 / 44;
  background: var(--cr-lock) center / contain no-repeat;
  filter: drop-shadow(0 3px 3px rgb(60 30 15 / 30%));
}
.coloring-reward-kicker, .coloring-eyebrow {
  display: inline-block;
  padding: 5px 12px 6px;
  margin-bottom: 10px;
  border: 0 solid transparent;
  border-image: var(--cy-paper-rose, none);
  background: color-mix(in srgb, #e8a0a8 45%, transparent);
  font: 500 14px/1 var(--cy-serif, Georgia, serif);
  color: #24171a;
}
.coloring-reward-title {
  margin: 0 0 6px !important;
  font: 800 clamp(21px, 2.3vw, 28px)/1.12 var(--cy-serif, Georgia, serif) !important;
  color: var(--cr-ink) !important;
  text-wrap: balance;
}
.coloring-reward-text { margin: 0 0 12px !important; font: 400 16px/1.5 var(--cy-sans, system-ui, sans-serif) !important; color: var(--cr-muted) !important; }
.coloring-reward-when { display: none; }
.coloring-reward[data-state="locked"] [data-when="locked"],
.coloring-reward[data-state="earned"] [data-when="earned"],
.coloring-reward[data-state="pending"] [data-when="pending"] { display: block; }
.coloring-reward:not([data-state="locked"]) .coloring-reward-lock { display: none; }
.coloring-reward:not([data-state="locked"]) .coloring-reward-sheet { background-image: var(--cr-sheet-done); rotate: 2deg; }
.coloring-reward.is-celebrating .coloring-reward-sheet { animation: coloring-pop .9s cubic-bezier(.2,.9,.3,1.4); }
@keyframes coloring-pop { 0% { scale: .7; rotate: -14deg; } 60% { scale: 1.08; } 100% { scale: 1; rotate: 2deg; } }

.coloring-reward-steps { list-style: none; margin: 4px 0 0 !important; padding: 0 !important; display: grid; gap: 8px; }
.coloring-reward-steps li {
  display: grid; grid-template-columns: 22px auto minmax(60px, 1fr); align-items: center; gap: 10px;
  margin: 0 !important; padding: 0 !important; font: 600 14px/1.2 var(--cy-sans, system-ui, sans-serif); color: var(--cr-ink);
}
.coloring-reward-steps li::before, .coloring-reward-steps li::marker { content: none; }
.coloring-step-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--cr-line); background: var(--cr-paper);
  display: grid; place-items: center;
}
.coloring-reward-steps li.is-done .coloring-step-check { background: #4f6b4a; border-color: #4f6b4a; }
.coloring-reward-steps li.is-done .coloring-step-check::after {
  content: ""; width: 9px; height: 5px; border: 2px solid #fffaf1; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px;
}
.coloring-step-bar { position: relative; height: 8px; border-radius: 6px; background: color-mix(in srgb, var(--cr-line) 60%, transparent); overflow: hidden; }
.coloring-step-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #d9a441, #c8643b); transition: width .9s linear; }
.coloring-reward-note { min-height: 1.2em; margin: 8px 0 0 !important; font: 500 13px/1.3 var(--cy-sans, system-ui, sans-serif) !important; color: var(--cr-muted) !important; }
.coloring-reward-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.coloring-reward-link { font: 600 15px/1.2 var(--cy-sans, system-ui, sans-serif); color: var(--cr-ink); text-decoration-color: var(--cr-wine); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (max-width: 520px) {
  .coloring-reward { grid-template-columns: 84px minmax(0, 1fr); align-items: start; }
  .coloring-reward-steps li { grid-template-columns: 20px minmax(0, 1fr); }
  .coloring-step-bar { grid-column: 2; }
}

.coloring-toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 120;
  translate: -50% 20px; opacity: 0;
  padding: 12px 18px; max-width: min(92vw, 420px);
  background: #fffaf1; color: #24171a; border: 1px solid #d9c8b0; border-radius: 3px;
  box-shadow: 0 10px 24px rgb(40 20 10 / 22%);
  font: 700 15px/1.3 var(--cy-sans, system-ui, sans-serif);
  transition: opacity .35s, translate .35s;
}
.coloring-toast::before { content: ""; display: inline-block; width: 1.1em; height: 1.1em; margin-right: .5em; vertical-align: -.2em; background: var(--cr-crayon, none) center / contain no-repeat; }
.coloring-toast.is-shown { opacity: 1; translate: -50% 0; }
@media (min-width: 900px) { .coloring-toast { bottom: 28px; } }

/* ---------- álbum ---------- */
.coloring-album-page { padding: clamp(22px, 3vw, 44px) 0 clamp(40px, 5vw, 72px); color: var(--cr-ink); }
.coloring-album-head { padding: clamp(22px, 3vw, 40px) !important; margin-bottom: clamp(24px, 3vw, 40px); }
.coloring-album-head h1 { margin: 4px 0 10px !important; font: 900 clamp(34px, 4.4vw, 56px)/1 var(--cy-serif, Georgia, serif) !important; color: var(--cr-ink) !important; }
.coloring-album-head p { max-width: 46ch; margin: 0 0 14px !important; font: 400 17px/1.55 var(--cy-sans, system-ui, sans-serif) !important; color: var(--cr-muted) !important; }
.coloring-album-count { font: 700 15px/1 var(--cy-sans, system-ui, sans-serif); color: var(--cr-wine); }

.coloring-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: clamp(28px, 4vw, 56px) clamp(18px, 3vw, 40px) !important; }
.coloring-empty-art { position: relative; width: min(190px, 52vw); aspect-ratio: 1; margin-bottom: 6px; }
.coloring-empty h2 { margin: 0 !important; font: 800 clamp(24px, 2.6vw, 32px)/1.1 var(--cy-serif, Georgia, serif) !important; color: var(--cr-ink) !important; }
.coloring-empty p { max-width: 40ch; margin: 0 0 8px !important; font: 400 16px/1.5 var(--cy-sans, system-ui, sans-serif) !important; color: var(--cr-muted) !important; }

.coloring-grid { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(22px, 2.6vw, 36px); }
.coloring-card { margin: 0 !important; padding: 0 !important; }
.coloring-card::marker { content: none; }
.coloring-card:nth-child(odd) .coloring-card-sheet { rotate: -1.2deg; }
.coloring-card:nth-child(even) .coloring-card-sheet { rotate: 1deg; }
.coloring-card-link { display: grid; gap: 12px; color: inherit; text-decoration: none; }
.coloring-card-sheet {
  position: relative; display: block; width: 100%;
  background: #fffdf7; border: 1px solid #e3d5c1;
  box-shadow: 0 10px 18px rgb(60 30 15 / 16%);
  transition: rotate .4s, translate .4s;
}
.coloring-card-sheet::before {
  content: ""; position: absolute; left: 50%; top: -9px; z-index: 2; width: 74px; height: 18px; translate: -50% 0; rotate: -4deg;
  background: linear-gradient(95deg, #e6cd91bf, #f0dba5ed 55%, #dbc28bbf);
  clip-path: polygon(2% 0,100% 3%,97% 44%,100% 91%,1% 100%,3% 55%);
}
.coloring-card-link:hover .coloring-card-sheet, .coloring-card-link:focus-visible .coloring-card-sheet { rotate: 0deg; translate: 0 -4px; }
.coloring-card-sheet img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.coloring-card-paint { mix-blend-mode: multiply; }
.coloring-card-body { display: grid; gap: 6px; }
.coloring-card-status { justify-self: start; padding: 4px 10px; font: 700 12px/1 var(--cy-sans, system-ui, sans-serif); letter-spacing: .02em; text-transform: uppercase; border-radius: 2px; }
.coloring-card-status.is-new { background: #f2d35b; color: #3b2a10; }
.coloring-card-status.is-painted { background: #4f6b4a; color: #fffaf1; }
.coloring-card-title { font: 800 19px/1.15 var(--cy-serif, Georgia, serif); color: var(--cr-ink); text-wrap: balance; }
.coloring-card-link:hover .coloring-card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .14em; }
.coloring-card-date { font: 500 13px/1.3 var(--cy-sans, system-ui, sans-serif); color: var(--cr-muted); }

/* ---------- livro de colorir ---------- */
.coloring-book { padding: clamp(18px, 2.6vw, 36px) 0 clamp(40px, 5vw, 70px); color: var(--cr-ink); }
.coloring-book-head { display: grid; gap: 6px; margin-bottom: clamp(16px, 2.2vw, 26px); }
.coloring-back, .coloring-reread { justify-self: start; font: 600 15px/1.3 var(--cy-sans, system-ui, sans-serif); color: var(--cr-ink); text-decoration-color: var(--cr-wine); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.coloring-book-head h1 { margin: 2px 0 4px !important; font: 900 clamp(26px, 3.4vw, 42px)/1.05 var(--cy-serif, Georgia, serif) !important; color: var(--cr-ink) !important; text-wrap: balance; }
.coloring-book-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: clamp(16px, 2.4vw, 30px); align-items: start; }
.coloring-stage { padding: clamp(10px, 1.6vw, 18px) !important; }
.coloring-canvas-wrap { position: relative; width: 100%; max-height: 78vh; margin: 0 auto; background: #fff; box-shadow: inset 0 0 0 1px #eadfce; touch-action: none; user-select: none; -webkit-user-select: none; }
.coloring-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.coloring-paint { cursor: crosshair; }
.coloring-book[data-tool="fill"] .coloring-paint, .coloring-book:not([data-tool]) .coloring-paint {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M5 13l8-8 9 9-8 8z' fill='%23fffaf1' stroke='%23382c27' stroke-width='2'/%3E%3Cpath d='M22 16c2 3 3 5 1 6s-3-2-1-6z' fill='%23c8643b'/%3E%3C/svg%3E") 22 22, crosshair;
}
.coloring-lines { pointer-events: none; }
.coloring-status { min-height: 1.3em; margin: 10px 2px 0 !important; font: 500 14px/1.35 var(--cy-sans, system-ui, sans-serif) !important; color: var(--cr-muted) !important; }
.coloring-tools { display: grid; gap: 16px; padding: 16px !important; position: sticky; top: 110px; }
.coloring-tool-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coloring-tool, .coloring-action {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 6px 10px; cursor: pointer; text-align: center;
  font: 600 14px/1.15 var(--cy-sans, system-ui, sans-serif); color: var(--cr-ink);
  background: #fffaf1; border: 1.5px solid #d9c8b0; border-radius: 3px;
  box-shadow: 0 2px 0 #d9c8b0;
}
.coloring-tool { flex-direction: column; }
.coloring-tool.is-active { background: #24171a; color: #fffaf1; border-color: #24171a; box-shadow: 0 2px 0 #000; }
.coloring-tool:focus-visible, .coloring-action:focus-visible, .coloring-swatch:focus-visible { outline: 3px solid #d9a441; outline-offset: 2px; }
.coloring-tool-ic { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-fill { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11l8-8 9 9-8 8z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M20 15c2 3 2.5 5 .5 5.5S18 18 20 15z'/%3E%3C/svg%3E"); }
.ic-brush { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20l2-6L16 4l4 4L10 18z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M4 20l2-6 4 4z'/%3E%3C/svg%3E"); }
.ic-eraser { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 15l9-9 7 7-6 6H8z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M3 15l5-5 7 7-2 2H8z'/%3E%3Cpath d='M13 20h8' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.coloring-size { display: grid; gap: 6px; font: 600 14px/1 var(--cy-sans, system-ui, sans-serif); }
.coloring-size input { width: 100%; accent-color: #c8643b; }
.coloring-book[data-tool="fill"] .coloring-size, .coloring-book:not([data-tool]) .coloring-size { opacity: .45; }
.coloring-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 8px; }
.coloring-swatch {
  all: unset; box-sizing: border-box; position: relative; aspect-ratio: 1; min-width: 34px; cursor: pointer;
  background: var(--swatch, #fff); border-radius: 50% 46% 52% 44%;
  box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / 18%), 0 2px 3px rgb(60 30 15 / 18%);
}
.coloring-swatch.is-active { box-shadow: 0 0 0 3px #fffaf1, 0 0 0 5px #24171a; }
/* D10b — every button wears the site's paper (paper-buttons layer), so the colour is a dab of paint on that paper. */
.coloring-swatch-paint {
  position: absolute; inset: 15%; pointer-events: none;
  background: var(--swatch, #fff); border-radius: 50% 44% 52% 46% / 46% 52% 44% 50%;
  box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / 22%), 0 1px 2px rgb(60 30 15 / 25%);
}
.coloring-swatch.is-active .coloring-swatch-paint { inset: 10%; }
.coloring-custom { background: conic-gradient(#c8643b, #f2d35b, #8fa98b, #5b7fa6, #a493c4, #e8a0a8, #c8643b); overflow: hidden; }
.coloring-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.coloring-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coloring-action[disabled] { opacity: .45; cursor: default; }
.coloring-action.is-primary { background: var(--cr-wine); color: #fffaf1; border-color: var(--cr-wine); box-shadow: 0 2px 0 #4f1d28; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 899px) {
  .coloring-book-body { grid-template-columns: minmax(0, 1fr); }
  .coloring-tools { position: static; }
  .coloring-canvas-wrap { max-height: none; }
}
@media (max-width: 520px) {
  .coloring-tools { padding: 12px !important; gap: 12px; }
  .coloring-palette { grid-template-columns: repeat(7, 1fr); gap: 7px; }
  .coloring-swatch { min-width: 0; }
  .coloring-actions { grid-template-columns: repeat(4, 1fr); }
  .coloring-action { padding: 6px 4px; font-size: 13px; }
}

/* Luz apagada: the drawing itself stays on white paper. */
body.dark .coloring-reward-text, body.dark .coloring-album-head p, body.dark .coloring-card-date { color: #cdbfb5 !important; }
body.dark .coloring-reward-title, body.dark .coloring-album-head h1, body.dark .coloring-card-title, body.dark .coloring-book-head h1,
body.dark .coloring-empty h2, body.dark .coloring-reward-steps li, body.dark .coloring-back, body.dark .coloring-reread, body.dark .coloring-reward-link { color: #f6ede4 !important; }
/* ===== FIM D10 ===== */
/* ===== D15 — LÁPIS DE COR =====
   Cada cor da paleta é a ponta de um lápis de cor (madeira apontada e grafite na cor); a cor escolhida sobe um pouco.
   A pintura em si (granulado do papel e hachura) é feita no coloring-book.js. */
.coloring-palette { gap: 6px; }
.coloring-swatch { border-radius: 6px 5px 7px 4px; }
.coloring-swatch-paint {
  inset: 6% 26% 4%; background: none !important; border-radius: 0; box-shadow: none;
  transform: rotate(-14deg); transform-origin: 50% 80%; transition: transform .15s ease;
  filter: drop-shadow(0 0 .7px rgb(36 23 26 / 85%)) drop-shadow(0 1.5px 1px rgb(60 30 15 / 28%));
}
.coloring-swatch-paint::before {
  content: ""; position: absolute; inset: 0;
  clip-path: polygon(50% 0, 61% 17%, 100% 50%, 100% 100%, 0 100%, 0 50%, 39% 17%);
  background:
    linear-gradient(90deg, transparent 0 22%, rgb(255 255 255 / 30%) 22% 40%, transparent 40% 68%, rgb(0 0 0 / 14%) 68% 100%),
    linear-gradient(180deg, var(--swatch, #fff) 0 17%, #f1d6b0 17% 50%, var(--swatch, #fff) 50% 100%);
}
.coloring-swatch-paint::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgb(60 30 15 / 22%);
}
.coloring-swatch.is-active .coloring-swatch-paint { inset: 6% 26% 4%; transform: rotate(-14deg) translateY(-12%) scale(1.08); }
@media (prefers-reduced-motion: reduce) { .coloring-swatch-paint { transition: none; } }
/* ===== FIM D15 ===== */

/* ===== D17 — ASSINATURA =====
   Desenho pintado leva o nome de quem pintou e a data, em tinta de caneta, no canto como assinatura de artista.
   A tinta é sempre escura porque o papel do desenho é sempre branco (também no modo escuro). */
.coloring-canvas-wrap, .coloring-card-sheet { container-type: inline-size; }
.coloring-signature, .coloring-card-signature {
  position: absolute; z-index: 3; margin: 0; display: flex; flex-direction: column; align-items: flex-end;
  font-family: "Cutyssey Tinta", "Segoe Print", "Bradley Hand", cursive; font-weight: 600; line-height: 1; text-align: right;
  color: #1b1715; pointer-events: none; transform: rotate(-4deg); transform-origin: 100% 100%;
  text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 0 7px rgb(255 255 255 / 85%);
}
.coloring-signature { right: 3%; bottom: 3%; max-width: 48%; }
.coloring-signature[hidden] { display: none; }
.coloring-signature-name, .coloring-card-signature > span:first-child {
  max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 .06em .16em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M3 6.5C26 3 52 8.5 97 3.5' fill='none' stroke='%231b1715' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 100% 100% / 100% .3em;
}
.coloring-signature-name { font-size: clamp(17px, 4.4cqw, 46px); }
.coloring-signature-date { font-size: clamp(12px, 2.9cqw, 30px); margin-top: .1em; }
.coloring-card-signature { right: 8%; bottom: 8%; max-width: 56%; }
.coloring-card-signature > span:first-child { font-size: clamp(11px, 5.4cqw, 22px); }
.coloring-card-signature > span:last-child { font-size: clamp(9px, 3.8cqw, 15px); margin-top: .1em; }
/* ===== FIM D17 ===== */
/* ===== D18 — ESTOJO DE 49 LÁPIS E CARTÃO QUE VIRA =====
   Paleta só com os lápis do Cutyssey (sem o seletor de cor do aparelho), 7 por fileira.
   No álbum, cada desenho é um cartão: o botão de virar mostra atrás a ficha do artigo (como ficha de biblioteca). */
.coloring-palette { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.coloring-swatch { aspect-ratio: 1 / 1.08; min-width: 0; }
.coloring-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }

.coloring-card { position: relative; perspective: 1600px; }
.coloring-flip-toggle { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.coloring-flip { position: relative; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.32,.72,.22,1); }
.coloring-flip-toggle:checked ~ .coloring-flip { transform: rotateY(180deg); }
.coloring-face { -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: visibility 0s linear .37s; }
.coloring-face-front { position: relative; }
.coloring-face-back { position: absolute; inset: 0; display: flex; transform: rotateY(180deg); visibility: hidden; container-type: size; }
.coloring-flip-toggle:checked ~ .coloring-flip .coloring-face-front { visibility: hidden; }
.coloring-flip-toggle:checked ~ .coloring-flip .coloring-face-back { visibility: visible; }
.coloring-card-link { display: block; }

.coloring-flip-btn {
  position: absolute; left: 10px; bottom: 10px; z-index: 4; display: grid; place-items: center; width: 40px; height: 40px;
  color: #24171a; cursor: pointer; border-radius: 50% 46% 52% 48%;
  background: #fffaf0 url(/images/papel/rasgo-creme.webp) center / cover; box-shadow: 0 0 0 1.5px #24171a, 0 4px 0 rgb(36 23 26 / 75%), 0 7px 12px rgb(60 30 15 / 22%);
  transition: transform .15s ease, box-shadow .15s ease;
}
.coloring-flip-btn:hover { transform: rotate(-12deg) translateY(-1px); }
.coloring-flip-btn:active { transform: translateY(3px); box-shadow: 0 0 0 1.5px #24171a, 0 1px 0 rgb(36 23 26 / 75%); }
.coloring-flip-toggle:focus-visible ~ .coloring-flip .coloring-flip-btn { outline: 3px solid #d9a441; outline-offset: 3px; }
.coloring-flip-btn.is-back { left: auto; right: 10px; top: 10px; bottom: auto; width: 34px; height: 34px; }

.coloring-index-card {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: .5em; overflow: hidden; min-width: 0;
  padding: 1em 1.1em .95em 2.2em; gap: .42em; color: #24171a; rotate: .8deg;
  font: 500 clamp(11px, 3.7cqw, 14.5px)/1.32 var(--cy-sans, system-ui, sans-serif);
  background:
    linear-gradient(90deg, transparent 0 1.45em, rgb(196 64 64 / 45%) 1.45em calc(1.45em + 1.5px), transparent calc(1.45em + 1.5px)),
    repeating-linear-gradient(180deg, transparent 0 calc(1.6em - 1px), rgb(91 127 166 / 24%) calc(1.6em - 1px) 1.6em),
    #fffaf0;
  background-position: 0 0, 0 2.9em, 0 0;
  border: 1px solid #e3d5c1; border-top: 7px solid var(--niche, #7a2d3d);
  box-shadow: 0 10px 18px rgb(60 30 15 / 16%);
}
.coloring-index-head, .coloring-index-title, .coloring-index-facts, .coloring-index-actions { flex-shrink: 0; }
.coloring-index-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35em .5em; padding-right: 2.4em; }
.coloring-index-no { font: 800 1em/1 var(--cy-serif, Georgia, serif); color: var(--niche, #7a2d3d); letter-spacing: .02em; }
.coloring-index-niche { padding: .22em .55em; font-weight: 700; font-size: .82em; line-height: 1; color: #fffaf1; background: var(--niche, #7a2d3d); border-radius: 2px; }
.coloring-index-head .coloring-card-status { padding: .28em .6em; font-size: .72em; }
.coloring-index-title { margin: .1em 0 0 !important; font: 800 clamp(14px, 5.4cqw, 21px)/1.12 var(--cy-serif, Georgia, serif) !important; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.coloring-index-title a { color: inherit; text-decoration: underline; text-decoration-color: var(--niche, #7a2d3d); text-decoration-thickness: 2px; text-underline-offset: .14em; }
.coloring-index-excerpt { margin: 0; min-height: 0; color: #4a3b35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coloring-index-facts { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .84em; color: #6b5a52; }
.coloring-index-facts > span + span::before { content: " · "; }
.coloring-index-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5em; }
.coloring-index-actions a {
  display: inline-flex; align-items: center; min-height: 2.3em; padding: .35em .85em; font-weight: 700; text-decoration: none; color: #24171a;
  background: #fffaf0; box-shadow: 0 0 0 1.5px #24171a, 0 3px 0 rgb(36 23 26 / 70%); border-radius: 3px 5px 3px 6px;
}
.coloring-index-actions a.coloring-index-read { color: #fffaf1; background: var(--niche, #7a2d3d); }
.coloring-index-actions a:active { transform: translateY(2px); box-shadow: 0 0 0 1.5px #24171a, 0 1px 0 rgb(36 23 26 / 70%); }
@container (min-height: 300px) { .coloring-index-excerpt { -webkit-line-clamp: 3; } }
@container (max-height: 225px) { .coloring-index-excerpt { display: none; } }
@container (max-height: 190px) { .coloring-index-title { -webkit-line-clamp: 2; } }
@media (prefers-reduced-motion: reduce) { .coloring-flip, .coloring-face { transition: none; } }
/* ===== FIM D18 ===== */

/* ===== D19 — FITA COM NOME E DATA (álbum) =====
   No álbum, o nome de quem pintou e a data saem de dentro do desenho (ficavam difíceis de ler sobre a pintura)
   e vão escritos à caneta numa fita de papel colada no alto do cartão, no lugar da fitinha lisa.
   A fita é sempre clara e a tinta sempre escura (também no modo escuro). Desenho ainda sem pintura fica com a fitinha lisa. */
.coloring-card-sheet:has(> .coloring-card-tape)::before { content: none; }
.coloring-card-tape {
  position: absolute; left: 50%; top: 0; z-index: 3; translate: -50% -58%; rotate: -2.5deg;
  display: flex; align-items: baseline; justify-content: center; gap: .55em;
  box-sizing: border-box; min-width: 38%; max-width: 86%; padding: .38em 1.2em .44em;
  font-family: "Cutyssey Tinta", "Segoe Print", "Bradley Hand", cursive; font-weight: 600; line-height: 1.05;
  color: #1b1715; white-space: nowrap; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0%) 0 10px, rgb(255 255 255 / 18%) 10px 12px),
    linear-gradient(95deg, #e8d098, #f5e4b6 50%, #e3c98f);
  clip-path: polygon(0 9%, 3% 0, 6% 7%, 94% 2%, 97% 0, 100% 11%, 98% 35%, 100% 60%, 97% 83%, 100% 100%, 3% 96%, 0 88%, 2% 62%, 0 37%);
}
.coloring-card:nth-child(even) .coloring-card-tape { rotate: 2deg; }
.coloring-card-tape-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(15px, 6.2cqw, 24px); }
.coloring-card-tape-date { flex: none; font-size: clamp(12px, 4.4cqw, 17px); }
/* ===== FIM D19 ===== */
