/* Kids' zone "Build your own meteorite" (kids/make/, scripts/content/kids-make.mjs, site/js/kids-make.js).
   The board is the existing outline drawing coloured in with the story-page colours (kids.css .k-colour):
   the coat (k-dent), the inside (k-rock2), metal specks (k-metal) and round grains (k-sun) follow the board's data-* choices. */
.k-make .mk-age { margin: 4px 0 16px; }
.k-make .mk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 861px) { .k-make .mk-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; } }

.mk-board { margin: 0; }
.mk-board .mk-svg { border-radius: 18px; border: 1px solid var(--line); background: #fffaf3; aspect-ratio: 4 / 3; }
.mk-now { margin-top: 10px; font-weight: 600; font-size: 1.1rem; }
.mk-svg text.k-label, .mk-svg path.k-line { display: none; } /* the drawing's own labels describe a finished picture */
.mk-svg path, .mk-svg circle { transition: fill .35s ease, opacity .35s ease; }
/* Nothing picked yet: a white outline, like a colouring sheet. */
.mk-board[data-type=""] .mk-svg .k-dent, .mk-board[data-type=""] .mk-svg .k-rock2 { fill: #fff; }
.mk-board[data-type="iron"] .mk-svg .k-rock2 { fill: #b8bec7; }
/* No coat: the outside is the same colour as the inside. */
.mk-board[data-type="stone"][data-crust="0"] .mk-svg .k-dent { fill: #a59b8f; }
.mk-board[data-type="iron"][data-crust="0"] .mk-svg .k-dent { fill: #b8bec7; }
.mk-board[data-crust="1"] .mk-svg .k-dent { fill: #2a2522; }
.mk-svg circle.k-metal, .mk-svg circle.k-sun { opacity: 0; }
.mk-board[data-flakes="1"] .mk-svg circle.k-metal { opacity: 1; fill: #f4f6fa; }
.mk-board[data-chondrules="1"] .mk-svg circle.k-sun { opacity: 1; fill: #e9a96b; }
.mk-board.mk-pop .mk-svg { animation: mk-pop .32s ease-out; }
@keyframes mk-pop { 0% { transform: scale(1); } 45% { transform: scale(1.03); } 100% { transform: scale(1); } }

.mk-step { border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 14px; margin: 0 0 12px; background: var(--panel); }
.mk-step legend { font-weight: 600; font-size: 1.12rem; padding: 0 6px; }
.mk-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #c2410c; color: #fff; font-size: .95rem; margin-right: 4px; }
.mk-hint { margin: 2px 0 8px; }
.mk-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.mk-btn { min-height: 56px; min-width: 120px; padding: 10px 20px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: #1f1b16; font: inherit; font-size: 1.15rem; font-weight: 600; cursor: pointer; }
.mk-btn:hover { border-color: #c2410c; }
.mk-btn:focus-visible { outline: 3px solid #c2410c; outline-offset: 2px; }
.mk-btn[aria-pressed="true"] { background: #c2410c; border-color: #c2410c; color: #fff; }
.mk-btn[aria-pressed="true"]::before { content: "✓ "; }
.mk-btn:disabled { opacity: .45; cursor: not-allowed; }
.mk-note { margin: 10px 0 0; font-size: .98rem; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.mk-status { min-height: 1.4em; margin: 8px 0 0; }

/* Older explorers also see the type name and a second fact for each part. */
.k-make:not([data-age="older"]) .mk-older { display: none; }
.mk-type { margin: 22px 0 6px; }
.mk-type-card h2 { margin: 2px 0 6px; }
.mk-parts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.mk-part { margin: 0; }
.mk-part h3 { margin: 10px 0 4px; font-size: 1.12rem; }
.mk-part p { margin: 6px 0 0; line-height: 1.55; font-size: 1.04rem; }
.mk-part .mk-from, .mk-type .mk-from { font-size: .9rem; }
.mk-pic-wrap { display: block; margin: -6px -6px 0; }
.mk-pic-wrap .k-art { border-radius: 14px; border: 1px solid var(--line); background: #3b3d78; }
[data-make] [hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .mk-svg path, .mk-svg circle { transition: none; }
  .mk-board.mk-pop .mk-svg { animation: none; }
}
