/* ═══════════════════════════════════════════════════════════════════════
   „מה חסר?” — הרשת והדקדוקים.

   הפלטה, הטיפוגרפיה, ה-banner וה-footer מגיעים מ-/guides.css. אין כאן אף
   טוקן צבע חדש ואף גופן חדש: המשחק נראה כמו האתר כי הוא משתמש באותם
   משתנים, ולא כי מישהו התאים גוונים ביד.

   ── מה מבדיל אותו מ„איפה זה?” ─────────────────────────────────────
   „איפה זה?” הוא *עמוד אטלס*: מפה מלאת מסך שמסמנים עליה מקום.
   „מה חסר?” הוא *עמוד תרגילים מתוך אותו אטלס*: על גיליון הנייר יושבת
   לוחית אחת, ובתוכה תרשים. אותו נייר, אותה דיו, תפקיד אחר.

   הסרגל, פס ההתקדמות והמצבים לקוחים 1:1 מ„איפה זה?” — אותם ריפודים,
   אותם גדלי אייקון, אותו hairline, אותו teal להצלחה. משחק אחד, ארבעה
   מכשירים, לא ארבעה מיני-משחקים.

   ── ה-DNA המשותף לכל חתיכה ────────────────────────────────────────
   גובה 44, radius 10, מסגרת 1.5, טקסט 15 ממורכז. **הרוחב נקבע על ידי
   התא, לעולם לא על ידי אורך הטקסט.** „עכו” ו„ראש הנקרה” הן אותו מלבן
   בדיוק, במגש ועל הלוח. חריג יחיד: בתוך שלט המזלג הגובה 38 וה-radius 8,
   ושם גם כל ה-slots באותו שלט זהים.

   ── mobile first, ובלי כוכבית ────────────────────────────────────
   מסך המשחק נעול לגובה ה-viewport ואינו נגלל.

   התקציב האנכי, 390×750:
      42  סרגל עליון
       3  פס התקדמות
     ---  הלוח — flex:1, כלומר כל מה שנשאר
     136  אזור תחתון אחד: המגש בזרימה, ה-reveal פרוש עליו
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --wm-piece-bg: #FAF2E1;        /* נייר החתיכה — זהה בחתיכה ובחור */
  --wm-line: rgba(110, 90, 59, .35);
  --wm-elev-ink: #6B2F12;        /* המספר בגובה. כהה מסיינה, כי הוא הכותרת */
  --wm-asphalt: #5A564E;
  --wm-kerb: #302D28;
  --wm-sign: #164549;
}

/* ═══════════════════════════════════════════════════════════════════════
   §1 — רקע: אותו „אטלס מודפס” של המשחק הראשון, בגרסה שקטה יותר.
   ═══════════════════════════════════════════════════════════════════════ */
