/* בונה-מיינקראפט — פורטל-הילד: עיצוב שובב, "בלוקים", RTL, כפתורים גדולים.
   נטען אחרי style.css. תואם-CSP: בלי CDN, בלי inline-script, בלי פונטים מרוחקים.
   מצב כהה דרך prefers-color-scheme (לדפי-הילד אין theme.js). כל האנימציות ב-CSS. */

/* ============================================================
   1) פלטת-צבעים שובבה (מקומית לדפי-הילד)
   ============================================================ */
.mc-body {
  --mc-grass: #6dc74f;
  --mc-grass-2: #4ea832;
  --mc-grass-3: #3a8a26;
  --mc-dirt: #a9713f;
  --mc-sky-1: #dff5e6;
  --mc-sky-2: #cfeafe;
  --mc-sky-3: #ede1ff;
  --mc-sun: #ffd23f;
  --mc-purple: #7c5cf0;
  --mc-purple-2: #6947d8;
  --mc-pink: #ff7bc7;
  --mc-blue: #38b6ff;
  --mc-orange: #ff9f43;
  --mc-red: #e8483c;

  --mc-card: #ffffff;
  --mc-card-2: #f4f7fd;
  --mc-card-3: #eaeef6;
  --mc-ink: #26263f;
  --mc-muted: #6a6f8c;
  --mc-border: #e6e4f4;
  --mc-border-strong: #d6d3ea;

  --mc-btn-shadow: 0 6px 0;
  --mc-radius: 22px;
}

@media (prefers-color-scheme: dark) {
  .mc-body {
    --mc-grass: #5cb642;
    --mc-grass-2: #3f9a2b;
    --mc-grass-3: #2f7a20;
    --mc-sky-1: #16241b;
    --mc-sky-2: #14202e;
    --mc-sky-3: #1e1830;
    --mc-card: #20223a;
    --mc-card-2: #262a45;
    --mc-card-3: #2e3252;
    --mc-ink: #eceaf7;
    --mc-muted: #a6abc9;
    --mc-border: #34385c;
    --mc-border-strong: #3f4471;
  }
}

/* ============================================================
   2) רקע-"עולם" עם בלוקים דקורטיביים
   ============================================================ */
.mc-body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 16px 60px;
  color: var(--mc-ink);
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, .5), transparent 60%),
    linear-gradient(160deg, var(--mc-sky-1), var(--mc-sky-2) 55%, var(--mc-sky-3));
}
/* שכבת-בלוקים עדינה ברקע (דמוי-פיקסלים) */
.mc-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .10) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .10) 2px, transparent 2px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
@media (prefers-color-scheme: dark) {
  .mc-body::before {
    background-image:
      linear-gradient(rgba(255, 255, 255, .05) 2px, transparent 2px),
      linear-gradient(90deg, rgba(255, 255, 255, .05) 2px, transparent 2px);
  }
}
/* שמש/עננים דקורטיביים */
.mc-body::after {
  content: "";
  position: fixed;
  top: 40px;
  inset-inline-start: 46px;
  width: 74px;
  height: 74px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffe36e, var(--mc-sun));
  box-shadow: 0 0 0 10px rgba(255, 210, 63, .18), 0 0 60px 12px rgba(255, 210, 63, .35);
  z-index: 0;
  animation: mc-sun-pulse 5s ease-in-out infinite;
  pointer-events: none;
}
@media (max-width: 560px) { .mc-body::after { display: none; } }

.mc-wrap { width: 100%; max-width: 720px; position: relative; z-index: 1; }

/* ============================================================
   3) כרטיסים — "בלוקים" עגולים ומוגבהים
   ============================================================ */
