/* Space-rock cards (kids/cards/, site/js/kids-cards.js): the private card album and the "You collected a card" note. */
.kc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 18px 0 14px; }
.kc-count { margin: 0; font-size: 1.15rem; font-weight: 600; }
.kc-view { margin: 0; }
.kc-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.kc-card { min-width: 0; }
.kc-face { height: 100%; box-sizing: border-box; padding: 10px 12px 14px; border-radius: 18px; border: 2px dashed var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 4px; }
.kc-pic { position: relative; display: block; margin: 0 0 6px; }
.kc-pic .k-art { border-radius: 12px; background: #3b3d78; filter: grayscale(1) brightness(.75); opacity: .55; }
.kc-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 700; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.kc-state { align-self: flex-start; font-size: .82rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--raised); color: var(--mist); }
.kc-face h3 { margin: 4px 0 0; font-size: 1.2rem; }
.kc-young { margin: 0; line-height: 1.5; }
.kc-how { margin: 6px 0 0; line-height: 1.5; }
.kc-how a { font-weight: 600; }
.kc-older { display: none; margin: 0; line-height: 1.5; }
.kc-group { font-size: .9rem; color: var(--mist); text-transform: uppercase; letter-spacing: .04em; }
.kc-fact strong { color: var(--rock); }

/* A collected card: full colour, solid frame. Facts show for older children ("Pictures and facts"). */
.kc-card.is-earned .kc-face { border-style: solid; border-color: var(--rock); background: #fff; box-shadow: 0 6px 18px rgba(234, 88, 12, .12); }
.kc-card.is-earned .kc-pic .k-art { filter: none; opacity: 1; }
.kc-card.is-earned .kc-lock { display: none; }
.kc-card.is-earned .kc-state { background: #fff1e6; color: #9a3412; }
.kc-card.is-earned .kc-how { display: none; }
.kc-album[data-view="facts"] .kc-card .kc-group { display: block; }
.kc-album[data-view="facts"] .kc-card.is-earned .kc-older { display: block; }
/* Big pictures: two cards a row on a phone, pictures and names first; the facts view gives each card more room. */
.kc-album[data-view="pictures"] .kc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.kc-album[data-view="pictures"] .kc-young { font-size: .95rem; }

/* The note shown on a story or sheet when a card is collected. */
.kc-toast { position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 44px 12px 16px; border-radius: 16px; border: 2px solid var(--rock); background: #fff; color: var(--paper); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: 1.05rem; animation: kc-in .35s ease-out; }
.kc-toast a { font-weight: 600; }
.kc-toast-star { color: var(--rock); font-size: 1.4rem; }
.kc-toast-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--paper); }
@keyframes kc-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .kc-toast { animation: none; } }
@media print { .kc-toast { display: none !important; } }
