/*
  ============================================================
  KidsAdventure - מסכי ההורה
  ------------------------------------------------------------
  אלה המסכים היחידים שמבוגר קורא, ולכן הם נראים אחרת ממסכי
  הילד: טקסט קטן יותר, רגוע, וניגודיות גבוהה. אין כאן אנימציות
  ואין צבעים חזקים - מבוגר בא לכאן להגדיר משהו ולצאת.

  שטחי מגע: כל כפתור לפחות 48 פיקסלים, גם כאן. הורה מגדיר
  בטלפון עם יד אחת ותינוק ביד השנייה.
  ============================================================
*/

/*
  משתני השטח הבטוח מוגדרים ב-style.css, ו-.screen כבר מוסיף
  אותם לריפוד של כל מסך - כולל המסכים כאן. להוסיף אותם שוב
  היה מכפיל את הריפוד ומצמצם את השטח השימושי בלי סיבה.
*/

.pc-screen {
  background: linear-gradient(180deg, #f7f9f6, #eceff0);
  color: #22303a;
  overflow: hidden;
}

.pc-screen .topbar {
  /* .screen כבר הוסיף את השטח הבטוח - כאן רק נשימה פנימית */
  padding-block-start: clamp(4px, 1vmin, 10px);
  padding-inline: clamp(4px, 1vmin, 12px);
}
.pc-title {
  font-size: clamp(15px, 2.4vmin, 20px);
  font-weight: 800;
  color: #3f5461;
}

.pc-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(10px, 2vmin, 22px);
  /*
    הרווח התחתון גדול בכוונה: זה מסך שנגלל, והכפתור האחרון בו
    צריך מקום להיעצר בו ולא להיצמד לקצה.
  */
  padding-bottom: clamp(24px, 5vmin, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vmin, 18px);
  max-width: 760px;
  margin-inline: auto;
  width: 100%;
}

/* ---------------------------------------------------------
   טיפוגרפיה
--------------------------------------------------------- */
.pc-big {
  font-size: clamp(21px, 3.6vmin, 32px);
  font-weight: 900;
  margin: 0;
  line-height: 1.25;
  text-wrap: balance;
}
.pc-h {
  font-size: clamp(17px, 2.7vmin, 23px);
  font-weight: 800;
  margin: 0 0 2px;
  color: #2c4250;
}
.pc-h3 {
  font-size: clamp(14px, 2.1vmin, 17px);
  font-weight: 800;
  margin: 12px 0 4px;
  color: #4a616f;
}
.pc-lead {
  font-size: clamp(14px, 2.2vmin, 18px);
  line-height: 1.55;
  margin: 0;
  color: #3c505c;
}
.pc-note {
  font-size: clamp(12.5px, 1.9vmin, 15px);
  line-height: 1.6;
  margin: 0;
  color: #667c88;
}
.pc-ul {
  margin: 4px 0 0;
  padding-inline-start: 20px;
  font-size: clamp(12.5px, 1.9vmin, 15px);
  line-height: 1.75;
  color: #3c505c;
}

.pc-section {
  background: #fff;
  border: 1px solid #dde4e2;
  border-radius: clamp(12px, 2vmin, 18px);
  padding: clamp(12px, 2.2vmin, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.4vmin, 12px);
}