.mc-card {
  background: var(--mc-card);
  border-radius: var(--mc-radius);
  padding: 30px 26px;
  margin-bottom: 22px;
  text-align: center;
  border: 3px solid var(--mc-border);
  box-shadow:
    0 3px 0 var(--mc-border-strong),
    0 16px 40px rgba(40, 30, 90, .14);
  position: relative;
  animation: mc-pop-in .5s cubic-bezier(.2, .9, .3, 1.3) both;
}
/* פס-דשא עליון קטן על הכרטיס — נגיעת מיינקראפט */
.mc-card::before {
  content: "";
  position: absolute;
  top: -3px;
  inset-inline: 22px;
  height: 8px;
  border-radius: 0 0 8px 8px;
  background: repeating-linear-gradient(90deg,
    var(--mc-grass) 0 14px, var(--mc-grass-2) 14px 28px);
  opacity: .9;
}

.mc-card h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 6px 0 8px;
  font-weight: 900;
  letter-spacing: .5px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .10), 0 3px 0 var(--mc-border-strong);
}
.mc-card h2 {
  font-size: 1.45rem;
  margin: 0 0 16px;
  font-weight: 800;
}
.mc-sub {
  color: var(--mc-muted);
  margin: 0 auto 20px;
  font-size: 1.12rem;
  max-width: 34ch;
  line-height: 1.5;
}
.mc-logo { font-size: 3rem; line-height: 1; }

/* ============================================================
   4) הדמות (מסקוט) — בנויה מ-CSS, "בּאדי-בלוק" ידידותי
   ============================================================ */
.mc-buddy {
  --sz: 108px;
  display: block; /* חובה: כשהמסקוט עטוף ב-<span> (child.html) — inline מתעלם מ-width/height וקורס */
  width: var(--sz);
  height: var(--sz);
  margin: 0 auto 6px;
  position: relative;
  border-radius: calc(var(--sz) * .17);
  background:
    linear-gradient(var(--mc-grass) 0 28%, var(--mc-grass-2) 28% 40%, var(--mc-grass-3) 40% 100%);
  box-shadow:
    inset 0 calc(var(--sz) * -.11) 0 rgba(0, 0, 0, .14),
    inset 0 6px 0 rgba(255, 255, 255, .30),
    0 8px 0 var(--mc-grass-3),
    0 18px 26px rgba(30, 60, 20, .28);
  animation: mc-float 3.4s ease-in-out infinite;
}
/* עיניים ("creeper"-vibe): ריבועים כהים */
.mc-buddy-eye {
  position: absolute;
  top: 34%;
  width: 21%;
  height: 21%;
  background: #1c2530;
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), inset 0 3px 0 rgba(255, 255, 255, .08);
}
.mc-buddy-eye::after {
  content: "";
  position: absolute;
  top: 14%;
  inset-inline-end: 16%;
  width: 34%;
  height: 34%;
  background: rgba(255, 255, 255, .85);
  border-radius: 3px;
}
.mc-buddy-eye--l { inset-inline-start: 20%; }
.mc-buddy-eye--r { inset-inline-end: 20%; }
/* פה creeper ידידותי */
.mc-buddy-mouth {
  position: absolute;
  bottom: 16%;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 26%;
  height: 26%;
  background: #1c2530;
  border-radius: 5px;
  box-shadow:
    calc(var(--sz) * -.10) calc(var(--sz) * -.02) 0 #1c2530,
    calc(var(--sz) *  .10) calc(var(--sz) * -.02) 0 #1c2530;
}
/* לחיים ורודות */
.mc-buddy::before,
.mc-buddy::after {
  content: "";
  position: absolute;
  top: 52%;
  width: 13%;
  height: 9%;
  background: rgba(255, 123, 199, .55);
  border-radius: 50%;
}
.mc-buddy::before { inset-inline-start: 12%; }
.mc-buddy::after  { inset-inline-end: 12%; }

.mc-buddy--sm { --sz: 74px; }
.mc-buddy--lg { --sz: 132px; }

