/* ============================================================
   משחקי הגשר · עולם 5 (במספור של הילד) · 🆕 19.10.2026
   שתי אותיות, צליל אחד (pair-merge) · בונים את הגשר (bridge-pairs)
   🔴 המילים תמיד כהות על משטח בהיר, כמו בכל הקורס
   ============================================================ */

/* צמד אותיות על מסילה: אריח אחד רחב, בצבע שמסמן "צמד" */
.slot.is-pair { width: 110px; }
.tile.br-opt, .pm-pair { background: linear-gradient(180deg, #d9fbf6, #8ff0e4); box-shadow: 0 6px 0 #0f8f86, 0 0 0 2.5px var(--teal); }

/* ---------- שתי אותיות, צליל אחד ---------- */
.pm-lead { color: var(--text-soft); font-weight: 700; margin-bottom: 10px; text-align: center; }
.pm-stage { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 110px; transition: gap .4s ease-in; }
.pm-stage.is-joining { gap: 0; }
.pm-stage.is-joining .pm-plus { opacity: 0; width: 0; }
.pm-plus { color: var(--teal); font-size: 34px; font-weight: 900; transition: opacity .3s, width .3s; }
.pm-pair { min-width: 120px; font-size: 46px; cursor: default; display: inline-grid; place-items: center; }
.pm-join { margin: 10px 0; }
.pm-join[disabled] { opacity: .45; }
.pm-word { display: flex; align-items: flex-start; justify-content: center; gap: 14px; min-height: 110px; margin-top: 6px; }
.pm-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 12px 10px; border: 0; border-radius: 18px;
  background: rgba(14, 17, 23, .45); box-shadow: 0 0 0 1.5px rgba(25, 211, 197, .4); cursor: pointer; touch-action: manipulation; }
.pm-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--teal); }
.pm-card.is-heard { box-shadow: 0 0 0 3px var(--teal), 0 0 16px var(--teal-glow); }   /* 21.10: כרטיס שכבר שמעו */
.pm-label { color: var(--teal); font-size: 14px; font-weight: 700; }
.pm-w { display: flex; gap: 2px; padding: 4px 14px; border-radius: 14px; background: var(--gray-light); color: var(--ink);
  font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: 40px; font-weight: 700; box-shadow: 0 4px 0 #8b96a3; }
.pm-w .is-pair { color: #0f8f86; text-decoration: underline 4px var(--teal); text-underline-offset: 6px; }

/* ---------- בונים את הגשר ---------- */
.br-scene {
  position: relative; width: min(100%, 600px); aspect-ratio: 16 / 7; margin: 4px 0 8px; overflow: hidden;
  border-radius: 22px; box-shadow: 0 0 0 2px var(--steel), 0 0 0 4px rgba(25, 211, 197, .3);
  background: url(../assets/img/bridge/chasm.jpg) 50% 50% / cover no-repeat, var(--graphite-2);
}
/* הקרשים יושבים בין שני הצוקים, בגובה שפת הצוק. נמדד על bridge/chasm.jpg */
.br-deck {
  position: absolute; left: 16%; right: 26%; top: 33%; height: 15%;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px;
}
.br-slot { position: relative; border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(25, 211, 197, .55); background: rgba(25, 211, 197, .08); }
.br-slot.is-laid { box-shadow: none; background: none; animation: br-drop .35s cubic-bezier(.34, 1.6, .64, 1) both; }
.br-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.br-slot b { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: clamp(11px, 2.4vw, 17px);
  font-family: 'Andika', 'Trebuchet MS', sans-serif; }
@keyframes br-drop { from { transform: translateY(-40px) scale(1.2); opacity: 0; } }
/* הרובוט מחכה על הצוק השמאלי, ובסוף חוצה ימינה */
.br-tin { position: absolute; left: 2%; bottom: 52%; width: 13%; transition: left 2.4s cubic-bezier(.45, 0, .55, 1); }
.br-tin img, .br-tin svg { width: 100%; height: auto; display: block; }
.br-scene.is-crossing .br-tin { left: 80%; animation: br-walk .35s ease-in-out infinite alternate; }
@keyframes br-walk { to { transform: translateY(-4px); } }

.br-card { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 2px 0 6px; }
.br-art .art { border-radius: 16px; box-shadow: 0 0 0 3px var(--white), var(--shadow); }
.br-plank { position: relative; width: 320px; }
.br-plank img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.br-word { position: absolute; inset: 8% 8% 8%; display: flex; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink); font-family: 'Andika', 'Trebuchet MS', sans-serif; font-size: 36px; font-weight: 700; }
.br-hole { display: inline-grid; place-items: center; min-width: 58px; height: 44px; border-radius: 10px;
  border: 3px dashed var(--pink-deep); background: rgba(255, 255, 255, .45); }
.br-hole.is-filled { border-style: solid; border-color: var(--ok); color: #0f8f86; box-shadow: 0 0 18px rgba(51, 224, 143, .5); }
.br-opt.is-wrong { box-shadow: 0 6px 0 #8b96a3, 0 0 0 3px var(--err); animation: shake .3s; }

@media (prefers-reduced-motion: reduce) {
  .br-tin, .br-scene.is-crossing .br-tin { transition-duration: .01s; animation: none; }
}

@media (max-width: 600px) {
  .slot.is-pair { width: 86px; }
  .br-card { gap: 10px; }
  .br-art .art { width: 72px; height: 72px; }
  .br-plank { width: 230px; }
  .br-word { font-size: 28px; }
  .br-hole { min-width: 44px; height: 32px; }
  .pm-w { font-size: 30px; }
  .pm-card .art { width: 72px; height: 72px; }
  .pm-word { gap: 8px; }
}

/* 🆕 19.10 · קריאה קודם: המילה על הקרש, ותמונות לבחירה */
.br-word .is-pair { color: #0f8f86; }
.br-pics { gap: 14px; margin-top: 4px; }
.br-pics .pic-btn .art, .ft-pic .art { width: 96px; height: 96px; }
.wh-pic .art { border-radius: 14px; box-shadow: 0 0 0 3px var(--white), var(--shadow); display: block; }
@media (max-width: 600px) {
  .br-pics { gap: 8px; }
  .br-pics .pic-btn .art, .ft-pic .art { width: 80px; height: 80px; }
  .wh-pic .art { width: 60px; height: 60px; }
}
