/* =========================================================
   station3Aqueduct.css
   שלב א׳ - אמת המים השבורה: לוח 4×4 אריחים מסתובבים על גבי
   הפאנל האבני השמאלי ברקע חדר המים.

   *** תיקון קריטי: direction:ltr על הלוח ***
   הדף כולו dir="rtl", ולוח ה-CSS Grid (ללא דירקטיבה מפורשת משלו)
   ירש את זה - כך שעמודה 0 הייתה מצוירת בפועל בצד הפיזי הימני,
   ועמודה 3 בצד הפיזי השמאלי (אומת ישירות ב-getBoundingClientRect
   בבדיקה אמיתית). מכיוון שסמל "E" (מזרח, col+1) בזרועות המים נבנה
   תמיד כלפי הצד הפיזי הימני של האריח עצמו (ראו .tile-water-arm-e),
   זה יצר אי-התאמה של ממש: זרועות המים לא היו מצביעות בפועל לעבר
   האריח השכן הנכון. עם direction:ltr כאן, עמודה 0 (המעיין) יושבת
   בצד הפיזי השמאלי ועמודה 3 (השער) בצד הפיזי הימני - תואם בדיוק
   לדרישה "המקור בצד שמאל, היעד בצד ימין", וכל המצפן הלוגי (N/E/S/W)
   הופך עקבי עם המסך בפועל בכל מקום (זרועות, חצי רמזים, תוויות).
   ========================================================= */

.aqueduct-board-wrap {
  position: absolute;
  z-index: 2;
  left: 9%; /* מוזז מעט ימינה מהמקורי (6.5%) כדי לפנות מרווח בטוח לתווית המעיין המחוברת - ראו .aqueduct-source-mark */
  top: 16%;
  width: 26%;
  height: 46%;
}

.aqueduct-board {
  position: absolute;
  inset: 0;
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(2px, 0.3vw, 5px);
  background: rgba(10, 8, 6, 0.35);
  border: 2px solid rgba(120, 90, 50, 0.4);
  border-radius: 6px;
  padding: clamp(3px, 0.4vw, 6px);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 10px 24px rgba(0, 0, 0, 0.5);
  transition: filter 300ms ease;
}

/* עמעום קל של האריחים הלא-רלוונטיים בזמן רמז 1 - בלי לגעת באריח
   שממנו יוצאת הזרימה כרגע (hint-focus-tile נשאר בהיר). */
.aqueduct-board.is-hint-dimmed .channel-tile:not(.hint-focus-tile) {
  filter: brightness(0.5) saturate(0.7);
  transition: filter 300ms ease;
}

/* ===================== סימוני מקור/יעד - תווית מחוברת פיזית לנקודה ===================== */
/* col 0 (המעיין) יושבת כעת בצד הפיזי השמאלי של הלוח, col 3 (השער)
   בצד הפיזי הימני (בזכות direction:ltr למעלה). כל הקבוצה (תווית +
   קו מחבר + נקודת זוהר) ממוקמת אנכית ב-JS מול השורה בפועל. התווית
   עצמה גדלה כלפי פנים (לא כלפי חוץ) ומוגבלת ברוחב + עוטפת לשתי
   שורות במקרה הצורך - כך שלעולם לא חורגת מגבול המסך, גם בצד
   המעיין שבו השוליים הפנויים צרים יחסית (נבדק בפועל ב-1366/1920). */