/* מצבי-רגש */
.mc-buddy--wave { animation: mc-wave 2.6s ease-in-out infinite; }
.mc-buddy--happy { animation: mc-bounce 0.9s ease-in-out infinite; }
.mc-buddy--sad { animation: none; transform: rotate(-4deg); filter: saturate(.65) brightness(.95); }
.mc-buddy--sad .mc-buddy-mouth {
  bottom: 12%;
  border-radius: 6px 6px 2px 2px;
  box-shadow:
    calc(var(--sz) * -.10) calc(var(--sz) * .03) 0 #1c2530,
    calc(var(--sz) *  .10) calc(var(--sz) * .03) 0 #1c2530;
}
.mc-buddy--listening {
  animation: mc-bounce .55s ease-in-out infinite;
  box-shadow:
    inset 0 calc(var(--sz) * -.11) 0 rgba(0, 0, 0, .14),
    inset 0 6px 0 rgba(255, 255, 255, .30),
    0 8px 0 var(--mc-grass-3),
    0 0 0 6px rgba(124, 92, 240, .30),
    0 0 34px 6px rgba(124, 92, 240, .45);
}

/* במה + טבעת-קול סביב הבּאדי כשמקשיב.
   display:block + fit-content כדי שהבמה תתכווץ למידות המסקוט (ולא תקרוס כמו inline)
   ותתמרכז עם margin auto — כך ה-ring שמונח absolute מקיף אותו במדויק בכל רוחב-מסך. */
.mc-buddy-stage {
  position: relative;
  display: block;
  width: -moz-fit-content;
  width: fit-content;
  min-width: var(--sz, 108px);
  margin: 0 auto 6px;
}
.mc-buddy-stage .mc-listen-ring {
  position: absolute;
  inset: -8px;
  display: block;
  border-radius: calc(var(--sz, 128px) * .2 + 8px);
  border: 3px solid var(--mc-purple);
  opacity: 0;
  pointer-events: none;
}
.mc-buddy-stage.is-listening .mc-listen-ring { animation: mc-ring 1.1s ease-out infinite; }

/* מסקוט-"גיבור" גדול יותר בראש כרטיס-הבונה; הבמה מטפלת במרכוז לכן margin:0 */
.mc-hero-buddy {
  --sz: 128px;
  margin: 0;
}
@media (max-width: 560px) {
  .mc-hero-buddy { --sz: 112px; }
}

/* ============================================================
   5) שדה-טקסט גדול וידידותי
   ============================================================ */
.mc-text {
  width: 100%;
  font-size: 1.25rem;
  padding: 18px 18px;
  border-radius: 18px;
  border: 3px solid var(--mc-border-strong);
  background: var(--mc-card-2);
  color: var(--mc-ink);
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mc-text::placeholder { color: var(--mc-muted); opacity: .8; }
.mc-text:focus {
  outline: none;
  border-color: var(--mc-purple);
  box-shadow: 0 0 0 5px rgba(124, 92, 240, .18);
}

/* ============================================================
   6) כפתורים ענקיים וטקטיליים ("לחיצת-בלוק")
   ============================================================ */
.mc-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  padding: 16px 30px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(var(--mc-purple), var(--mc-purple-2));
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--mc-purple-2), 0 12px 22px rgba(105, 71, 216, .32);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}
.mc-btn:hover { filter: brightness(1.06); }
.mc-btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--mc-purple-2), 0 4px 10px rgba(105, 71, 216, .3);
}
.mc-btn:focus-visible { outline: 4px solid rgba(124, 92, 240, .4); outline-offset: 3px; }

.mc-btn-big {
  font-size: 1.45rem;
  padding: 18px 40px;
  background: linear-gradient(var(--mc-grass), var(--mc-grass-2));
  box-shadow: 0 6px 0 var(--mc-grass-3), 0 12px 22px rgba(58, 138, 38, .34);
  animation: mc-btn-breathe 2.6s ease-in-out infinite;
}
.mc-btn-big:active {
  box-shadow: 0 1px 0 var(--mc-grass-3), 0 4px 10px rgba(58, 138, 38, .3);
}