/* ---------------------------------------------------------
   כפתורים
--------------------------------------------------------- */
.pc-btn {
  min-height: 52px;
  border: 2px solid transparent;
  border-radius: clamp(10px, 1.8vmin, 15px);
  padding: 11px 18px;
  font-family: inherit;
  font-size: clamp(15px, 2.3vmin, 18px);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.3;
  transition: transform .1s ease, filter .12s ease;
}
.pc-btn:active { transform: scale(.98); }
.pc-btn-note {
  font-size: clamp(11.5px, 1.7vmin, 13.5px);
  font-weight: 600;
  opacity: .85;
}
.pc-primary { background: #3e8e5a; color: #fff; }
.pc-ghost   { background: #eef2f1; color: #33474f; border-color: #d3dcda; }
.pc-warn    { background: #fff4e2; color: #8a5a15; border-color: #efd7a8; }
.pc-danger  { background: #fdecea; color: #96331f; border-color: #f0c2b8; }

.pc-row {
  display: flex;
  gap: clamp(7px, 1.4vmin, 12px);
  flex-wrap: wrap;
}
.pc-row > .pc-btn { flex: 1 1 150px; }

/* ---------------------------------------------------------
   בחירה מרובה
--------------------------------------------------------- */
.pc-chips {
  display: flex;
  gap: clamp(6px, 1.2vmin, 10px);
  flex-wrap: wrap;
}
.pc-chip {
  flex: 1 1 110px;
  min-height: 50px;
  border: 2px solid #d3dcda;
  border-radius: clamp(9px, 1.6vmin, 14px);
  background: #f7faf9;
  color: #3c505c;
  font-family: inherit;
  font-size: clamp(13.5px, 2vmin, 16px);
  font-weight: 800;
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.pc-chip-note {
  font-size: clamp(10.5px, 1.5vmin, 12.5px);
  font-weight: 600;
  color: #7b909b;
}
.pc-chip.on {
  background: #e4f1e8;
  border-color: #3e8e5a;
  color: #1f5c37;
}
.pc-chip.on .pc-chip-note { color: #427a56; }

/* ---------------------------------------------------------
   קלט
--------------------------------------------------------- */
.pc-input-wrap { display: flex; }
.pc-input {
  flex: 1 1 auto;
  min-height: 54px;
  border: 2px solid #cfd8d6;
  border-radius: clamp(10px, 1.8vmin, 15px);
  padding: 10px 14px;
  font-family: inherit;
  font-size: clamp(17px, 2.6vmin, 21px);
  font-weight: 700;
  color: #22303a;
  background: #fff;
  /* 17px ומעלה - אחרת ספארי מקרב את המסך אוטומטית בפוקוס */
}
.pc-input:focus {
  outline: none;
  border-color: #3e8e5a;
  box-shadow: 0 0 0 3px #3e8e5a33;
}
.pc-preview {
  font-size: clamp(13px, 2vmin, 16px);
  font-weight: 700;
  color: #3e8e5a;
  margin: 0;
  min-height: 1.4em;
}

/* ---------------------------------------------------------
   נתוני התקדמות
--------------------------------------------------------- */
.pc-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(7px, 1.4vmin, 12px);
}
.pc-fact {
  background: #f4f8f6;
  border-radius: clamp(9px, 1.6vmin, 13px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pc-fact-v {
  font-size: clamp(16px, 2.5vmin, 21px);
  font-weight: 900;
  color: #24503a;
  font-variant-numeric: tabular-nums;
}
.pc-fact-l {
  font-size: clamp(11.5px, 1.7vmin, 13.5px);
  color: #6b8290;
  font-weight: 600;
}

.pc-list { display: flex; flex-direction: column; gap: 3px; }
.pc-list-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: #f7faf9;
  border-radius: 8px;
  font-size: clamp(13px, 1.9vmin, 15px);
}
.pc-list-name { font-weight: 700; color: #33474f; }
.pc-list-val { color: #6b8290; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------
   First Run: שני עמודים באותו מסך
--------------------------------------------------------- */
.pc-page {
  display: none;
  flex-direction: column;
  gap: clamp(10px, 2vmin, 18px);
  background: #fff;
  border: 1px solid #dde4e2;
  border-radius: clamp(12px, 2vmin, 18px);
  padding: clamp(16px, 3vmin, 30px);
}
.pc-page.on { display: flex; }

/* ---------------------------------------------------------
   שער ההורה
   ---------------------------------------------------------
   בפינה, קטן, ובלי כיתוב. הילד לא קורא, וכיתוב רק מסקרן.
   שקוף למחצה כדי שלא ימשוך את העין - אבל שטח המגע מלא.
--------------------------------------------------------- */
.pc-gate {
  position: fixed;
  inset-block-end: calc(var(--safe-b) + 6px);
  inset-inline-start: calc(var(--safe-l) + 6px);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(40, 60, 70, .1);
  color: rgba(30, 50, 60, .45);
  padding: 9px;
  cursor: pointer;
  z-index: 60;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.pc-gate svg { width: 100%; height: 100%; display: block; }
/* בזמן ההחזקה: טבעת שמתמלאת, כדי שהמבוגר יבין שצריך להחזיק */
.pc-gate.holding {
  background: rgba(62, 142, 90, .22);
  color: #2c6b45;
  animation: pcHold 1.8s linear forwards;
}
@keyframes pcHold {
  from { box-shadow: 0 0 0 0 rgba(62, 142, 90, .5); }
  to   { box-shadow: 0 0 0 12px rgba(62, 142, 90, 0); }
}

.pc-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 1.8vmin, 14px);
  max-width: 420px;
}
.pc-num {
  min-height: 68px;
  border: 2px solid #d3dcda;
  border-radius: clamp(10px, 1.8vmin, 15px);
  background: #fff;
  font-family: inherit;
  font-size: clamp(22px, 3.4vmin, 30px);
  font-weight: 900;
  color: #2c4250;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.pc-num.wrong {
  animation: pcWrong .5s ease;
  border-color: #e0a99c;
}
@keyframes pcWrong {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* ---------------------------------------------------------
   סוף הזמן
--------------------------------------------------------- */
#pcTimeUp .pc-body {
  align-items: center;
  justify-content: center;
  text-align: center;
}
#pcTimeUp .pc-big { font-size: clamp(26px, 5vmin, 44px); }
.pc-sun { width: clamp(72px, 14vmin, 130px); opacity: .8; }
.pc-sun svg { width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------
   הודעה קטנה
--------------------------------------------------------- */
.pc-toast {
  position: fixed;
  inset-block-end: calc(var(--safe-b) + 22px);
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: 80vw;
  background: #22303a;
  color: #fff;
  font-size: clamp(13px, 2vmin, 16px);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 22px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  z-index: 90;
}
.pc-toast.on { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------
   נתונים גולמיים - מסלול חלופי כשהורדה חסומה
--------------------------------------------------------- */
.pc-raw {
  width: 100%;
  min-height: 220px;
  flex: 1 1 auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  direction: ltr;
  text-align: left;
  border: 1px solid #cfd8d6;
  border-radius: 10px;
  padding: 10px;
  background: #fbfcfb;
  color: #22303a;
  resize: none;
}

@media (prefers-reduced-motion: reduce) {
  .pc-btn, .pc-toast, .pc-gate.holding, .pc-num.wrong {
    animation: none;
    transition: none;
  }
  /* הטבעת מכובה, ולכן הצבע לבד צריך להראות שההחזקה נרשמה */
  .pc-gate.holding { background: rgba(62, 142, 90, .3); }
}

/*
  ============================================================
  מסך הפתיחה
  ------------------------------------------------------------
  זה המסך הראשון שמישהו רואה מהמשחק, ולכן הוא שייך לעולם שלו
  ולא נראה כמו טופס שקדם לו: אותו רקע מאויר של מסך הבית, אותו
  שלט עץ, אותם צבעים, ויצור שמחכה.

  שלושה שלבים באותו מסך. השלט והיצור נשארים במקומם ורק תוכן
  הכרטיס מתחלף - כך זה מרגיש כמו שיחה אחת ולא כמו רצף מסכים.
  ============================================================
*/

.fr-screen {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky1), var(--sky2));
}

/* הרקע המאויר, אותו אחד של הבית */
.fr-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.fr-bg svg { width: 100%; height: 100%; display: block; }

.fr-stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.4vmin, 22px);
  padding: calc(var(--pad) + var(--safe-t))
           calc(var(--pad) + var(--safe-r))
           calc(var(--pad) + var(--safe-b))
           calc(var(--pad) + var(--safe-l));
}

/* ---------------------------------------------------------
   היצור שמחכה
   ---------------------------------------------------------
   נושם כל הזמן, ומנופף בכל מעבר בין שלבים. סימן חיים ולא
   קישוט: הוא מה שהופך את המסך לפתיחה של הרפתקה.
--------------------------------------------------------- */
.fr-crt {
  flex: 0 0 auto;
  /*
    גדול מספיק כדי להיות דמות ולא קישוט. קודם הוא היה 20vmin
    וישב נמוך בפינה, ונראה מנותק מהשלט במקום לעמוד לידו.
  */
  width: clamp(130px, 30vmin, 330px);
  align-self: center;
  margin-top: clamp(20px, 7vmin, 90px);
  animation: frBreathe 3.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.fr-crt svg { width: 100%; height: auto; display: block; }
@keyframes frBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.02); }
}
.fr-crt.wave { animation: frWave .9s ease, frBreathe 3.4s ease-in-out infinite .9s; }
@keyframes frWave {
  0%, 100% { transform: rotate(0) translateY(0); }
  25%      { transform: rotate(-6deg) translateY(-10px); }
  60%      { transform: rotate(5deg) translateY(-4px); }
}

/* ---------------------------------------------------------
   הכרטיס
--------------------------------------------------------- */
.fr-card {
  flex: 0 1 auto;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fr-step {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8vmin, 20px);
  width: 100%;
  text-align: center;
}
.fr-step.on {
  display: flex;
  animation: frIn .34s ease both;
}
@keyframes frIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fr-sign { width: min(460px, 92%); }
.fr-sign-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(30, 60, 90, .28));
}

.fr-lead {
  margin: 0;
  font-size: clamp(17px, 3vmin, 27px);
  font-weight: 800;
  color: var(--ink);
  text-shadow: 0 2px 0 #fff;
}
.fr-tiny {
  margin: 0;
  max-width: 42ch;
  font-size: clamp(11.5px, 1.7vmin, 14.5px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .72);
  border-radius: 12px;
  padding: 6px 12px;
}

/* ---------------------------------------------------------
   כפתורים - אותה שפה של המשחק
--------------------------------------------------------- */
.fr-row {
  display: flex;
  gap: clamp(8px, 1.8vmin, 18px);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.fr-btn {
  border: none;
  border-radius: clamp(16px, 2.6vmin, 26px);
  font-family: inherit;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  /* שטח מגע נדיב: אצבע של ילד, ואצבע של הורה שמחזיק טאבלט */
  min-height: clamp(56px, 9vmin, 78px);
  padding: clamp(10px, 1.8vmin, 18px) clamp(20px, 3.4vmin, 40px);
  font-size: clamp(17px, 2.8vmin, 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s ease;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}
.fr-go {
  background: linear-gradient(180deg, #ffa561, var(--c-orange));
  box-shadow: 0 clamp(4px, .8vmin, 7px) 0 var(--c-orange-d),
              0 8px 18px rgba(30, 60, 90, .22);
}
.fr-final {
  background: linear-gradient(180deg, #55d98d, var(--c-green));
  box-shadow: 0 clamp(4px, .8vmin, 7px) 0 var(--c-green-d),
              0 8px 18px rgba(30, 60, 90, .22);
}
.fr-skip {
  background: linear-gradient(180deg, #fdfdfd, #e7edf0);
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 clamp(4px, .8vmin, 7px) 0 #c3ced4,
              0 6px 14px rgba(30, 60, 90, .14);
}
.fr-btn:active { transform: translateY(clamp(3px, .7vmin, 6px)); }

/* ---------------------------------------------------------
   לוחית השם
   ---------------------------------------------------------
   input אמיתי - צריך את המקלדת של המכשיר - אבל כל מה שסביבו
   הוא לוחית עץ. שדה טופס אפור היה המקום היחיד במסך שנראה
   כאילו הוא מאפליקציה אחרת.
--------------------------------------------------------- */
.fr-plaque {
  width: min(420px, 92%);
  border-radius: clamp(14px, 2.4vmin, 22px);
  padding: clamp(6px, 1.2vmin, 11px);
  background: linear-gradient(180deg, #b07f4e, #8a5a36);
  box-shadow: inset 0 0 0 3px #d9b083, 0 6px 14px rgba(30, 60, 90, .26);
}
.fr-name-input {
  width: 100%;
  border: none;
  border-radius: clamp(10px, 1.8vmin, 16px);
  background: #fff8ea;
  color: #4a3826;
  font-family: inherit;
  font-weight: 900;
  text-align: center;
  /* 17px ומעלה, אחרת ספארי מקרב את המסך בפוקוס */
  font-size: clamp(20px, 3.4vmin, 32px);
  padding: clamp(10px, 1.8vmin, 18px) clamp(8px, 1.4vmin, 14px);
  min-height: clamp(52px, 8vmin, 70px);
}
.fr-name-input::placeholder { color: #b9a48c; font-weight: 800; }
.fr-name-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--c-orange);
}
.fr-preview {
  margin: 0;
  font-size: clamp(15px, 2.4vmin, 22px);
  font-weight: 900;
  color: var(--c-green-d);
  text-shadow: 0 2px 0 #fff;
  min-height: 1.4em;
}

/* ---------------------------------------------------------
   בועות הגיל
--------------------------------------------------------- */
.fr-ages {
  display: flex;
  gap: clamp(7px, 1.6vmin, 16px);
  flex-wrap: wrap;
  justify-content: center;
}
.fr-age {
  width: clamp(58px, 10vmin, 92px);
  height: clamp(58px, 10vmin, 92px);
  border-radius: 50%;
  border: clamp(3px, .6vmin, 5px) solid #fff;
  background: linear-gradient(180deg, #7fd3f5, var(--c-blue));
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 clamp(3px, .7vmin, 6px) 0 var(--c-blue-d),
              0 6px 14px rgba(30, 60, 90, .2);
  transition: transform .12s ease;
}
.fr-age-n {
  font-size: clamp(22px, 3.8vmin, 38px);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.fr-age:active { transform: translateY(3px); }
.fr-age.on {
  background: linear-gradient(180deg, #ffd764, var(--c-yellow));
  box-shadow: 0 clamp(3px, .7vmin, 6px) 0 #d9a017,
              0 0 0 clamp(4px, .8vmin, 7px) rgba(255, 201, 60, .45),
              0 6px 14px rgba(30, 60, 90, .2);
  transform: scale(1.06);
}

/* ---------------------------------------------------------
   לאורך: היצור עובר מתחת לכרטיס במקום לצידו
--------------------------------------------------------- */
@media (max-aspect-ratio: 1/1) {
  .fr-stage { flex-direction: column-reverse; justify-content: center; }
  .fr-crt {
    align-self: center;
    margin-top: 0;
    width: clamp(100px, 30vmin, 230px);
  }
}

/* מסך נמוך מאוד - טלפון לרוחב */
@media (max-height: 460px) {
  .fr-crt { width: clamp(80px, 22vmin, 150px); margin-top: 0; }
  .fr-sign { width: min(360px, 80%); }
  .fr-tiny { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fr-crt, .fr-crt.wave, .fr-step.on { animation: none; }
}

/*
  ============================================================
  שער ההורים
  ------------------------------------------------------------
  חמש ספרות, כל אחת כתובה במילה, וכל מילה יושבת מעל התיבה
  שלה.

  ה-direction:ltr כאן הוא הדבר החשוב בקובץ. הדף כולו RTL,
  וללא ההגדרה הזאת הדפדפן מסדר את חמש העמודות מימין לשמאל -
  כלומר המילה הראשונה יושבת מעל התיבה החמישית. ההורה מקליד
  את מה שהוא רואה, ונכשל, ולא מבין למה.

  המילים עצמן נשארות עברית תקינה: RTL פועל *בתוך* מילה, וכאן
  אנחנו קובעים רק את סדר העמודות.
  ============================================================
*/

.gate-stage { align-items: center; justify-content: center; }
.gate-card { width: min(680px, 100%); gap: clamp(10px, 2vmin, 20px); }

.gate-row {
  /* הסדר קבוע ולא מתהפך. זה כל העניין. */
  direction: ltr;
  display: flex;
  gap: clamp(6px, 1.6vmin, 16px);
  justify-content: center;
  align-items: flex-end;
  flex-wrap: nowrap;
  width: 100%;
  padding: clamp(8px, 1.6vmin, 16px) clamp(6px, 1.2vmin, 14px);
  border-radius: clamp(14px, 2.4vmin, 22px);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 6px 18px rgba(30, 60, 90, .18);
}

/*
  כל עמודה היא כרטיס אחד: המילה והתיבה שמתחתיה.

  זה מה שמסלק את סכנת ה-RTL לגמרי. גם מי שיקרא את חמש
  המילים מימין לשמאל - כמו שקוראים עברית - יראה שכל מילה
  יושבת בתוך אותו כרטיס עם התיבה שלה, ויקליד את הספרה
  במקום הנכון. אין מיפוי בין שתי שורות שאפשר לבלבל.
*/
.gate-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1vmin, 10px);
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(5px, 1.1vmin, 10px) clamp(3px, .7vmin, 8px);
  border-radius: clamp(10px, 1.8vmin, 16px);
  background: rgba(191, 233, 255, .5);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9);
}

.gate-word {
  /* המילה בעברית - הכיוון שלה נקבע כאן ולא יורש מהעמודה */
  direction: rtl;
  font-size: clamp(13px, 2.4vmin, 24px);
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: 0 1px 0 #fff;
}

.gate-box {
  width: 100%;
  max-width: clamp(52px, 9vmin, 88px);
  aspect-ratio: 1;
  border: clamp(3px, .6vmin, 5px) solid #b07f4e;
  border-radius: clamp(10px, 1.8vmin, 18px);
  background: #fff8ea;
  color: #4a3826;
  font-family: inherit;
  font-weight: 900;
  text-align: center;
  /* 17px ומעלה, אחרת ספארי מקרב את המסך בפוקוס */
  font-size: clamp(22px, 4.4vmin, 42px);
  padding: 0;
  box-shadow: inset 0 2px 0 #fff, 0 3px 0 #8a5a36;
  font-variant-numeric: tabular-nums;
}
.gate-box:focus {
  outline: none;
  border-color: var(--c-orange);
  background: #fff;
  box-shadow: inset 0 2px 0 #fff, 0 3px 0 var(--c-orange-d),
              0 0 0 clamp(3px, .6vmin, 5px) rgba(255, 139, 61, .35);
}

.gate-row.shake { animation: gateShake .46s ease; }
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-9px); }
  45%      { transform: translateX(8px); }
  70%      { transform: translateX(-5px); }
}

.gate-msg {
  margin: 0;
  min-height: 1.5em;
  font-size: clamp(15px, 2.4vmin, 22px);
  font-weight: 900;
  color: #c05f3c;
  text-shadow: 0 2px 0 #fff;
  opacity: 0;
  transition: opacity .18s ease;
}
.gate-msg.on { opacity: 1; }

/* טאבלט לאורך וטלפון: התיבות עדיין בשורה אחת, קטנות יותר */
@media (max-width: 560px) {
  .gate-row { gap: 5px; padding: 8px 6px; }
  .gate-word { font-size: clamp(11px, 3.1vw, 16px); }
  .gate-box { max-width: none; font-size: clamp(19px, 6vw, 30px); }
}

@media (max-height: 460px) {
  .gate-card { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-row.shake { animation: none; outline: 3px solid #c05f3c; }
}

/*
  ============================================================
  מרכז ההורים - כותרת ופסי התקדמות
  ------------------------------------------------------------
  זה המסך היחיד שמבוגר קורא, ולכן התוכן שלו רגוע. אבל הוא
  עדיין אותה אפליקציה: יצור מהעולם בכותרת, ואותם צבעים.
  ============================================================
*/

.pc-screen {
  /*
    רקע שמזכיר את שמי המשחק במקום אפור ניטרלי, בלי להפריע
    לקריאה של טקסט קטן.
  */
  background:
    radial-gradient(120% 60% at 50% 0%, #dff2fb 0%, transparent 70%),
    linear-gradient(180deg, #f7f9f6, #eceff0);
}

.pc-hero {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vmin, 20px);
  padding: clamp(10px, 2vmin, 18px) clamp(12px, 2.2vmin, 22px);
  border-radius: clamp(14px, 2.4vmin, 20px);
  background: linear-gradient(180deg, #ffffff, #f2f7f9);
  border: 1px solid #dde4e2;
  box-shadow: 0 4px 14px rgba(30, 60, 90, .07);
}
.pc-hero-crt {
  flex: 0 0 auto;
  width: clamp(52px, 9vmin, 86px);
}
.pc-hero-crt svg { width: 100%; height: auto; display: block; }
.pc-hero-txt { min-width: 0; }
.pc-hero-h {
  margin: 0;
  font-size: clamp(20px, 3.4vmin, 30px);
  font-weight: 900;
  color: #24503a;
  line-height: 1.2;
}
.pc-hero-sub {
  margin: 2px 0 0;
  font-size: clamp(12.5px, 2vmin, 16px);
  font-weight: 700;
  color: #6b8290;
}

/* ---------------------------------------------------------
   פסי התקדמות
   ---------------------------------------------------------
   "12 מתוך 44" דורש חשבון קטן; פס אומר את אותו דבר במבט.
   המספר נשאר, כי הורה כן רוצה לדעת בדיוק.
--------------------------------------------------------- */
.pc-bar-row { display: flex; flex-direction: column; gap: 5px; }
.pc-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.pc-bar-l {
  font-size: clamp(13px, 2vmin, 16px);
  font-weight: 800;
  color: #33474f;
}
.pc-bar-v {
  font-size: clamp(13px, 2vmin, 16px);
  font-weight: 900;
  color: #24503a;
  font-variant-numeric: tabular-nums;
}
.pc-bar {
  height: clamp(12px, 2vmin, 18px);
  border-radius: 999px;
  background: #e4eae8;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(30, 60, 90, .14);
}
.pc-bar-fill {
  height: 100%;
  border-radius: 999px;
  /* מינימום נראה: אפילו יצור אחד צריך להראות משהו */
  min-width: 6px;
  transition: width .5s ease;
}
.pc-bar-green { background: linear-gradient(90deg, #55d98d, #2fbf71); }
.pc-bar-blue  { background: linear-gradient(90deg, #7fd3f5, #36a4e8); }

@media (prefers-reduced-motion: reduce) {
  .pc-bar-fill { transition: none; }
}

/* ---------------------------------------------------------
   שיוף קטן לשאר המסך
--------------------------------------------------------- */
.pc-section {
  /* פס צבע דק בראש כל אזור - מפריד בין אזורים בלי קווים כבדים */
  box-shadow: 0 3px 12px rgba(30, 60, 90, .06);
}
.pc-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-h::before {
  content: "";
  width: 5px;
  height: 1.05em;
  border-radius: 3px;
  background: #3e8e5a;
  flex: 0 0 auto;
}