.aqueduct-mark {
  position: absolute;
  z-index: 3;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.aqueduct-source-mark {
  right: 100%;
  flex-direction: row-reverse; /* התווית ראשונה מימין (קרוב לנקודה), גדלה שמאלה לתוך השוליים הפנויים */
}

.aqueduct-dest-mark {
  left: 100%;
}

.aqueduct-mark-connector {
  display: block;
  width: clamp(12px, 1.2vw, 20px);
  height: 2px;
  background: currentColor;
  opacity: 0.75;
  flex-shrink: 0;
}

.aqueduct-source-mark .aqueduct-mark-connector { color: #4fd6e0; }
.aqueduct-dest-mark .aqueduct-mark-connector { color: #e8c27a; }

.aqueduct-mark-glow {
  position: relative;
  display: block;
  width: clamp(13px, 1.4vw, 18px);
  height: clamp(13px, 1.4vw, 18px);
  border-radius: 50%;
  flex-shrink: 0;
}

.aqueduct-mark-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px 4px currentColor;
  animation: aqueductMarkPulse 1800ms ease-in-out infinite;
}

@keyframes aqueductMarkPulse {
  0%, 100% { opacity: 0.7; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.aqueduct-source-mark .aqueduct-mark-glow { color: #4fd6e0; }
.aqueduct-dest-mark .aqueduct-mark-glow { color: #e8c27a; }

.aqueduct-mark-label {
  flex-shrink: 0;
  max-width: 82px;
  font-family: var(--font-heading);
  font-size: clamp(0.64rem, 0.8vw, 0.75rem);
  line-height: 1.25;
  text-align: center;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(6, 9, 10, 0.75);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.aqueduct-source-mark .aqueduct-mark-label {
  color: #a3ecf4;
  border: 1px solid rgba(79, 214, 224, 0.55);
  margin-right: 4px;
}

.aqueduct-dest-mark .aqueduct-mark-label {
  color: var(--color-gold);
  border: 1px solid rgba(232, 194, 122, 0.6);
  margin-left: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .aqueduct-mark-glow::before {
    animation: none !important;
  }
}

/* ===================== כרטיס הוראות קבוע (מתחת ללוח) ===================== */
/* נשאר גלוי כל עוד אמת המים לא נפתרה (JS מסתיר עם .is-solved-hidden
   בסיום) - מיושר לרוחב הלוח עצמו (לא ממורכז למסך), בתוך גבולותיו. */
.aqueduct-instructions-card {
  position: absolute;
  z-index: 3;
  top: calc(16% + 46% + 1.2vh);
  left: 9%;
  width: 26%;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(6, 9, 10, 0.74);
  border: 1px solid rgba(216, 164, 91, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: opacity 300ms ease;
}

.aqueduct-instructions-card.is-solved-hidden {
  opacity: 0;
  pointer-events: none;
}

.aqueduct-instructions-card p {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(0.66rem, 0.8vw, 0.76rem);
  line-height: 1.5;
  color: var(--color-parchment);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.aqueduct-instructions-card strong {
  font-family: var(--font-heading);
  color: var(--color-gold);
  font-weight: 700;
}

/* ===================== אריח בודד ===================== */

.channel-tile {
  position: relative;
  border-radius: 3px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* אריחים אינטראקטיביים בלבד (לא חסומים, לא אריח ההתחלה הנעול) -
   כל משוב הלחיצה/ריחוף/מקלדת מוגבל לכאן במפורש. */
.channel-tile:not(.is-inert) {
  cursor: pointer;
}

.channel-tile:not(.is-inert):hover .channel-tile-art,
.channel-tile:not(.is-inert):focus-visible .channel-tile-art {
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(216, 164, 91, 0.5));
}

.channel-tile:not(.is-inert):hover::before,
.channel-tile:not(.is-inert):focus-visible::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  border: 2px solid rgba(216, 164, 91, 0.75);
  box-shadow: 0 0 10px 2px rgba(216, 164, 91, 0.4);
  pointer-events: none;
  z-index: 2;
}

.channel-tile:focus-visible {
  box-shadow: 0 0 0 2px var(--color-gold), 0 0 10px 2px rgba(232, 194, 122, 0.6);
  z-index: 3;
}

/* משוב לחיצה מיידי - כיווץ קל של תמונת האריח בלבד */
.channel-tile:not(.is-inert):active .channel-tile-art {
  transform: rotate(var(--tile-rotation, 0deg)) scale(0.93);
}

/* סמל סיבוב עדין ליד הפינה, נראה רק בריחוף/פוקוס על אריח פעיל */
.channel-tile-rotate-icon {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 3px;
  width: 16%;
  min-width: 12px;
  max-width: 20px;
  aspect-ratio: 1 / 1;
  opacity: 0;
  transition: opacity 150ms ease;
  color: var(--color-gold);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

.channel-tile-rotate-icon svg {
  width: 100%;
  height: 100%;
}

.channel-tile:not(.is-inert):hover .channel-tile-rotate-icon,
.channel-tile:not(.is-inert):focus-visible .channel-tile-rotate-icon {
  opacity: 0.9;
}

.channel-tile-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(var(--tile-rotation, 0deg));
  transition: transform 200ms ease;
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .channel-tile-art {
    transition: transform 1ms linear;
  }
}

/* אריחים אינרטיים: אריח ההתחלה הנעול (כבר נכון, לא מסתובב) +
   אריחי אבן חסומים - שניהם חייבים להיראות לא-לחיצים בעליל. */
.channel-tile.is-inert {
  cursor: default;
}

.channel-tile.is-inert .channel-tile-art {
  filter: saturate(0.92);
}

.channel-tile.is-start-locked .channel-tile-art {
  filter: brightness(1.05) drop-shadow(0 0 5px rgba(79, 214, 224, 0.35));
}

/* אריחים שכבר ננעלו בסיום הפתרון */
.channel-tile.is-solved-locked {
  cursor: default;
  pointer-events: none;
  filter: brightness(1.08);
}

/* ===================== זרימת מים חיה - SVG שעוקב אחרי מרכז החריטה ===================== */
/* כל אריח מקבל svg יחיד (viewBox 0..100) עם מסלול קבוע לפי סוגו
   (TILE_FLOW_PATH ב-JS) - מסתובב יחד עם תמונת האריח (יורש את
   --tile-rotation מ-.channel-tile ההורה, ראו station3Aqueduct.js).
   ארבע שכבות קו מצוירות זו על זו: זוהר מטושטש -> גוף כחול-עמוק ->
   הבהרה תכולה-לבנה -> קו מקווקו מונפש שמדמה זרימה חיה בפועל. */

.channel-tile-water {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.channel-tile-flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(var(--tile-rotation, 0deg));
  transform-origin: 50% 50%;
  transition: transform 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .channel-tile-flow-svg {
    transition: transform 1ms linear;
  }
}

.channel-tile-flow-svg path {
  fill: none;
  opacity: 0;
}

.flow-glow {
  stroke: #8ff0ff;
  stroke-width: 15;
  stroke-linecap: round;
  filter: blur(3.5px);
  transition: opacity 320ms ease;
}

.flow-body {
  stroke: #1c7ea6;
  stroke-width: 8.5;
  stroke-linecap: round;
  transition: opacity 320ms ease;
}

.flow-highlight {
  stroke: #e3fdff;
  stroke-width: 3;
  stroke-linecap: round;
  transition: opacity 320ms ease 70ms;
}

/* קו מקווקו מונפש (marching dashes) - מדמה זרימה חיה בפועל, לא רק
   קו סטטי. תבנית קצרה יחסית לאורך המסלול (בטווח 0..100) כדי
   שהתנועה תיראה ברורה גם באריח קצר (פינה) וגם ארוך (T/צלב). */
.flow-dash {
  stroke: #f2ffff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
  transition: opacity 260ms ease 200ms;
}

.channel-tile.is-flow-active .flow-glow { opacity: 0.45; }
.channel-tile.is-flow-active .flow-body { opacity: 0.92; }
.channel-tile.is-flow-active .flow-highlight { opacity: 0.9; }
.channel-tile.is-flow-active .flow-dash {
  opacity: 0.85;
  animation: aqueductFlowDash 950ms linear infinite;
}

@keyframes aqueductFlowDash {
  to { stroke-dashoffset: -36; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-glow,
  .flow-body,
  .flow-highlight {
    transition: opacity 1ms linear !important;
  }
  .channel-tile.is-flow-active .flow-dash {
    animation: none !important;
    opacity: 0.6;
  }
}

/* ===================== נקודת עצירה שקטה (frontier) - "כאן הזרימה נעצרת כרגע" ===================== */
/* להבדיל מדליפה (tile-leak-spray, אדום-כחול חד וזמני): זו נקודה
   כחולה רגועה, פועמת ברציפות כל עוד החיבור לא הושלם - לא נעלמת
   מעצמה. ראו "place a small pulsing blue splash at the exact open
   end where the flow currently stops" בבקשת המשתמש. */
.tile-water-frontier {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  margin: -6.5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 240, 250, 0.95) 0%, rgba(90, 200, 220, 0.55) 60%, rgba(90, 200, 220, 0) 80%);
  opacity: 0;
  pointer-events: none;
}

.tile-water-frontier-n { transform: translate(0, -170%); }
.tile-water-frontier-s { transform: translate(0, 70%); }
.tile-water-frontier-e { transform: translate(70%, 0); }
.tile-water-frontier-w { transform: translate(-170%, 0); }

.tile-water-frontier.is-active {
  opacity: 1;
  animation: tileFrontierPulse 1500ms ease-in-out infinite;
}

@keyframes tileFrontierPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9) translate(var(--fx, 0), var(--fy, 0)); }
  50% { opacity: 1; transform: scale(1.35) translate(var(--fx, 0), var(--fy, 0)); }
}

/* דגש חזק זמני (4 שניות) על נקודת העצירה - רמז 1 בלבד. */
.tile-water-frontier.is-emphasized {
  animation: tileFrontierEmphasis 900ms ease-in-out infinite;
}

@keyframes tileFrontierEmphasis {
  0%, 100% { opacity: 0.6; transform: scale(1.1); box-shadow: 0 0 0 0 rgba(150, 235, 245, 0.6); }
  50% { opacity: 1; transform: scale(1.9); box-shadow: 0 0 16px 6px rgba(150, 235, 245, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
  .tile-water-frontier.is-active,
  .tile-water-frontier.is-emphasized {
    animation: none !important;
    opacity: 0.85;
  }
}

/* ===================== נקודת "החיבור הבא" - תמיד גלויה, לא רק ברמז ===================== */
/* הנקודה הבודדת שממש נמצאת על המסלול המכוון (לא כל frontier על
   הלוח, רק זו שממנה יש להמשיך בפועל) - טבעת כחולה בהירה פועמת +
   תווית קטנה. לא חושפת שום כיוון סיבוב - רק "תסתכלו כאן". */
.tile-water-frontier.is-primary {
  width: 20px;
  height: 20px;
  margin: -10px;
  animation: tileFrontierRing 1300ms ease-in-out infinite;
}

@keyframes tileFrontierRing {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(150, 235, 245, 0.55), 0 0 10px 3px rgba(150, 235, 245, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(150, 235, 245, 0), 0 0 16px 5px rgba(150, 235, 245, 0.75);
    transform: scale(1.12);
  }
}

.tile-water-frontier-label {
  position: absolute;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: clamp(0.62rem, 0.75vw, 0.7rem);
  color: #d8fbff;
  background: rgba(6, 9, 10, 0.8);
  border: 1px solid rgba(150, 235, 245, 0.55);
  padding: 2px 7px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 4;
  animation: tileFrontierLabelIn 220ms ease;
}

.tile-water-frontier-label-n { bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-6px); }
.tile-water-frontier-label-s { top: 100%; left: 50%; transform: translateX(-50%) translateY(6px); }
.tile-water-frontier-label-e { right: 100%; top: 50%; transform: translateY(-50%) translateX(-6px); }
.tile-water-frontier-label-w { left: 100%; top: 50%; transform: translateY(-50%) translateX(6px); }

@keyframes tileFrontierLabelIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-water-frontier.is-primary {
    animation: none !important;
    box-shadow: 0 0 10px 3px rgba(150, 235, 245, 0.6);
  }
}

/* פעימה עדינה וחולפת (לא זהב, לא קבועה) על האריח שכדאי לבדוק -
   ברירת מחדל תמיד-פעילה, נבדלת בכוונה מהמסגרת הזהובה החזקה של
   רמז 4 (.hint-target) שדורשת בקשת רמז מפורשת. */
.channel-tile.is-next-tile-pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 5px;
  border: 1.5px solid rgba(150, 235, 245, 0.65);
  box-shadow: 0 0 10px 2px rgba(150, 235, 245, 0.35);
  pointer-events: none;
  z-index: 2;
  animation: nextTilePulse 1100ms ease-in-out 3;
}

@keyframes nextTilePulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .channel-tile.is-next-tile-pulse::after {
    animation: none !important;
    opacity: 0.6;
  }
}

/* ===================== דליפה אמיתית (פורט חשוף שאינו יכול להתחבר לעולם - קיר/חוץ-לוח) ===================== */

.tile-leak-spray {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 245, 250, 0.95) 0%, rgba(120, 210, 225, 0.5) 55%, rgba(120, 210, 225, 0) 78%);
  opacity: 0;
  pointer-events: none;
}