body {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.125 0 0 0 0 0.08 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M43.5 0V44M0 43.5H44' stroke='%236E5A3B' stroke-opacity='.05' stroke-width='1' fill='none'/%3E%3C/svg%3E"),
    radial-gradient(92% 62% at 50% 34%, #FAF1DC 0%, #F3E8CD 55%, #E9D6AF 100%);
  background-repeat: repeat, repeat, no-repeat;
  background-size: 240px 240px, 44px 44px, 100% 100%;
  background-attachment: fixed, fixed, fixed;
}

/* ═══ §2 — שלד ═══ */
#wm { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh }
#wm[data-screen="play"] { height: 100vh; height: 100dvh; overflow: hidden }
.wm-screen { display: none }
#wm[data-screen="play"] #wm-play { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0 }
#wm[data-screen="done"] #wm-done { display: flex; flex-direction: column; flex: 1 1 auto }

.wm-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── §12 — הסרגל, מיושר 1:1 ל„איפה זה?” ────────────────────────────
   אותו hairline, אותו gap, אותם אייקונים שקטים בתחילת השורה, אותו מונה
   בסוף. מה שהשתנה מול המשחק הראשון הוא רק מה שחייב להשתנות: שם המשחק
   מקבל סימן לוגו קטן, כי כאן אין שם עולם שיחזיק את המקום. */
.wm-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 5px 14px;
  border-bottom: 1px solid var(--wm-line);
  background: transparent;
}
.wm-util {
  flex: 0 0 auto; width: 30px; height: 30px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px;
  color: var(--ink-soft); cursor: pointer; opacity: .72;
  text-decoration: none; transition: opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.wm-util:first-of-type { margin-inline-start: -6px }
.wm-util svg { width: 19px; height: 19px }
.wm-util:hover { opacity: 1 }
.wm-util:focus-visible { outline: 2px solid var(--sienna); outline-offset: 1px; opacity: 1 }
/* כפתור התפריט המשותף מקבל כאן את מידות הסרגל של המשחק, בלי לגעת ב-nav.css */
.wm-bar .mnav-btn {
  width: 30px; height: 30px; border-radius: 8px;
  color: var(--ink-soft); opacity: .72;
}
.wm-bar .mnav-btn svg { width: 19px; height: 19px }
.wm-bar .mnav-btn:hover { opacity: 1 }

.wm-bar-title {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 7px;
  text-decoration: none; color: inherit;
}
.wm-bar-title img { flex: 0 0 auto; display: block; border-radius: 4px }
.wm-bar-title b {
  font-family: var(--font-display); font-weight: 400; font-size: 15.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* המונה יושב בקצה כ-slot גמיש: אפשר יהיה להחליף אותו במשהו אחר בעתיד
   בלי לגעת בשאר הסרגל. */
.wm-count {
  flex: 0 0 auto; min-width: 46px; text-align: end;
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  /* „1 / 48” ולא „48 / 1”: אלגוריתם ה-bidi הופך מספר-לוכסן-מספר ב-RTL. */
  direction: ltr; unicode-bidi: isolate;
}

/* ── §2 — מיניאטורת הרגל הנוכחית ────────────────────────────────────
   לא progress bar. זו חתיכה קטנה מאותו מסלול שיופיע על מפת האטלס בסוף
   הרגל — אותה סיינה, אותם דשים, אותה טבעת. ה-handshake הזה הוא כל
   הרעיון: את הקו שנבנה כאן צריך לזהות שם, בלי שנסביר.

   הפס הגלובלי של 48 החידות ירד מהמסך בכוונה. יש מערכת אחת בשלוש רמות
   zoom — עכשיו, תחנה, סיום — ולא שלושה מדדים שמתחרים זה בזה. */
.wm-route { flex: 0 0 auto; display: flex; align-items: center; gap: 3px }
.wm-r-start {
  width: 8px; height: 8px; border-radius: 50%; background: #7A2F10;
  box-shadow: 0 0 0 1.5px var(--wm-piece-bg);
}
.wm-r-dash {
  width: 5px; height: 2.6px; border-radius: 2px;
  background: rgba(110, 90, 59, .28); transition: background-color .2s ease;
}
.wm-r-dash.is-on { background: #7A2F10 }
.wm-r-ring {
  width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box;
  border: 2.2px solid var(--sienna); background: transparent;
}
/* הטבעת מתמלאת רק כשהרגל נסגרת — ואז נוחתת אותה חותמת על המפה. */
.wm-r-ring.is-on { background: var(--sienna); animation: wmpop .34s cubic-bezier(.2, .85, .25, 1) }
@keyframes wmpop { from { transform: scale(1.15) } to { transform: scale(1) } }

/* ── לוחית התרשים: „איור בתוך עמוד תרגילים” ─────────────────────────
   זה מה שמפריד ויזואלית בין המשחק הזה למפה מלאת המסך של „איפה זה?”. */
.wm-board {
  flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden;
  margin: 10px 14px 0; padding: 16px 18px;
  background: rgba(249, 241, 221, .62);
  border: 1px solid var(--rule); border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 2px 10px rgba(46, 32, 20, .06);
}

/* ── §2 — ה-DNA של החתיכה ───────────────────────────────────────────
   גיאומטריה אחת לכל המשחק. הרוחב מגיע מהתא ולא מהטקסט: זו הסיבה
   ש„עכו” ו„ראש הנקרה” הן אותו מלבן. */
.wm-slot { position: relative; display: block }
.wm-piece {
  display: grid; place-items: center; box-sizing: border-box;
  width: 100%; height: 44px; padding: 0 8px;
  border: 1.5px solid var(--wm-line); border-radius: 10px;
  background: var(--wm-piece-bg); color: var(--ink);
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(46, 32, 20, .07);
}

/* ── §3 — ה-DNA של החור ─────────────────────────────────────────────
   חתימה אחת בכל חמשת המבנים: נייר אטום, מסגרת מקווקוות בסיינה, וסימן
   שאלה ב-Suez One. הרקע אטום בכוונה — בתוך שלט ירוק הוא חייב לקרוא
   כחור בנייר ולא כשקיפות. */
.wm-piece.is-empty {
  background: var(--wm-piece-bg);
  border: 2px dashed var(--sienna);
  color: var(--sienna);
  box-shadow: none;
}
.wm-q {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 18px; line-height: 1; opacity: .85;
}

/* ── §11 — האזור התחתון: מגש ו-reveal חולקים מקום אחד ───────────────
   המגש יושב בזרימה רגילה, צמוד ללוח. ה-reveal פרוש עליו ב-absolute
   ולכן אינו תופס מקום — הוא מופיע ונעלם בלי לגעת בגובה הלוח. המגש
   הופך ל-visibility:hidden ולא ל-display:none, וכך שומר על גובה האזור.
   אפס layout shift ב-hero. */
.wm-bottom {
  flex: 0 0 auto; position: relative; min-height: 136px;
  padding-bottom: calc(2px + env(safe-area-inset-bottom));
}
.wm-say {
  position: absolute; inset: 0;
  padding: 6px 20px calc(6px + env(safe-area-inset-bottom)); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  visibility: hidden;
}
.wm-say.is-on { visibility: visible; animation: wmrise .26s ease-out }
#wm.is-answered .wm-tray { visibility: hidden }
.wm-reveal { font-size: 14.5px; line-height: 1.4; color: var(--ink); max-width: 42ch; text-wrap: balance }
/* §11 — ארבעה-עשר פיקסלים בין המשפט לכפתור. לא פחות, כדי שהמשפט
   ייקרא עד הסוף לפני שהעין קופצת ל„הבא”. */
.wm-next {
  margin-top: 14px;
  padding: 11px 34px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--sienna); color: #FBF3E0; font: 700 15.5px var(--font);
  box-shadow: 0 2px 0 rgba(113, 41, 11, .55);
}
.wm-next:hover { background: var(--sienna-deep) }
.wm-next:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(113, 41, 11, .55) }
.wm-next:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px }
.wm-station-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  color: var(--ink-soft); margin-bottom: 6px;
}
@keyframes wmrise { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

/* ── §9 — המגש: רשת 2×2 קשיחה ───────────────────────────────────────
   עמודות שוות, שורות שוות, ואפס גיאומטריה שנגזרת מהתוכן. אין כאן
   „רמזי דקדוק” תלויים באורך הטקסט: מה שמבדיל בין המשפחות הוא הלוח,
   והחומר של החתיכה — לא עמוד שתלוי מתחת לכפתור. */
.wm-tray {
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 44px;
  gap: 10px; padding: 10px 14px 0;
}
.wm-opt {
  display: block; width: 100%; height: 100%;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wm-opt:active .wm-piece { transform: scale(.97) }
.wm-opt:focus-visible { outline: 2px solid var(--sienna); outline-offset: 2px; border-radius: 12px }
.wm-opt[disabled] { cursor: default }
.wm-tray.is-locked { pointer-events: none; opacity: .45; transition: opacity .3s .35s }

.wm-ghost {
  z-index: 90; pointer-events: none; transform-origin: top left;
  transition: transform .38s cubic-bezier(.2, .85, .25, 1),
              width .38s cubic-bezier(.2, .85, .25, 1),
              height .38s cubic-bezier(.2, .85, .25, 1);
}


/* ═══════════════════════════════════════════════════════════════════════
   §4 · northSouth — ציר אחד, נקודות, שמות, חור.
   בלי קווי סרגל, בלי ticks, בלי מפה. המסר היחיד הוא סדר מצפון לדרום,
   וזה בדיוק מה שמפריד אותו מ-elevation: שם הגובה הוא נתון, כאן הוא לא.
   ═══════════════════════════════════════════════════════════════════════ */
.wm-ns { position: absolute; inset: 16px 18px; display: flex; flex-direction: column; align-items: center }
.wm-nscap {
  display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1;
  font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink-soft);
}
.wm-nscap i { font-style: normal; font-size: 10px; color: var(--sienna) }
.wm-nsline {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; padding: 12px 0;
}
.wm-nsspine {
  position: absolute; top: 4px; bottom: 4px; right: 6px; width: 3px;
  background: var(--ink); border-radius: 2px;
}
.wm-nsrow { display: flex; align-items: center; gap: 14px }
.wm-nsdot {
  flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; position: relative; z-index: 1;
  background: var(--wm-piece-bg); border: 3px solid var(--ink);
}
.wm-nsdot.is-empty { border-style: dashed; border-color: var(--sienna) }
.wm-nsrow .wm-slot { width: 138px; flex: 0 0 auto }


/* ═══════════════════════════════════════════════════════════════════════
   §5 · elevation — כאן המספר הוא לב החידה.

   ההיררכיה מפורשת: קודם הערך, אחר כך שם המקום, ורק אז הגיאומטריה.
   היחידה מופיעה פעם אחת בלבד — על קו האפס — ולא חוזרת על כל כרטיס.
   ═══════════════════════════════════════════════════════════════════════ */
.wm-elev { position: absolute; inset: 16px 18px }
.wm-ground {
  position: absolute; left: -18px; right: -18px; bottom: -16px; height: 16px;
  background: rgba(74, 55, 34, .16); border-top: 2.5px solid rgba(74, 55, 34, .55);
}
.wm-water {
  position: absolute; left: -18px; right: -18px; bottom: 0;
  background: linear-gradient(180deg, rgba(31, 100, 104, .17), rgba(31, 100, 104, .04));
}
.wm-sealine { position: absolute; left: -18px; right: -18px; border-top: 1.6px dashed rgba(31, 100, 104, .8) }
.wm-sealine span {
  position: absolute; right: 20px; top: 3px;
  font-size: 10.5px; font-weight: 800; color: var(--teal);
}
.wm-climb { position: absolute; inset: 0; width: 100%; height: 100% }
.wm-climb polyline {
  fill: none; stroke: rgba(156, 63, 22, .28); stroke-width: 2; stroke-dasharray: 4 6;
  vector-effect: non-scaling-stroke;
}
.wm-col {
  position: absolute; bottom: 0; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(156, 63, 22, .26), rgba(156, 63, 22, .04));
  border-top: 3.5px solid var(--sienna);
  transition: height .48s cubic-bezier(.2, .85, .25, 1);
}
/* עמוד החור — hatch מקווקו, כדי שהחור ייקרא כחור גם בגובה וגם בשם */
.wm-col.is-empty {
  border-top: 3px dashed var(--sienna);
  background: repeating-linear-gradient(45deg, rgba(156, 63, 22, .12) 0 5px, transparent 5px 11px);
}
.wm-col .wm-slot { position: absolute; bottom: 100%; left: -16%; right: -16%; margin-bottom: 8px }