/* כפתור-מיקרופון */
.mc-mic {
  background: linear-gradient(var(--mc-blue), #1f93d8);
  box-shadow: 0 6px 0 #1f93d8, 0 12px 22px rgba(31, 147, 216, .32);
}
.mc-mic:active { box-shadow: 0 1px 0 #1f93d8, 0 4px 10px rgba(31, 147, 216, .3); }
.mc-mic.rec {
  background: linear-gradient(var(--mc-red), #c5372c);
  box-shadow: 0 6px 0 #c5372c, 0 12px 22px rgba(197, 55, 44, .32);
  animation: mc-mic-pulse 1s ease-in-out infinite;
}

/* "קפיצה" קצרה בלחיצה (מופעל מ-ui.js) */
.mc-bump { animation: mc-key-bump .22s ease; }

/* ============================================================
   7) הודעת-שגיאה ידידותית
   ============================================================ */
.mc-error {
  color: var(--mc-red);
  font-weight: 800;
  background: rgba(232, 72, 60, .1);
  border: 2px solid rgba(232, 72, 60, .28);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 0 auto 18px;
  max-width: 40ch;
  font-size: 1.05rem;
}
.mc-oops { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* ============================================================
   8) מסך-כניסה + לוח-ספרות (PIN)
   ============================================================ */
.mc-login { padding-top: 34px; }
.mc-pinform { display: flex; flex-direction: column; align-items: center; }
.mc-pin {
  font-size: 2.4rem;
  letter-spacing: .55rem;
  text-align: center;
  width: 100%;
  max-width: 280px;
  padding: 16px;
  border-radius: 18px;
  border: 3px solid var(--mc-border-strong);
  background: var(--mc-card-2);
  color: var(--mc-ink);
  box-sizing: border-box;
  margin-bottom: 16px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 800;
}
.mc-pin:focus {
  outline: none;
  border-color: var(--mc-purple);
  box-shadow: 0 0 0 5px rgba(124, 92, 240, .18);
}

.mc-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 300px;
  margin: 4px auto 20px;
}
.mc-key {
  font-family: inherit;
  font-size: 1.7rem;
  font-weight: 800;
  padding: 16px 0;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  color: var(--mc-ink);
  background: var(--mc-card-2);
  box-shadow: 0 5px 0 var(--mc-border-strong), 0 8px 16px rgba(40, 30, 90, .1);
  transition: transform .07s ease, box-shadow .07s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.mc-key:hover { background: var(--mc-card-3); }
.mc-key:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--mc-border-strong), 0 3px 8px rgba(40, 30, 90, .12);
}
.mc-key:focus-visible {
  outline: 4px solid rgba(124, 92, 240, .4);
  outline-offset: 2px;
}
.mc-key--act {
  background: linear-gradient(var(--mc-orange), #f08a2c);
  color: #3a1e00;
  box-shadow: 0 5px 0 #d97a1f, 0 8px 16px rgba(240, 138, 44, .28);
}
.mc-key--act:active { box-shadow: 0 1px 0 #d97a1f; }

/* ============================================================
   8b) בורר "מה נבנה?" — כרטיסי-רדיו גדולים (pure-CSS, בלי JS)
   ============================================================ */
.mc-modes-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 4px 0 12px;
  color: var(--mc-ink);
}
.mc-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.mc-mode { display: block; cursor: pointer; margin: 0; }
/* מסתירים את ה-radio עצמו אך משאירים אותו נגיש/פונקציונלי */
.mc-mode input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.mc-mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 18px;
  background: var(--mc-card-2);
  border: 3px solid var(--mc-border);
  box-shadow: 0 4px 0 var(--mc-border-strong);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.mc-mode-emoji { font-size: 2rem; line-height: 1; }
.mc-mode-label { font-size: 1.02rem; font-weight: 800; color: var(--mc-ink); }
.mc-mode:hover .mc-mode-card {
  transform: translateY(-3px);
  border-color: var(--mc-purple);
}
.mc-mode input:checked + .mc-mode-card {
  background: linear-gradient(rgba(124, 92, 240, .16), rgba(124, 92, 240, .10));
  border-color: var(--mc-purple);
  box-shadow: 0 4px 0 var(--mc-purple-2), 0 10px 20px rgba(105, 71, 216, .22);
  transform: translateY(-2px);
}
.mc-mode input:checked + .mc-mode-card .mc-mode-emoji { animation: mc-bounce .8s ease; }
.mc-mode input:focus-visible + .mc-mode-card {
  outline: 4px solid rgba(124, 92, 240, .4);
  outline-offset: 3px;
}
@media (max-width: 560px) {
  .mc-modes { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   9) גלריית-יצירות — אריחי-בלוק צבעוניים
   ============================================================ */
.mc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.mc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 18px;
  background: var(--mc-card-2);
  border: 3px solid var(--mc-border);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 0 var(--mc-border-strong);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.mc-tile:hover, .mc-tile:focus-visible {
  transform: translateY(-5px) rotate(-1deg);
  border-color: var(--mc-purple);
  box-shadow: 0 10px 0 var(--mc-border-strong), 0 16px 26px rgba(105, 71, 216, .2);
  outline: none;
}
.mc-tile:active { transform: translateY(-1px); }
.mc-thumb, .mc-preview-img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 104px;
  height: 104px;
  border-radius: 12px;
  background:
    conic-gradient(from 45deg, #f3f4fb 0 25%, #e9ebf5 0 50%, #f3f4fb 0 75%, #e9ebf5 0) 0 0 / 20px 20px,
    #fff;
  border: 2px solid var(--mc-border);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5);
}
.mc-tile-name { font-weight: 800; font-size: 1.02rem; }
.mc-tile-kind {
  font-size: .8rem;
  color: var(--mc-muted);
  background: var(--mc-card-3);
  padding: 2px 12px;
  border-radius: 999px;
  font-weight: 700;
}

/* ============================================================
   10) תצוגה-מקדימה (preview) — חגיגה
   ============================================================ */
.mc-preview { padding-top: 34px; }
.mc-celebrate {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--mc-grass-3);
  background: rgba(109, 199, 79, .16);
  border: 2px solid rgba(109, 199, 79, .4);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 6px;
  animation: mc-pop-in .5s .1s both;
}
@media (prefers-color-scheme: dark) { .mc-celebrate { color: #a8e58f; } }

.mc-viewer {
  margin: 18px auto;
  max-width: 340px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, .25), transparent 65%),
    linear-gradient(160deg, var(--mc-card-2), var(--mc-card-3));
  border: 3px solid var(--mc-border);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 10px 24px rgba(40, 30, 90, .16);
}
.mc-preview-img {
  width: 240px;
  height: 240px;
  animation: mc-float 3.6s ease-in-out infinite;
}
.mc-viewer canvas { max-width: 100%; border-radius: 14px; }
/* קוביית-התלת-ממד (three.js). ריק עד שהטקסטורה נטענת; אז ה-JS מחליף את התמונה. */
.mc-3d { width: 240px; height: 240px; margin: 0 auto; }
.mc-3d canvas { display: block; width: 240px; height: 240px; }
.mc-note {
  font-size: 1.08rem;
  margin: 18px auto 20px;
  max-width: 38ch;
  color: var(--mc-muted);
}
.mc-preview .mc-btn { margin-top: 4px; }

/* ניצוצות-חגיגה סביב הכותרת */
.mc-sparkles { position: relative; display: inline-block; }
.mc-sparkles::before,
.mc-sparkles::after {
  content: "✨";
  position: absolute;
  top: -6px;
  font-size: 1.3rem;
  animation: mc-sparkle 1.8s ease-in-out infinite;
}
.mc-sparkles::before { inset-inline-start: -30px; }
.mc-sparkles::after  { inset-inline-end: -30px; animation-delay: .6s; }

/* ============================================================
   11) שכבת-טעינה ("בונה בשבילכם…") — נבנית ב-ui.js
   ============================================================ */
.mc-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 255, .4), transparent 60%),
    linear-gradient(160deg, var(--mc-sky-1), var(--mc-sky-2) 55%, var(--mc-sky-3));
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
.mc-loading.show { display: flex; animation: mc-fade-in .25s ease; }
.mc-loading-inner { text-align: center; }
.mc-loading .mc-buddy { animation: mc-bounce .8s ease-in-out infinite; }
.mc-loading-text {
  margin-top: 18px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--mc-ink);
  text-shadow: 0 2px 0 var(--mc-border-strong);
}
/* בלוקים "נערמים" בזמן הטעינה */
.mc-blocks {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.mc-blocks span {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(var(--mc-grass), var(--mc-grass-2));
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15), 0 5px 0 var(--mc-grass-3);
  animation: mc-block-stack 1s ease-in-out infinite;
}
.mc-blocks span:nth-child(1) { background: linear-gradient(var(--mc-blue), #1f93d8); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15), 0 5px 0 #1f7bb5; animation-delay: 0s; }
.mc-blocks span:nth-child(2) { background: linear-gradient(var(--mc-orange), #f08a2c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15), 0 5px 0 #d97a1f; animation-delay: .18s; }
.mc-blocks span:nth-child(3) { background: linear-gradient(var(--mc-pink), #e0559f); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15), 0 5px 0 #d64d97; animation-delay: .36s; }

/* ============================================================
   12) אזור-ההורים/ניהול — ליטוש קל (extends base.html)
   ============================================================ */
.mc-parent-kids { display: flex; gap: 10px; flex-wrap: wrap; }
.mc-parent-kids .btn.active {
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
  filter: brightness(1.03);
}
.mc-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-sm.danger, button.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--danger-rgb), .28);
}
.btn-sm.danger:hover, button.danger:hover { filter: brightness(1.06); }

/* ============================================================
   13) אנימציות (keyframes) — הכל CSS, תואם-CSP
   ============================================================ */
@keyframes mc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes mc-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30%      { transform: translateY(-16px) scale(1.04, .96); }
  60%      { transform: translateY(0) scale(1.02, .98); }
}
@keyframes mc-wave {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-6px); }
}
@keyframes mc-pop-in {
  0%   { transform: scale(.9) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes mc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes mc-sun-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06) rotate(8deg); }
}
@keyframes mc-btn-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
@keyframes mc-mic-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@keyframes mc-key-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes mc-sparkle {
  0%, 100% { transform: scale(.7) rotate(0deg); opacity: .4; }
  50%      { transform: scale(1.2) rotate(20deg); opacity: 1; }
}
@keyframes mc-block-stack {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes mc-ring {
  0%   { transform: scale(.9); opacity: .7; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ============================================================
   14) נגישות — כיבוד prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mc-body::after,
  .mc-buddy,
  .mc-buddy--wave,
  .mc-buddy--happy,
  .mc-buddy--listening,
  .mc-buddy-stage.is-listening .mc-listen-ring,
  .mc-mode input:checked + .mc-mode-card .mc-mode-emoji,
  .mc-btn-big,
  .mc-mic.rec,
  .mc-preview-img,
  .mc-blocks span,
  .mc-loading .mc-buddy,
  .mc-sparkles::before,
  .mc-sparkles::after,
  .mc-card {
    animation: none !important;
  }
}

/* ============================================================
   15) רספונסיביות
   ============================================================ */
@media (max-width: 560px) {
  .mc-card { padding: 24px 18px; }
  .mc-card h1 { font-size: 1.75rem; }
  .mc-btn { width: 100%; }
  .mc-actions { flex-direction: column; }
  .mc-gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* פונט Assistant לכל דפי-הילד (ה-@font-face מוגדר ב-style.css הנטען לפניו). */
.mc-body, .mc-body button, .mc-body input, .mc-body textarea, .mc-body select {
  font-family: "Assistant", "IBM Plex Sans Hebrew", "Segoe UI", system-ui, sans-serif;
}