.tile-leak-spray-n { transform: translate(-50%, -190%); }
.tile-leak-spray-s { transform: translate(-50%, 90%); }
.tile-leak-spray-e { transform: translate(90%, -50%); }
.tile-leak-spray-w { transform: translate(-190%, -50%); }

.tile-leak-spray.is-active {
  animation: tileLeakBurst 520ms ease-out;
}

@keyframes tileLeakBurst {
  0% { opacity: 0; width: 8px; height: 8px; }
  25% { opacity: 1; }
  100% { opacity: 0; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-leak-spray.is-active {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* ===================== רמזים חזותיים ===================== */

/* רמז 2+: מסגרת זהב על האריח הבא הרלוונטי (מחושב מחדש בכל פעם -
   לא אריח קבוע). */
.channel-tile.hint-target::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 5px;
  border: 2px solid var(--color-gold);
  box-shadow: 0 0 14px 3px rgba(232, 194, 122, 0.7);
  animation: aqueductHintPulse 1100ms ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes aqueductHintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* חץ כחול קטן שמראה מאיזה צד המים חייבים להיכנס (רמז 2) */
.hint-entry-arrow {
  position: absolute;
  z-index: 3;
  width: 20px;
  height: 20px;
  color: #6fe0ef;
  filter: drop-shadow(0 0 5px rgba(111, 224, 239, 0.85));
  pointer-events: none;
  animation: hintArrowBob 900ms ease-in-out infinite;
}

.hint-entry-arrow svg { width: 100%; height: 100%; }

.hint-entry-arrow-n { top: -22px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.hint-entry-arrow-s { bottom: -22px; left: 50%; transform: translateX(-50%) rotate(0deg); }
.hint-entry-arrow-e { top: 50%; right: -22px; transform: translateY(-50%) rotate(-90deg); }
.hint-entry-arrow-w { top: 50%; left: -22px; transform: translateY(-50%) rotate(90deg); }

@keyframes hintArrowBob {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* חץ זהב - הצד שממנו המים צריכים *לצאת* (רמז 4 בלבד - מבדיל
   בבירור מחץ הכניסה הכחול). אותה גיאומטריית מיקום/סיבוב בדיוק
   כמו .hint-entry-arrow, רק צבע וכיוון-חץ-בסיס הפוכים (מצביע
   כלפי חוץ מהאריח, לא פנימה). */
.hint-exit-arrow {
  position: absolute;
  z-index: 3;
  width: 20px;
  height: 20px;
  color: var(--color-gold);
  filter: drop-shadow(0 0 5px rgba(232, 194, 122, 0.85));
  pointer-events: none;
  animation: hintArrowBob 900ms ease-in-out infinite;
}

.hint-exit-arrow svg { width: 100%; height: 100%; }

.hint-exit-arrow-n { top: -22px; left: 50%; transform: translateX(-50%) rotate(0deg); }
.hint-exit-arrow-s { bottom: -22px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.hint-exit-arrow-e { top: 50%; right: -22px; transform: translateY(-50%) rotate(90deg); }
.hint-exit-arrow-w { top: 50%; left: -22px; transform: translateY(-50%) rotate(-90deg); }

/* הארת פתחי כניסה/יציאה נדרשים על האריח (רמז 3) */
.hint-edge-glow {
  position: absolute;
  z-index: 2;
  background: radial-gradient(circle, rgba(255, 224, 150, 0.95) 0%, rgba(232, 194, 122, 0.4) 60%, rgba(232, 194, 122, 0) 80%);
  border-radius: 50%;
  pointer-events: none;
  animation: hintEdgeGlow 1000ms ease-in-out infinite;
}

.hint-edge-glow-n { top: -6px; left: 50%; width: 24%; height: 24%; transform: translate(-50%, -50%); }
.hint-edge-glow-s { bottom: -6px; left: 50%; width: 24%; height: 24%; transform: translate(-50%, 50%); }
.hint-edge-glow-e { top: 50%; right: -6px; width: 24%; height: 24%; transform: translate(50%, -50%); }
.hint-edge-glow-w { top: 50%; left: -6px; width: 24%; height: 24%; transform: translate(-50%, -50%); }

@keyframes hintEdgeGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* חץ סיבוב מעוגל (רמז 3) - מציע לסובב, לא מסובב אוטומטית */
.hint-rotate-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 46%;
  height: 46%;
  transform: translate(-50%, -50%);
  color: var(--color-gold);
  opacity: 0.85;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.85));
  pointer-events: none;
  animation: hintRotateArrowSpin 1600ms ease-in-out infinite;
}

.hint-rotate-arrow svg { width: 100%; height: 100%; }

@keyframes hintRotateArrowSpin {
  0%, 15% { transform: translate(-50%, -50%) rotate(0deg); }
  50%, 65% { transform: translate(-50%, -50%) rotate(80deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .channel-tile.hint-target::after,
  .hint-entry-arrow,
  .hint-edge-glow,
  .hint-rotate-arrow {
    animation: none !important;
    opacity: 0.85;
  }
}

/* רמז 4 (הצעד הבא): תצוגה מקדימה "רוחנית" של הסיבוב הנכון - קלון
   שקוף-למחצה של תמונת האריח, מסובב ליעד, לא נוגע בסיבוב השמור. */
.channel-tile-ghost {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.55;
  filter: drop-shadow(0 0 10px rgba(150, 235, 245, 0.85)) brightness(1.3) saturate(0);
  animation: ghostPreviewPulse 1400ms ease-in-out infinite;
}

.channel-tile-ghost img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes ghostPreviewPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .channel-tile-ghost {
    animation: none !important;
    opacity: 0.5;
  }
}

/* מצביע "לוחץ" מונפש - הדגמת הפעולה הראשונה בלבד, אחרי סגירת קלף ההסבר */
.aqueduct-tutorial-pointer {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: 26%;
  min-width: 20px;
  max-width: 30px;
  color: #fff3d6;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
  pointer-events: none;
  animation: tutorialPointerClick 1300ms ease-in-out infinite;
}

.aqueduct-tutorial-pointer svg {
  width: 100%;
  height: 100%;
}

@keyframes tutorialPointerClick {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  40% { transform: translate(-50%, -50%) scale(0.82); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .aqueduct-tutorial-pointer {
    animation: none !important;
  }
}

/* ===================== כפתור "איך משחקים?" קבוע ===================== */

.aqueduct-howto-btn {
  position: absolute;
  z-index: 3;
  top: clamp(6px, 1vh, 12px);
  left: clamp(8px, 1.2vw, 16px);
  padding: 5px 14px;
  font-family: var(--font-heading);
  font-size: clamp(0.72rem, 0.85vw, 0.82rem);
  color: var(--color-parchment-dim);
  background: rgba(8, 6, 4, 0.5);
  border: 1px solid rgba(216, 164, 91, 0.4);
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.aqueduct-howto-btn:hover,
.aqueduct-howto-btn:focus-visible {
  color: var(--color-gold);
  border-color: var(--color-gold);
}

/* ===================== כפתור רמז ההצלה (שלב 4) ===================== */

.aqueduct-rescue-btn {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(8px, 1.4vh, 16px);
  transform: translateX(-50%);
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: clamp(0.76rem, 0.92vw, 0.86rem);
  color: var(--color-bronze-light);
  background: rgba(8, 6, 4, 0.55);
  border: 1px solid rgba(216, 164, 91, 0.5);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.aqueduct-rescue-btn:hover,
.aqueduct-rescue-btn:focus-visible {
  color: var(--color-gold);
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(232, 194, 122, 0.4);
}

.aqueduct-rescue-btn[hidden],
.aqueduct-rescue-single-btn[hidden] {
  display: none;
}

/* כפתור "סובבו עבורי את האריח" - מופיע רק אחרי 3 סיבובים שגויים על
   האריח המסומן בזמן שרמז 4 פעיל. מסובב אריח בודד זה בלבד. */
.aqueduct-rescue-single-btn {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(40px, 6vh, 54px);
  transform: translateX(-50%);
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: clamp(0.76rem, 0.92vw, 0.86rem);
  color: #8fe7f5;
  background: rgba(8, 6, 4, 0.6);
  border: 1px solid rgba(120, 220, 235, 0.6);
  border-radius: 6px;
  cursor: pointer;
  animation: rescueSingleBtnIn 300ms ease;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.aqueduct-rescue-single-btn:hover,
.aqueduct-rescue-single-btn:focus-visible {
  color: #fff;
  border-color: #8fe7f5;
  box-shadow: 0 0 12px rgba(120, 220, 235, 0.5);
}

@keyframes rescueSingleBtnIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .aqueduct-rescue-single-btn {
    animation: none !important;
  }
}

/* ===================== פאנל הסבר ראשוני (קלף) ===================== */

.aqueduct-intro-overlay[hidden] {
  display: none;
}

.aqueduct-intro-overlay:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aqueduct-intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 6, 0.78);
}

.aqueduct-intro-card {
  position: relative;
  z-index: 1;
  width: min(480px, 88%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 28px;
  text-align: center;
  background: linear-gradient(160deg, #2c2416 0%, #1a140c 100%);
  border: 2px solid rgba(216, 164, 91, 0.6);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.aqueduct-intro-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--color-gold);
  font-size: 1.2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.aqueduct-intro-text {
  margin: 0;
  color: var(--color-parchment);
  font-size: 0.95rem;
  line-height: 1.7;
}

.aqueduct-intro-demo {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aqueduct-intro-demo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(var(--demo-rotation, 0deg));
  transition: transform 500ms cubic-bezier(0.3, 0.7, 0.4, 1);
  filter: drop-shadow(0 0 10px rgba(216, 164, 91, 0.4));
}

@media (prefers-reduced-motion: reduce) {
  .aqueduct-intro-demo-img {
    transition: transform 1ms linear;
  }
}

/* ===================== הודעת התקדמות/רמז משותפת ===================== */
/* אותו אלמנט (#aqueduct-hint-message) משמש גם להודעות רמז ארוכות
   וגם להודעות התקדמות קצרות אחרי סיבוב - ראו station3.css לעיצוב
   הבסיסי המשותף (.station3-hint-message). */

/* ===================== אווירת חדר המים (לא נוגעת בתמונת הרקע עצמה) ===================== */
/* כל האלמנטים כאן שקופים ללחיצות (pointer-events:none), קלים
   (CSS בלבד, בלי GIF/וידאו), ומכבדים prefers-reduced-motion. שכבה
   עצמאית מעל station3-bg הסטטי - לא נוגעת ב-PNG בשום צורה. */

.station3-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* מוסתרת בכוונה: בדיקה אמיתית הראתה ששכבת אפקטים כללית מעל
     הרקע (כולל ניסיון קודם, station3WaterEffects.css, שהוסר
     לגמרי מהפרויקט) נראית כתקלה גרפית - פסים גדולים שחוצים קירות/
     מדרגות/לוח/גלגל, לא "מים חיים". הרקע חוזר לחלוטין לתמונה
     הסטטית המאושרת; האנימציה היחידה שנותרת היא זו שבתוך חריצי
     אריחי אמת המים עצמם (station3-bg + .channel-tile-flow-svg),
     המוגבלת במדויק לגבולות כל אריח. הקוד כאן נשאר במקום (בלי
     מחיקה) למקרה שדרוש עיון עתידי, אך מוסתר - אין להחזיר אותו
     בלי אישור מפורש. */
  display: none;
}

/* הבהוב אור אבוקות עדין - שכבת גרדיאנט חמה שמשתנה עוצמה לאט,
   לא ספוט-לייט בודד אלא "נשימה" כללית של האור בחדר. */
.ambient-torch-flicker {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 18% 30% at 6% 45%, rgba(255, 170, 90, 0.16) 0%, rgba(255, 170, 90, 0) 70%),
    radial-gradient(ellipse 16% 26% at 94% 42%, rgba(255, 170, 90, 0.14) 0%, rgba(255, 170, 90, 0) 70%),
    radial-gradient(ellipse 20% 24% at 45% 20%, rgba(255, 190, 110, 0.12) 0%, rgba(255, 190, 110, 0) 72%);
  animation: ambientTorchFlicker 3400ms ease-in-out infinite;
}

@keyframes ambientTorchFlicker {
  0%, 100% { opacity: 0.75; }
  22% { opacity: 1; }
  38% { opacity: 0.6; }
  55% { opacity: 0.92; }
  71% { opacity: 0.68; }
  86% { opacity: 0.95; }
}

/* ניצנוץ נע על פני הבריכה - פס אור עדין שזוחל לאט לרוחב האזור
   התחתון (איפה שהבריכה בפועל נמצאת ברקע המאושר). */
.ambient-pool-sheen {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 2%;
  height: 22%;
  background: linear-gradient(100deg, transparent 0%, rgba(160, 230, 245, 0.16) 45%, rgba(220, 250, 255, 0.22) 50%, rgba(160, 230, 245, 0.16) 55%, transparent 100%);
  background-size: 60% 100%;
  animation: ambientPoolSheen 9000ms linear infinite;
  mix-blend-mode: screen;
}

@keyframes ambientPoolSheen {
  0% { background-position: -10% 0; }
  100% { background-position: 130% 0; }
}

/* אדים נסחפים ליד המפל - שני כתמים מטושטשים, נעים לאט ובעוצמה
   נמוכה מאוד, לא מכסים טקסט/לוח. */
.ambient-mist {
  position: absolute;
  top: 28%;
  left: 40%;
  width: 22%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(210, 240, 250, 0.14) 0%, rgba(210, 240, 250, 0) 72%);
  filter: blur(6px);
  animation: ambientMistDrift 12000ms ease-in-out infinite;
}

.ambient-mist-2 {
  top: 40%;
  left: 48%;
  width: 16%;
  height: 16%;
  animation-duration: 15000ms;
  animation-delay: -4000ms;
}

@keyframes ambientMistDrift {
  0%, 100% { transform: translate(0, 0); opacity: 0.7; }
  50% { transform: translate(3%, -2%); opacity: 1; }
}

/* טבעות אדווה קטנות ליד נפילת המים / הבריכה */
.ambient-ripple {
  position: absolute;
  width: 40px;
  height: 14px;
  border: 1.5px solid rgba(200, 240, 250, 0.35);
  border-radius: 50%;
  opacity: 0;
  animation: ambientRipple 4200ms ease-out infinite;
}

.ambient-ripple-1 { left: 44%; bottom: 18%; animation-delay: 0ms; }
.ambient-ripple-2 { left: 52%; bottom: 12%; animation-delay: 1400ms; }
.ambient-ripple-3 { left: 38%; bottom: 22%; animation-delay: 2800ms; }

@keyframes ambientRipple {
  0% { transform: scale(0.4); opacity: 0; }
  15% { opacity: 0.65; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* טיפות מים מזדמנות ליד אבן רטובה */
.ambient-droplet {
  position: absolute;
  width: 3px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(210, 245, 250, 0.9), rgba(140, 210, 230, 0.4));
  opacity: 0;
  animation: ambientDropletFall 3600ms ease-in infinite;
}

.ambient-droplet-1 { left: 8%; top: 30%; animation-delay: 300ms; }
.ambient-droplet-2 { left: 92%; top: 26%; animation-delay: 1900ms; }
.ambient-droplet-3 { left: 44%; top: 12%; animation-delay: 900ms; }

@keyframes ambientDropletFall {
  0% { opacity: 0; transform: translateY(0); }
  8% { opacity: 0.85; }
  40% { opacity: 0.7; transform: translateY(14px); }
  55% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 0; transform: translateY(20px); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-torch-flicker,
  .ambient-pool-sheen,
  .ambient-mist,
  .ambient-ripple,
  .ambient-droplet {
    animation: none !important;
    opacity: 0.5;
  }
  .ambient-ripple {
    display: none;
  }
}

/* מושהה לגמרי כשהדף מוסתר (ראו toggleAqueductAmbientPause ב-JS) */
.station3-ambient.is-paused * {
  animation-play-state: paused !important;
}

/* ===================== הבזק השלמה ===================== */

.gate-open-flash,
.aqueduct-success-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(150, 235, 245, 0.35) 0%, rgba(6, 8, 10, 0) 65%);
  opacity: 0;
}

.aqueduct-success-flash.is-active {
  animation: aqueductSuccessFlash 750ms ease;
}

@keyframes aqueductSuccessFlash {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .aqueduct-success-flash.is-active {
    animation: none !important;
  }
}