/* הכרטיס של הגובה הוא היחיד שאינו שורת טקסט אחת: הוא מספר וכותרת
   משנה. הגובה נשאר 44 בדיוק כמו כל חתיכה אחרת. */
.wm-piece--elev { padding: 0 4px; line-height: 1 }
.wm-piece--elev .wm-v {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: 21px; line-height: 1.05; color: var(--wm-elev-ink);
  /* המספר תמיד LTR: אחרת „−430” נקרא „430−” בתוך פסקה עברית. */
  direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums;
}
.wm-piece--elev .wm-n {
  display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2;
  color: var(--ink-soft); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis;
}
/* במגש אין מספר — אחרת השאלה הופכת מ„מה גבוה” ל„מי גדול מ-780”. */
.wm-tray .wm-piece--elev .wm-n { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 }


/* ═══════════════════════════════════════════════════════════════════════
   §6 · כביש — משפחה ויזואלית אחת, שני מבנים.
   אותו אספלט, אותם סימוני דרך, אותם שלטים ירוקים, אותן מגינות מספר,
   אותם חצים. מה שמשתנה הוא הצורה: צומת מול התפצלות.
   ═══════════════════════════════════════════════════════════════════════ */
.wm-roadsvg { position: absolute; inset: 0; width: 100%; height: 100% }
.wm-kerb {
  fill: none; stroke: var(--wm-kerb); stroke-width: 34; stroke-linecap: round;
  stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.wm-asphalt {
  fill: none; stroke: var(--wm-asphalt); stroke-width: 28; stroke-linecap: round;
  stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.wm-center {
  fill: none; stroke: #F6EFDC; stroke-width: 2.6; stroke-dasharray: 10 13;
  vector-effect: non-scaling-stroke;
}
/* השלט הירוק — אותו חומר בשני המבנים */
.wm-piece--road {
  background: var(--wm-sign); color: #F6EFDC; border: 1.5px solid #0D2C2F;
  box-shadow: inset 0 0 0 1.5px rgba(246, 239, 220, .45), 0 1px 2px rgba(0, 0, 0, .25);
  font-weight: 800;
}
.wm-piece--road.is-empty {
  background: var(--wm-piece-bg); color: var(--sienna);
  border: 2px dashed var(--sienna); box-shadow: none;
}
/* לוחית הנייר: „מאיפה יצאתי” ו„איזה צומת”. לא יעד — הקשר. */
.wm-piece--paper {
  background: var(--wm-piece-bg); color: var(--ink);
  border: 1.5px solid var(--wm-line); font-weight: 700;
}
.wm-num, .wm-fnum {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px;
  background: #F9F1DD; border: 2px solid #2E2014; border-radius: 4px;
  font-family: var(--font-display); font-size: 13px; color: #2E2014; line-height: 1;
  direction: ltr; unicode-bidi: isolate;
}

/* ── מבנה 1 · צומת ──────────────────────────────────────────────────
   הכביש החוצה יושב ב-38% מגובה הלוח, כדי ששני השלטים העליונים והזרוע
   המסתעפת יחלקו את הלוח ולא ישאירו חצי מסך ריק. */
.wm-roadt { position: absolute; inset: 16px 18px }
.wm-jname {
  position: absolute; top: calc(38% + 24px); left: 0; z-index: 3;
  width: 44%; max-width: 170px;
}
.wm-tsign {
  position: absolute; width: 45%; z-index: 2; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.wm-tsign.is-s { flex-direction: column-reverse }
.wm-tsign .wm-slot { width: 100% }
.wm-tarrow { display: block; width: 0; height: 0 }
/* auto-margin ולא align-self: ב-RTL הצירים מתהפכים, וחץ שמצביע מזרחה
   חייב לשבת בקצה הימני של השלט בלי קשר לכיוון הכתיבה. */
.wm-tsign.is-e .wm-tarrow {
  margin-left: auto; margin-right: 0;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-left: 12px solid var(--wm-kerb);
}
.wm-tsign.is-w .wm-tarrow {
  margin-right: auto; margin-left: 0;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-right: 12px solid var(--wm-kerb);
}
.wm-tsign.is-s .wm-tarrow {
  margin: 0 auto;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 12px solid var(--wm-kerb);
}

/* ── מבנה 2 · מזלג — שער שילוט ──────────────────────────────────────
   ══ שמירה סמנטית, ולא החלטה אסתטית ══
   שני הענפים הם שתי אפשרויות דרך, לא צפון ודרום. לכן שני השלטים
   מתחילים בדיוק באותו Y, והמיקום האנכי *בין* שני השלטים אינו מקודד
   שום דבר גיאוגרפי. הסדר קיים רק *בתוך* שלט אחד: גבוה יותר = רחוק
   יותר על אותה דרך.

   בגרסה קודמת הערים היו פזורות על הענפים עצמם, ונתניה נראתה צפונית
   לנהריה. זו הייתה שגיאה סמנטית, לא רק אסתטית — והמבנה הזה חוסם אותה
   מראש, גם אם תוכן החידות ישתנה.

   המזלג שמתחת הוא מבט נהג ודקורטיבי בלבד. אין להציב עליו ערים.
   ═══════════════════════════════════════════════════════════════════ */
.wm-fork { position: absolute; inset: 16px 18px; display: flex; flex-direction: column }
.wm-gantry { flex: 0 0 auto; display: flex; align-items: stretch; gap: 12px; position: relative; z-index: 3 }
.wm-gsign {
  flex: 1 1 0; min-width: 0; position: relative;
  background: var(--wm-sign); border: 1.5px solid #0D2C2F; border-radius: 8px;
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: inset 0 0 0 1.5px rgba(246, 239, 220, .38), 0 2px 3px rgba(0, 0, 0, .22);
}
.wm-ghead { display: flex; align-items: center; justify-content: space-between; gap: 6px }
/* החץ יושב בצד שאליו הוא מצביע: בשלט הימני מימין, בשמאלי משמאל. */
.wm-gsign.is-r .wm-ghead { flex-direction: row-reverse }
.wm-garr { flex: 0 0 auto; width: 20px; height: 20px; color: #F6EFDC; opacity: .9 }
.wm-garr svg { width: 20px; height: 20px; display: block }
.wm-gsign.is-l .wm-garr svg { transform: scaleX(-1) }
.wm-gslots { display: flex; flex-direction: column; gap: 6px }
/* החריג היחיד ל-DNA: בתוך השלט הגובה 38 וה-radius 8 — וכל ה-slots
   באותו שלט זהים לחלוטין. */
.wm-gsign .wm-piece { height: 38px; border-radius: 8px; font-size: 14.5px }
/* עמוד השלט — מחבר ויזואלית כל שלט לענף שלו */
.wm-gsign::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  width: 7px; height: 26px; background: var(--wm-kerb); z-index: -1;
}
.wm-forkroad { flex: 1 1 auto; min-height: 0; position: relative; margin-top: 18px }
.wm-forkroad svg { position: absolute; inset: 0; width: 100%; height: 100% }
.wm-forkroad .wm-fpave { fill: var(--wm-asphalt); stroke: var(--wm-kerb); stroke-width: 3;
  stroke-linejoin: round; vector-effect: non-scaling-stroke }
.wm-forkroad .wm-fmark { fill: none; stroke: #F6EFDC; stroke-width: 2.4; stroke-dasharray: 9 12;
  vector-effect: non-scaling-stroke; opacity: .85 }
.wm-fstem {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 52%; max-width: 190px; z-index: 3;
}


/* ═══════════════════════════════════════════════════════════════════════
   §7 · water — זרימה. לא theme כחול נפרד: אותו נייר, עם רמז ציאן על
   הקצה ושני חצים קטנים שאומרים לאן זה הולך.
   ═══════════════════════════════════════════════════════════════════════ */
.wm-water-g { position: absolute; inset: 16px 18px }
.wm-flowsvg { position: absolute; inset: 0; width: 100%; height: 100% }
.wm-flow { fill: none; stroke: #2E7F86; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .92 }
.wm-flow.is-trib { stroke-width: 4px; opacity: .58 }
.wm-farr {
  position: absolute; z-index: 2; width: 0; height: 0;
  transform: translate(-50%, -50%);
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-top: 7px solid var(--wm-piece-bg);
}
.wm-pool {
  position: absolute; left: -18px; right: -18px; bottom: -16px; height: 22%;
  background: linear-gradient(180deg, rgba(46, 127, 134, .08), rgba(46, 127, 134, .3));
  border-top: 2px solid rgba(46, 127, 134, .4);
}
.wm-wdot {
  position: absolute; width: 13px; height: 13px; border-radius: 50%; z-index: 3;
  background: var(--wm-piece-bg); border: 3px solid var(--teal); transform: translate(-50%, -50%);
}
.wm-wdot.is-empty { border-style: dashed; border-color: var(--sienna) }
.wm-wnode { position: absolute; transform: translateY(-50%); z-index: 3; width: 120px }
/* רמז חומר, לא ערכת צבע: קצה ציאן דק בלבד */
.wm-piece--wat { border-color: rgba(31, 100, 104, .45); box-shadow: inset 2px 0 0 rgba(46, 127, 134, .55), 0 1px 2px rgba(31, 100, 104, .12) }
.wm-piece--wat.is-empty { box-shadow: none }


/* ═══════════════════════════════════════════════════════════════════════
   §4 · עמוד האטלס — תחנה וסיום.

   אותה סיינה, אותם דשים, אותה חותמת שנסגרה לפני רגע בסרגל. אין כאן שפה
   גרפית שנייה: זה בדיוק אותו מסלול, רק ב-zoom אחר.
   ═══════════════════════════════════════════════════════════════════════ */
.wm-atlas { position: absolute; inset: 8px; display: grid; place-items: center }
.wm-atlas svg { width: 100%; height: 100%; display: block }
.wm-at-land {
  fill: rgba(233, 216, 176, .5); stroke: rgba(46, 32, 20, .45);
  stroke-width: 1.6; vector-effect: non-scaling-stroke;
}
.wm-at-leg { fill: none; stroke-width: 4.5; stroke-linecap: round; vector-effect: non-scaling-stroke }
.wm-at-leg.is-future { stroke: rgba(110, 90, 59, .3); stroke-dasharray: 5 8 }
.wm-at-leg.is-done, .wm-at-leg.is-new { stroke: #7A2F10 }
.wm-at-start {
  fill: #7A2F10; stroke: var(--wm-piece-bg); stroke-width: 3; vector-effect: non-scaling-stroke;
}
/* חותמת תחנה — הטבעת המלאה, בדיוק כמו בסרגל */
.wm-at-stamp {
  fill: var(--sienna); stroke: var(--wm-piece-bg); stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}
.wm-at-stamp.is-new { opacity: 0 }
.wm-at-stamp.is-new.is-in {
  opacity: 1; transform-box: fill-box; transform-origin: center;
  animation: wmpop .34s cubic-bezier(.2, .85, .25, 1);
}


/* ═══════════════════════════════════════════════════════════════════════
   §10 · מצבים — זהים בכל המשפחות, ובאותה שפה של „איפה זה?”.
   נכון = teal. שגוי = רעד ומסגרת סיינה, ואז הנכונה מתיישבת.
   אין עונש, אין אדום צועק, ואין ירוק זית.
   ═══════════════════════════════════════════════════════════════════════ */
.wm-slot.is-right .wm-piece {
  border-color: #174F52;
  box-shadow: 0 0 0 3px rgba(31, 100, 104, .30), 0 1px 2px rgba(23, 79, 82, .25);
}
.wm-slot.is-right .wm-piece--road { border-color: #9AD7D2 }
.wm-slot.is-wrong .wm-piece {
  border-color: var(--sienna);
  box-shadow: 0 0 0 3px rgba(156, 63, 22, .28), 0 1px 2px rgba(46, 32, 20, .2);
  animation: wmshake .4s ease-in-out;
}
.wm-slot.is-swap { opacity: 0; transition: opacity .22s }
@keyframes wmshake {
  0%, 100% { transform: translateX(0) } 20% { transform: translateX(-5px) }
  40% { transform: translateX(5px) } 60% { transform: translateX(-3px) } 80% { transform: translateX(3px) }
}


/* ═══════════════════════════════════════════════════════════════════════
   §F — מסך הסיום
   ═══════════════════════════════════════════════════════════════════════ */
.wm-done { padding: 24px 20px 40px; max-width: 560px; margin: 0 auto; width: 100%; text-align: center }
.wm-done-eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: var(--ink-soft);
  margin-bottom: 8px;
}
.wm-board-card {
  background: rgba(249, 241, 221, .62); border: 1px solid var(--rule); border-radius: 16px;
  padding: 22px 18px; box-shadow: 0 2px 10px rgba(46, 32, 20, .06);
}
.wm-done-title {
  font-family: var(--font-display); font-size: clamp(26px, 7.6vw, 36px); line-height: 1.14;
  color: var(--ink); margin-bottom: 18px; text-wrap: balance;
}
.wm-done-atlas { position: relative; height: min(44vh, 330px); margin: 0 auto 14px }
.wm-done-atlas .wm-atlas { position: absolute; inset: 0 }
/* הציון מופיע כאן, ורק כאן — פעם ראשונה במשחק. */
.wm-score {
  font-family: var(--font-display); font-size: clamp(19px, 5.4vw, 24px); line-height: 1.25;
  color: var(--sienna);
}
.wm-verdict {
  font-size: 15.5px; line-height: 1.55; color: var(--ink); margin: 16px auto 0;
  max-width: 40ch; text-wrap: balance;
}
.wm-go {
  display: block; margin: 22px auto 0; max-width: 340px; padding: 14px 24px;
  border-radius: 12px; background: var(--sienna); color: #FBF3E0; text-decoration: none;
  font-weight: 700; font-size: 16.5px; box-shadow: 0 2px 0 rgba(113, 41, 11, .55);
}
.wm-go:hover { background: var(--sienna-deep) }
.wm-actions { display: flex; gap: 10px; margin-top: 12px; justify-content: center; flex-wrap: wrap }
.wm-btn {
  padding: 11px 20px; border: 1px solid var(--wm-line); border-radius: 12px;
  background: #FAF3E2; color: var(--ink); font: 700 14.5px var(--font);
  cursor: pointer; text-decoration: none;
}
.wm-btn:hover { border-color: var(--sienna); color: var(--sienna) }
.wm-btn:focus-visible, .wm-go:focus-visible { outline: 2px solid var(--sienna); outline-offset: 2px }


/* ═══ §14 — מסכים גדולים. אותה מערכת, בלי עיצוב דסקטופ נפרד. ═══ */
@media (min-width: 620px) {
  #wm[data-screen="play"] { max-width: 560px; margin: 0 auto }
  .wm-board { margin: 12px 0 0 }
  .wm-tray { padding: 10px 0 0 }
  .wm-bar { padding: 5px 2px }
}

/* ═══ §13 — מסכים נמוכים ═══ */
@media (max-height: 680px) {
  .wm-board { margin-top: 8px; padding: 12px 14px }
  .wm-ns, .wm-elev, .wm-roadt, .wm-fork, .wm-water-g { inset: 12px 14px }
  .wm-nscap { font-size: 10px }
  .wm-reveal { font-size: 14px }
  .wm-next { margin-top: 12px; padding: 9px 28px }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
