/* Coloring Pages */

.cp { max-width: 64rem; margin: 0 auto; }

.cp-picker { display: flex; gap: .6rem; overflow-x: auto; padding: .25rem .25rem .75rem; margin-bottom: .5rem; }
.cp-thumb {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 8.5rem; padding: .5rem;
    font: inherit; font-size: .85rem; font-weight: 700; color: var(--ink);
    background: var(--surface); border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.cp-thumb img { width: 100%; height: auto; display: block; }
.cp-thumb[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

.cp-workspace { display: grid; gap: 1rem; }
@media (min-width: 860px) { .cp-workspace { grid-template-columns: 1fr 17rem; align-items: start; } }

.cp-stage {
    background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem;
}
.cp-title { font-weight: 800; font-size: 1.2rem; margin: 0 0 .5rem; text-align: center; }
.cp-ref { text-align: center; margin: .5rem 0 0; font-size: .9rem; }
.cp-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.cp-svg .r { cursor: pointer; transition: fill .15s ease; }
.cp-svg .r:hover { stroke-width: 4; }

.cp-tools {
    background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem;
}
@media (min-width: 860px) { .cp-tools { position: sticky; top: 5rem; } }
.cp-tools__label { font-weight: 800; margin-bottom: .6rem; }
.cp-palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-bottom: 1rem; }
.cp-swatch {
    aspect-ratio: 1; min-height: 44px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .15); cursor: pointer;
}
.cp-swatch--eraser { background-image: linear-gradient(135deg, transparent 45%, #ef4444 45%, #ef4444 55%, transparent 55%) !important; background-color: #fff; }
.cp-swatch[aria-pressed="true"] { outline: 4px solid var(--ink); outline-offset: 2px; }
.cp-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cp-actions .btn { flex: 1 1 auto; }

.cp-print { display: none; }

@media print {
    .cp-picker, .cp-tools, .cp-ref { display: none !important; }
    .cp-stage { border: 0; box-shadow: none; padding: 0; }
    body.cp-printing .site-header, body.cp-printing .site-footer,
    body.cp-printing .page-head, body.cp-printing .cp-screen { display: none !important; }
    body.cp-printing .section { padding: 0; }
    body.cp-printing .cp-print { display: block; text-align: center; }
    .cp-print svg { width: 100%; max-height: 220mm; height: auto; }
    .cp-print__title { font-size: 16pt; font-weight: 800; margin: 0 0 4mm; }
    .cp-print__disclaimer { font-size: 7pt; color: #444; margin-top: 4mm; }
}
