/* Dandy's Haven — design system, matched to Desenhos para Colorir: warm paper, ink outlines, coral primary, sun yellow, Baloo 2 + Nunito. */
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('/fonts/baloo-2-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('/fonts/baloo-2-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800 900; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
/* Size-matched fallbacks so text does not jump when the web fonts arrive. */
@font-face { font-family: 'Nunito Fallback'; src: local('Arial'), local('Helvetica'), local('Liberation Sans'); size-adjust: 101%; ascent-override: 99%; descent-override: 35%; }
@font-face { font-family: 'Baloo Fallback'; src: local('Arial Black'), local('Arial'), local('Liberation Sans'); size-adjust: 92%; ascent-override: 110%; descent-override: 50%; }

:root {
  --ink: #241F33; --mut: #625B70; --line: #EADFCB; --paper: #FFF8EE; --paper2: #FBF0DF; --card: #FFFFFF;
  --pri: #FF5D3B; --pri-d: #EC4626; --sun: #FFC83D; --coral: #FF5D3B; --teal: #13A89E; --lil: #8E6CF0; --pink: #FF7EB6; --blue: #3A86FF;
  --mint: #DDF4F1; --mint-ink: #0B7F77; --lilac: #EEE8FD; --peach: #FFE6DE; --peach-ink: #C2381B; --sky: #E3EEFF; --sky-ink: #1F5FD6; --butter: #FFF2C9;
  --display: 'Baloo 2', 'Baloo Fallback', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: Nunito, 'Nunito Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 16px; --r-s: 10px; --r-l: 24px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-hi: 6px 6px 0 var(--ink);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--pri); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, .hd { font-family: var(--display); font-weight: 800; letter-spacing: 0; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.03; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.mut { color: var(--mut); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pri); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.prose { max-width: 70ch; font-size: 17px; line-height: 1.75; color: #332D45; }
.prose h2 { font-size: 28px; margin: 36px 0 12px; }
.prose h3 { font-size: 21px; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--peach-ink); font-weight: 700; text-decoration: underline; }
.prose img { border-radius: var(--r-s); margin: 16px 0; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: #fff; border-bottom: 3px solid var(--ink); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: #fff; }
.site-head .wrap { display: flex; align-items: center; gap: 22px; min-height: 68px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--pri); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); display: grid; place-items: center; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1; display: block; }
.brand-tag { font-size: 10.5px; font-weight: 700; color: var(--mut); letter-spacing: .05em; text-transform: uppercase; display: block; margin-top: 3px; }
.nav { display: flex; gap: 20px; font-weight: 700; font-size: 15px; flex: 1 1 auto; white-space: nowrap; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-color: var(--sun); color: var(--ink); }
.head-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.head-actions .menu-btn { display: none; }
@media (max-width: 1140px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; gap: 0; padding: 8px 20px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .head-actions .menu-btn { display: inline-flex; }
  .head-actions .btn-sun { display: none; }
}
@media (max-width: 420px) { .brand-tag { display: none; } .brand-name { font-size: 20px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: var(--r-s); font: 800 16px/1 var(--body); text-decoration: none; cursor: pointer; border: 2px solid var(--ink); background: #fff; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap; }
.btn:hover { color: var(--ink); background: var(--lilac); }
.btn svg { flex: 0 0 auto; }
.btn-pri { background: var(--pri); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.btn-pri:hover { background: var(--pri-d); color: #fff; transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-sun { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); }
.btn-sun:hover { background: var(--sun); transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; border: 1.5px solid rgba(36,31,51,.14); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.link { font-weight: 800; color: var(--pri); text-decoration: none; }
.link:hover { color: var(--pri-d); text-decoration: underline; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(36,31,51,.16); background: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 10px; background: var(--lilac); color: var(--pri-d); line-height: 1.3; }
.tag-free { background: var(--mint); color: var(--mint-ink); }
.tag-pro { background: var(--sun); color: var(--ink); }
.tag-hot { background: var(--peach); color: var(--peach-ink); }
.tag-plain { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* Cards */
.card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); }
a.card { text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; display: block; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); color: var(--ink); }
.sheet { background: #fff; border: 2px solid var(--ink); border-radius: var(--r-s); }
.grid { display: grid; gap: 20px; }
.g-pages { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.g-sheets { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.g-grades { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.g-tools { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }

.page-card { padding: 10px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.page-card .thumb { aspect-ratio: 3 / 4; border: 1.5px solid var(--ink); border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.page-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.page-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 6px 6px; font-weight: 800; font-size: 15px; line-height: 1.3; }
.page-card .tag { position: absolute; left: 18px; top: 18px; }

.ws-card { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ws-card .thumb { aspect-ratio: 4 / 3; border-radius: 14px; padding: 14px; display: flex; }
.ws-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 8px; border: 1.5px solid var(--ink); background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.ws-card .t { font-weight: 800; font-size: 17px; line-height: 1.3; padding: 0 4px; }
.ws-card .s { font-size: 13px; font-weight: 600; color: var(--mut); padding: 0 4px; }
.ws-card .tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 4px 4px; }

.t-lilac { background: var(--lilac); } .t-mint { background: var(--mint); } .t-peach { background: var(--peach); } .t-sky { background: var(--sky); } .t-butter { background: var(--butter); }

/* Sections */
.sec { display: flex; flex-direction: column; gap: 20px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sec-head > div { display: flex; flex-direction: column; gap: 6px; }
main.wrap { display: flex; flex-direction: column; gap: 68px; padding-block: 8px 80px; }
.crumbs { font-size: 14px; font-weight: 600; color: var(--mut); display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; }
.crumbs a { color: var(--mut); text-decoration: none; }
.crumbs a:hover { color: var(--pri); }

/* Hero */
.hero { padding-block: 56px 48px; display: flex; flex-wrap: wrap; gap: 52px; align-items: center; }
.hero-text { flex: 1 1 520px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero-text p.lead { font-size: 19px; color: var(--mut); max-width: 560px; }
.hl { color: var(--pri); background: linear-gradient(transparent 66%, var(--sun) 66%, var(--sun) 92%, transparent 92%); }
.search { display: flex; align-items: center; gap: 8px; max-width: 600px; padding: 8px 8px 8px 18px; background: #fff; border: 2px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); }
.search input { flex: 1 1 auto; min-width: 0; height: 48px; font: 500 17px var(--body); border: 0; outline: none; background: transparent; color: var(--ink); }
.search .btn { min-height: 48px; box-shadow: none; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.stats b { font-family: var(--display); font-weight: 600; font-size: 28px; display: block; line-height: 1.1; }
.stats span { font-size: 13px; color: var(--mut); font-weight: 600; }
.hero-art { flex: 0 1 440px; position: relative; height: 400px; min-width: 280px; max-width: 100%; }
.hero-art .blob { position: absolute; inset: 6% 4% 4% 6%; border-radius: 40px; background: var(--lilac); }
.hero-art .s1 { position: absolute; left: 6%; top: 8%; width: 54%; height: 74%; transform: rotate(-6deg); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; display: grid; place-items: center; }
.hero-art .s2 { position: absolute; right: 2%; top: 24%; width: 48%; height: 66%; transform: rotate(5deg); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.hero-art .s1 img, .hero-art .s2 img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.crayon { position: absolute; height: 22px; border: 2px solid var(--ink); border-radius: 6px 12px 12px 6px; }
.badge-free { position: absolute; right: 0; bottom: 2%; width: 74px; height: 74px; border: 2px solid var(--ink); border-radius: 50%; background: var(--sun); box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; font: 700 16px var(--display); transform: rotate(-10deg); }
@media (max-width: 640px) { .hero { padding-block: 32px 24px; gap: 28px; } .hero-art { height: 300px; } }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.door { padding: 28px; display: flex; gap: 22px; align-items: center; border-color: transparent !important; }
.door .mini { flex: 0 0 auto; width: 96px; height: 120px; display: grid; place-items: center; box-shadow: 4px 4px 0 var(--ink); }
.door .mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
@media (max-width: 420px) { .door { padding: 20px; gap: 16px; } .door .mini { width: 72px; height: 92px; } }

.seg { display: inline-flex; padding: 4px; background: #fff; border: 1.5px solid rgba(36,31,51,.14); border-radius: 14px; gap: 4px; }
.seg button, .seg a { border: 0; min-height: 40px; padding: 0 16px; border-radius: 10px; font: 800 14px var(--body); cursor: pointer; background: transparent; color: var(--mut); text-decoration: none; display: inline-flex; align-items: center; }
.seg [aria-pressed="true"], .seg .on { background: var(--ink); color: #fff; }
.grade-card { padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.grade-card .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 700 17px var(--display); }
.grade-card .n { font: 600 20px var(--display); line-height: 1.1; }
.grade-card .a { font-size: 13px; font-weight: 600; color: var(--mut); }

.tool-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tool-card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 700 20px var(--display); }
.tool-card p { font-size: 14px; color: var(--mut); line-height: 1.45; }

.ad { min-height: 100px; border: 1.5px dashed #D6CCB8; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--mut); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; overflow: hidden; }
.ad ins { display: block; width: 100%; }
.ad-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8C88A0; text-align: center; margin-bottom: 4px; }

.premium-band { background: var(--ink); color: #fff; border-radius: 32px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 36px; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.premium-band h2 { color: #fff; font-size: clamp(30px, 4vw, 42px); }
.premium-band p { color: #D9D5EA; font-size: 17px; max-width: 520px; }
.premium-band ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; font-weight: 600; }
.premium-band li::before { content: "✓"; color: var(--sun); font-weight: 800; margin-right: 8px; }
.premium-band .ring { position: absolute; border-radius: 50%; border: 2px solid rgba(255,201,64,.3); pointer-events: none; }
.price-card { background: #fff; color: var(--ink); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: min(280px, 100%); box-shadow: 6px 6px 0 var(--sun); position: relative; }
.price-card .big { font: 600 48px/1 var(--display); }
.price-card .big small { font: 600 18px var(--body); color: var(--mut); }

.pack-card { padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.pack-card .cover { aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.pack-card .cover img { width: 62%; height: 86%; object-fit: cover; object-position: top; border: 2px solid var(--ink); border-bottom: 0; border-radius: 10px 10px 0 0; background: #fff; box-shadow: 4px 0 0 var(--ink); }
.pack-card .cover .tag { position: absolute; left: 10px; top: 10px; }

.post-card { overflow: hidden; display: flex !important; flex-direction: column; }
.post-card .cv { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.post-card .cv img { width: 100%; height: 100%; object-fit: cover; }
.post-card .bd { padding: 18px; display: flex; flex-direction: column; gap: 8px; }

details.faq { padding: 18px 20px; border-radius: var(--r); background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
details.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; font: 700 20px/1 var(--display); color: var(--pri); }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin-top: 10px; color: var(--mut); }

/* Detail pages */
.detail { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 18px; }
.detail .preview { flex: 1 1 440px; min-width: 0; display: flex; justify-content: center; }
.detail .preview .sheet { width: 100%; max-width: 520px; padding: 18px; box-shadow: 8px 8px 0 var(--ink); border-radius: 12px; }
.detail .preview img { width: 100%; height: auto; }
.detail .info { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.actions { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.actions .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .actions .two { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts > div { padding: 14px; border-radius: 16px; background: #fff; border: 1.5px solid rgba(36,31,51,.1); }
.facts b { display: block; font-size: 13px; }
.facts span { font-size: 14px; color: var(--mut); font-weight: 600; }
.upsell { padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; background: var(--lilac); border-color: transparent !important; }

/* Forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
input.in, textarea.in, select.in { width: 100%; min-height: 50px; padding: 10px 14px; font: 500 16px var(--body); color: var(--ink); border: 2px solid rgba(36,31,51,.22); border-radius: 14px; background: #fff; }
textarea.in { min-height: 130px; resize: vertical; }
input.in:focus, textarea.in:focus, select.in:focus { border-color: var(--pri); outline: none; box-shadow: 0 0 0 4px rgba(255,93,59,.18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: 0 0 auto; }
.notice { padding: 14px 16px; border-radius: 14px; font-weight: 600; font-size: 15px; }
.notice.ok { background: var(--mint); color: var(--mint-ink); }
.notice.err { background: var(--peach); color: var(--peach-ink); }
.notice.info { background: var(--sky); color: var(--sky-ink); }
.narrow { max-width: 520px; margin: 0 auto; width: 100%; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 800; }
.steps li { border: 2px solid #D8CDB8; border-radius: 999px; padding: 4px 12px; color: var(--mut); }
.steps li.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.scroll-x { overflow-x: auto; }

/* Footer */
.news-band { background: var(--sun); border-top: 3px solid var(--ink); }
.news-band .wrap { padding-block: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; }
.news-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 10px; }
.news-form .check, .news-form .news-msg { grid-column: 1 / -1; }
.news-msg { color: var(--ink); font-weight: 700; min-height: 1em; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 760px) { .news-band .wrap { grid-template-columns: 1fr; } .news-form { grid-template-columns: 1fr; } }
.site-foot { background: var(--ink); color: #fff; }
.site-foot .mut { color: rgba(255,255,255,.72); }
.site-foot .wrap { padding-block: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; font-size: 14px; }
.site-foot .col { display: flex; flex-direction: column; gap: 10px; }
.site-foot a { text-decoration: none; color: #fff; opacity: .85; }
.site-foot a:hover { color: var(--sun); opacity: 1; }
.site-foot .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.16); padding-top: 18px; color: rgba(255,255,255,.72); font-size: 13px; }
.site-foot .legal a { text-decoration: underline; }

/* Install prompt */
.install { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 520px; margin: 0 auto; padding: 18px; display: flex; gap: 14px; align-items: center; }
[hidden] { display: none !important; }

@media print {
  .site-head, .site-foot, .news-band, .ad, .no-print, .install { display: none !important; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Color online */
.paint { display: flex; flex-direction: column; gap: 14px; }
.paint-tools { padding: 14px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); z-index: 5; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(36,31,51,.25); cursor: pointer; padding: 0; }
.swatch[aria-checked="true"] { border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--sun); }
.paint-stage { padding: 8px; display: grid; place-items: center; position: relative; min-height: 300px; }
.paint-stage canvas { max-width: 100%; height: auto; max-height: 78vh; touch-action: none; cursor: crosshair; display: block; }
.paint-loading { position: absolute; }

/* Printable sheets made in the browser (maker + tracing) */
.ws-page { font-family: var(--body); color: #241F33; display: flex; flex-direction: column; gap: 18px; }
.ws-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #5B5772; gap: 12px; flex-wrap: wrap; }
.ws-title { font-size: 26px; }
.ws-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px 28px; counter-reset: q; }
.ws-grid li { counter-increment: q; display: flex; align-items: baseline; gap: 8px; font: 600 22px var(--display); border-bottom: 2px solid #ECE6DA; padding-bottom: 8px; }
.ws-grid li::before { content: counter(q) "."; font: 700 13px var(--body); color: #8C88A0; min-width: 22px; }
.ws-grid li b { color: var(--pri); min-width: 48px; }
.trace-rows { display: flex; flex-direction: column; gap: 10px; }
.ws-foot { font-size: 11px; color: #8C88A0; margin-top: auto; }
.ws-break { break-before: page; page-break-before: always; height: 0; }
@media print {
  body.printing-sheet * { visibility: hidden; }
  body.printing-sheet .printable, body.printing-sheet .printable * { visibility: visible; }
  body.printing-sheet .printable { position: absolute; left: 0; top: 0; width: 100%; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  body.printing-sheet .ws-grid li b:empty { min-width: 0; }
}

/* Games */
.game { gap: 18px; }
.game-board { display: grid; gap: 10px; }
.mem-card { aspect-ratio: 3 / 4; border-radius: 14px; border: 2px solid var(--ink); background: var(--pri); cursor: pointer; padding: 6px; position: relative; overflow: hidden; }
.mem-card::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 34px var(--display); color: #fff; }
.mem-card img { width: 100%; height: 100%; object-fit: contain; opacity: 0; background: #fff; border-radius: 8px; }
.mem-card.open { background: #fff; }
.mem-card.open::after { content: none; }
.mem-card.open img { opacity: 1; }
.mem-card.done { border-color: var(--mint-ink); box-shadow: 0 0 0 3px var(--mint); }
.game-board.maze { display: flex; justify-content: center; }
.game-board.maze canvas { max-width: 100%; border-radius: 12px; touch-action: none; }
.game-board.slide { max-width: 480px; gap: 4px; }
.tile { aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 8px; background-color: #fff; cursor: pointer; padding: 0; }
.tile.blank { background: var(--lilac); border-style: dashed; cursor: default; }
/* phones: two cards per row so lists stay short */
@media (max-width: 560px) {
  .g-pages, .g-grades, .g-tools, .g-sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .site-foot .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .site-foot .wrap > .col:first-child { grid-column: 1 / -1; }
}
