/* ─── התחנה האחרונה · גיליון סגנון ───
   פלטה: לילה #0A0E1F · חצות #16203E · ערפל #2C3A5C
          קרן ירח #F2E8CF · ענבר #E8A54B · אות עצירה #B4432E */

:root {
  --night: #0A0E1F;
  --midnight: #16203E;
  --fog: #2C3A5C;
  --moon: #F2E8CF;
  --amber: #E8A54B;
  --signal: #B4432E;
  --bar-h: clamp(44px, 6vh, 64px);
  --serif: "Frank Ruhl Libre", serif;
  --sans: "Heebo", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

/* ═══ פרטי גימור ═══ */
::selection { background: rgba(232, 165, 75, .85); color: #16110A; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
html { scrollbar-width: thin; scrollbar-color: rgba(232,165,75,.45) #060A18; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #060A18; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232,165,75,.55), rgba(232,165,75,.25));
  border-radius: 6px; border: 2px solid #060A18;
}
::-webkit-scrollbar-thumb:hover { background: rgba(232,165,75,.7); }

body {
  background: var(--night);
  color: var(--moon);
  font-family: var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ מסך פתיחה ═══ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(120% 90% at 50% 30%, #101833 0%, var(--night) 62%, #05070F 100%);
  display: grid; place-items: center;
  transition: opacity 1s ease, visibility 1s;
}
#loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-frame {
  padding: clamp(28px, 5vw, 56px) clamp(36px, 7vw, 88px);
  border: 1px solid rgba(242, 232, 207, .28);
  outline: 1px solid rgba(242, 232, 207, .12);
  outline-offset: 6px;
  animation: loaderIn 1.1s cubic-bezier(.19,1,.22,1) both .1s;
}
.loader-kicker {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.62rem, 1.4vw, .78rem);
  letter-spacing: .42em; color: var(--amber);
  margin-bottom: 1.2em;
}
.loader-title {
  font-weight: 900; line-height: 1.05;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  text-shadow: 0 0 60px rgba(232, 165, 75, .25);
}
.loader-sub {
  margin-top: 1.4em; font-family: var(--sans); font-weight: 200;
  font-size: clamp(.7rem, 1.5vw, .85rem); color: rgba(242,232,207,.55);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes loaderIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: .85; } }

/* ═══ הסצנה ═══ */
#scene { position: fixed; inset: 0; overflow: hidden; z-index: 1; }

.layer { position: absolute; will-change: transform; }
.strip { left: 0; background-repeat: repeat-x; background-position: bottom right; }

.sky {
  inset: 0;
  background:
    radial-gradient(90% 62% at 72% 20%, rgba(64, 84, 140, .30) 0%, transparent 60%),
    linear-gradient(to bottom, #060A18 0%, var(--night) 34%, var(--midnight) 72%, #1C2747 100%);
}

#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.moon {
  position: absolute; top: 9vh; left: 74vw;
  width: clamp(64px, 8.5vw, 118px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #FFFDF4 0%, var(--moon) 52%, #D9CBA6 100%);
  box-shadow:
    0 0 34px 8px rgba(242, 232, 207, .38),
    0 0 120px 46px rgba(242, 232, 207, .14),
    0 0 260px 120px rgba(120, 130, 170, .10);
  will-change: transform;
}
.moon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(14% 14% at 30% 62%, rgba(160,150,120,.5), transparent 70%),
    radial-gradient(10% 10% at 62% 38%, rgba(160,150,120,.4), transparent 70%),
    radial-gradient(8% 8% at 52% 70%, rgba(160,150,120,.35), transparent 70%);
}

.cloud {
  position: absolute; pointer-events: none; filter: blur(26px);
  background: radial-gradient(closest-side, rgba(44, 58, 92, .55), transparent 72%);
}
.cloud-a { top: 6vh; left: -12vw; width: 52vw; height: 20vh; animation: drift 90s linear infinite alternate; }
.cloud-b { top: 22vh; left: 48vw; width: 44vw; height: 16vh; opacity: .7; animation: drift 70s linear infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-6vw); } to { transform: translateX(9vw); } }

#lyr-mountains { bottom: 21vh; height: 36vh; }
#lyr-hills     { bottom: 17vh; height: 30vh; }
#lyr-trees     { bottom: 13vh; height: 34vh; }
#lyr-poles     { bottom: 9vh;  height: 66vh; }
#lyr-track     { bottom: 0;    height: 14vh; }

/* ═══ הרכבת שלנו ═══ */
#lyr-train {
  left: -4vw; right: -4vw; bottom: 2.6vh; height: 27vh;
  background-repeat: repeat-x; background-position: bottom center;
  animation: bob 3.2s ease-in-out infinite;
}
.train-glow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 10vh;
  background: linear-gradient(to top, rgba(232, 165, 75, .10), transparent);
  pointer-events: none;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-2px); }
  65% { transform: translateY(1.4px); }
}

#streaks {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg,
    transparent 0 140px, rgba(242, 232, 207, .05) 140px 148px,
    transparent 148px 300px, rgba(232, 165, 75, .04) 300px 306px);
}

/* ═══ תחנות ═══ */
.station {
  position: absolute; bottom: 11vh; left: 50%;
  width: 0; height: 0; visibility: hidden; will-change: transform;
}
.station .post {
  position: absolute; bottom: 0; left: -3px; z-index: 0;
  width: 6px; height: 28vh; background: #05070F;
  box-shadow: 0 0 0 1px rgba(242,232,207,.04);
}
.station .lamp {
  position: absolute; bottom: 28vh; left: -9px; z-index: 3;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFE9BE 0%, var(--amber) 55%, #8A5A1E 100%);
  box-shadow: 0 0 26px 8px rgba(232, 165, 75, .5), 0 0 90px 40px rgba(232, 165, 75, .14);
  animation: lampFlk 5.5s ease-in-out infinite;
}
@keyframes lampFlk { 0%,100% { opacity: 1; } 41% { opacity: .82; } 43% { opacity: 1; } 78% { opacity: .9; } }
.station .sign {
  position: absolute; bottom: 19.5vh; left: 0; transform: translateX(-50%); z-index: 2;
  background: #0B1226;
  border: 1px solid rgba(232, 165, 75, .55);
  outline: 1px solid rgba(232, 165, 75, .16); outline-offset: 3px;
  padding: .55em 1.5em .6em; text-align: center; white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
}
.station .sign strong {
  display: block; font-weight: 700;
  font-size: clamp(1rem, 2.1vw, 1.5rem); color: var(--moon); letter-spacing: .04em;
}
.station .sign span {
  display: block; font-family: var(--sans); font-weight: 300;
  font-size: clamp(.55rem, 1vw, .68rem); letter-spacing: .34em;
  color: var(--amber); margin-top: .35em;
}
.station-last .sign { border-color: var(--signal); }
.station-last .sign span { color: #D77B60; }

/* ═══ אינטרטייטלים ═══ */
.card {
  position: absolute; z-index: 20;
  top: 38%; left: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 48px));
  text-align: center; pointer-events: none;
  background: rgba(6, 9, 22, .78);
  border: 1px solid rgba(242, 232, 207, .30);
  outline: 1px solid rgba(242, 232, 207, .10); outline-offset: 7px;
  padding: clamp(26px, 4.5vh, 48px) clamp(22px, 4vw, 52px);
  opacity: 0; visibility: hidden;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.card-open { opacity: 1; visibility: visible; }
.card-label {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.6rem, 1.3vw, .74rem); letter-spacing: .42em;
  color: var(--amber); margin-bottom: 1.1em;
}
.card-title {
  font-weight: 900; line-height: 1.12;
  font-size: clamp(1.7rem, 4.6vw, 3.1rem);
  margin-bottom: .45em;
  text-shadow: 0 0 44px rgba(232, 165, 75, .18);
}
.card-text {
  font-weight: 400; line-height: 1.95;
  font-size: clamp(.98rem, 2vw, 1.22rem);
  color: rgba(242, 232, 207, .88);
  max-width: 44ch; margin: 0 auto;
}
.card-orn { margin-top: 1.1em; color: rgba(232, 165, 75, .6); font-size: .8rem; letter-spacing: .6em; }

/* ═══ רמז גלילה ═══ */
#hint {
  position: absolute; z-index: 22; bottom: 31.5vh; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.66rem, 1.4vw, .8rem); letter-spacing: .3em;
  color: rgba(242, 232, 207, .72);
  text-shadow: 0 2px 14px rgba(4, 6, 15, .9);
  transition: opacity .7s ease;
}
#hint i {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, transparent, var(--amber));
  animation: hintDrop 1.8s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes hintDrop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
#hint.gone { opacity: 0; }

/* ═══ שכבות קולנוע ═══ */
#vignette {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: radial-gradient(115% 85% at 50% 45%, transparent 52%, rgba(3, 5, 12, .55) 88%, rgba(2, 3, 8, .8) 100%);
}
#grain {
  position: fixed; inset: -60px; z-index: 31; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift .45s steps(3) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-24px, 14px); }
  66% { transform: translate(18px, -20px); }
  100% { transform: translate(0, 0); }
}
#flicker {
  position: fixed; inset: 0; z-index: 32; pointer-events: none;
  background: #F2E8CF; opacity: .012; mix-blend-mode: overlay;
  animation: flick 4.2s steps(1) infinite;
}
@keyframes flick {
  0% { opacity: .012; } 8% { opacity: .03; } 9% { opacity: .01; }
  37% { opacity: .026; } 38% { opacity: .012; } 71% { opacity: .034; }
  72% { opacity: .015; } 100% { opacity: .012; }
}

/* ═══ פסי לטרבוקס ═══ */
.bar {
  position: fixed; left: 0; right: 0; z-index: 70;
  height: var(--bar-h); background: #04060F;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 36px);
  font-family: var(--sans);
  transition: transform 1.1s cubic-bezier(.19,1,.22,1);
}
.bar-top { top: 0; box-shadow: 0 1px 0 rgba(242,232,207,.07); transform: translateY(-100%); }
.bar-bottom { bottom: 0; box-shadow: 0 -1px 0 rgba(242,232,207,.07); transform: translateY(100%); gap: 2vw; }
body.ready .bar { transform: translateY(0); }

.bar-title { display: flex; align-items: baseline; gap: 12px; }
.bar-title strong { font-family: var(--serif); font-weight: 700; font-size: clamp(.9rem, 1.8vw, 1.06rem); }
.bar-title span { font-weight: 200; font-size: .62rem; letter-spacing: .34em; color: var(--amber); }
.bar-link {
  color: rgba(242, 232, 207, .75); text-decoration: none;
  font-weight: 300; font-size: clamp(.7rem, 1.4vw, .8rem); letter-spacing: .16em;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color .3s, border-color .3s;
}
.bar-link:hover { color: var(--amber); border-color: rgba(232, 165, 75, .5); }

.bar-nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.bar-nav a {
  position: relative; color: rgba(242, 232, 207, .6); text-decoration: none;
  font-weight: 300; font-size: .74rem; letter-spacing: .18em;
  padding: .45em 0; transition: color .35s;
}
.bar-nav a::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: 0; height: 1px;
  background: var(--amber); transform: scaleX(0); transform-origin: center;
  transition: transform .4s cubic-bezier(.19,1,.22,1);
}
.bar-nav a:hover, .bar-nav a.active { color: var(--amber); }
.bar-nav a:hover::after, .bar-nav a.active::after { transform: scaleX(1); }

.bar-status {
  font-weight: 300; font-size: clamp(.62rem, 1.3vw, .74rem);
  letter-spacing: .2em; color: rgba(242, 232, 207, .78); white-space: nowrap;
}
.bar-note { font-weight: 200; font-size: .62rem; letter-spacing: .26em; color: rgba(242, 232, 207, .34); white-space: nowrap; }

.route { flex: 1; max-width: 460px; position: relative; height: 14px; }
.route-line {
  position: absolute; top: 6px; left: 0; right: 0; height: 2px;
  background: rgba(242, 232, 207, .14);
}
.route-fill {
  position: absolute; top: 0; right: 0; height: 100%; width: 100%;
  background: linear-gradient(to left, var(--amber), #C97F2E);
  transform: scaleX(0); transform-origin: right;
  box-shadow: 0 0 8px rgba(232, 165, 75, .6);
}
.route-dots { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.route-dots .dot {
  width: 7px; height: 7px; border-radius: 50%; margin-top: 3.5px;
  background: #232C4A; border: 1px solid rgba(242, 232, 207, .25);
  transition: background .4s, box-shadow .4s;
}
.route-dots .dot.active {
  background: var(--amber); border-color: var(--amber);
  box-shadow: 0 0 10px rgba(232, 165, 75, .8);
}

/* ═══ מרווח + סוף ═══ */
#spacer { height: 1150vh; }

#ending {
  position: relative; z-index: 60;
  min-height: 100vh;
  display: grid; place-items: center;
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(28, 39, 71, .55) 0%, transparent 70%),
    linear-gradient(to bottom, rgba(10, 14, 31, 0) 0%, #060A18 16%, #04060F 55%);
  padding: 22vh 24px calc(var(--bar-h) + 10vh);
  text-align: center;
}
.ending-kicker {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.62rem, 1.4vw, .78rem); letter-spacing: .42em;
  color: var(--amber); margin-bottom: 2em;
}
.ending-title {
  font-weight: 900; line-height: 1;
  font-size: clamp(4.4rem, 15vw, 10rem);
  text-shadow: 0 0 90px rgba(232, 165, 75, .22);
}
.ending-text {
  margin: 2.2em auto 0; max-width: 52ch;
  font-weight: 400; line-height: 2;
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: rgba(242, 232, 207, .82);
}
.ending-actions { margin-top: 3em; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-weight: 400; letter-spacing: .14em;
  font-size: clamp(.8rem, 1.6vw, .92rem);
  padding: .95em 2.4em; cursor: pointer; text-decoration: none;
  transition: transform .35s cubic-bezier(.19,1,.22,1), box-shadow .35s, background .35s, color .35s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-solid {
  background: var(--amber); color: #16110A; border: 1px solid var(--amber);
  box-shadow: 0 10px 34px rgba(232, 165, 75, .25);
}
.btn-solid:hover { box-shadow: 0 16px 44px rgba(232, 165, 75, .4); }
.btn-ghost {
  background: transparent; color: var(--moon);
  border: 1px solid rgba(242, 232, 207, .35);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.ending-credits {
  margin-top: 4.5em; font-family: var(--sans); font-weight: 200;
  font-size: .68rem; letter-spacing: .3em; color: rgba(242, 232, 207, .35);
}
.ending-more {
  display: inline-block; margin-top: 3.2em;
  font-family: var(--sans); font-weight: 300;
  font-size: .74rem; letter-spacing: .22em;
  color: rgba(242, 232, 207, .55); text-decoration: none;
  transition: color .35s;
}
.ending-more i { display: inline-block; font-style: normal; animation: moreBob 1.8s ease-in-out infinite; }
.ending-more:hover { color: var(--amber); }
@keyframes moreBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ═══ אפילוג ═══ */
#epilogue { position: relative; z-index: 60; background: #04060F; }

.epi { max-width: 1080px; margin: 0 auto; padding: 12vh clamp(20px, 4vw, 44px) 7vh; }
.epi-head { text-align: center; max-width: 660px; margin: 0 auto 7vh; }
.epi-kicker {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.6rem, 1.3vw, .74rem); letter-spacing: .42em;
  color: var(--amber); margin-bottom: 1.2em;
}
.epi-title {
  font-weight: 900; line-height: 1.12;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  text-shadow: 0 0 60px rgba(232, 165, 75, .16);
}
.epi-sub {
  margin: 1.3em auto 0; max-width: 52ch;
  font-weight: 400; line-height: 1.95;
  font-size: clamp(.95rem, 1.9vw, 1.12rem);
  color: rgba(242, 232, 207, .78);
}

/* ─ יומן הנוסעים ─ */
.stories-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
}
.story {
  text-align: center;
  background: rgba(6, 9, 22, .78);
  border: 1px solid rgba(242, 232, 207, .24);
  outline: 1px solid rgba(242, 232, 207, .08); outline-offset: 6px;
  padding: clamp(24px, 3.6vw, 42px) clamp(20px, 3vw, 40px);
  transition: transform .55s cubic-bezier(.19,1,.22,1), border-color .45s, box-shadow .55s;
  will-change: transform;
}
.story:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 165, 75, .6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 44px rgba(232, 165, 75, .08);
}
.story-label {
  font-family: var(--sans); font-weight: 300;
  font-size: .62rem; letter-spacing: .34em;
  color: var(--amber); margin-bottom: 1.2em;
}
.story h3 {
  font-weight: 900; font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  margin-bottom: .55em;
}
.story p {
  font-weight: 400; line-height: 1.95;
  font-size: clamp(.92rem, 1.8vw, 1.04rem);
  color: rgba(242, 232, 207, .85);
  max-width: 42ch; margin: 0 auto;
}
.story-orn { margin-top: 1.2em; color: rgba(232, 165, 75, .5); font-size: .72rem; letter-spacing: .55em; transition: color .45s, letter-spacing .6s; }
.story:hover .story-orn { color: rgba(232, 165, 75, .95); letter-spacing: .85em; }

/* ─ לוח היציאות ─ */
.board {
  border: 1px solid rgba(242, 232, 207, .16);
  outline: 1px solid rgba(242, 232, 207, .05); outline-offset: 7px;
  background: #050815;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  overflow: hidden;
  perspective: 900px;
}
.board-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: clamp(14px, 2.4vw, 22px) clamp(16px, 3vw, 32px);
  border-bottom: 1px solid rgba(242, 232, 207, .12);
  background: linear-gradient(to bottom, #0A0F22, #050815);
}
.board-brand, .board-date {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.6rem, 1.3vw, .72rem); letter-spacing: .32em;
  color: rgba(242, 232, 207, .55); white-space: nowrap;
}
.board-clock { display: flex; align-items: center; gap: 4px; direction: ltr; }
.clk-d {
  position: relative; display: grid; place-items: center;
  width: clamp(28px, 4vw, 38px); height: clamp(38px, 5.4vw, 52px);
  background: linear-gradient(to bottom, #10182F 0%, #10182F 49%, #0B1126 51%, #0B1126 100%);
  border: 1px solid rgba(242, 232, 207, .18); border-radius: 4px;
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: #FFE9BE;
  text-shadow: 0 0 14px rgba(232, 165, 75, .5);
}
.clk-d::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(3, 5, 12, .9);
}
.clk-sep {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--amber);
  padding: 0 2px; animation: clkBlink 2s steps(1) infinite;
}
@keyframes clkBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.board-head, .board-row {
  display: grid;
  grid-template-columns: 1.3fr .7fr .45fr 1.7fr;
  gap: clamp(8px, 1.6vw, 20px); align-items: baseline;
  padding: .9em clamp(16px, 3vw, 32px);
}
.board-head {
  font-family: var(--sans); font-weight: 600;
  font-size: .62rem; letter-spacing: .3em;
  color: var(--amber);
  border-bottom: 1px solid rgba(232, 165, 75, .25);
  padding-top: 1.2em;
}
.board-row {
  border-bottom: 1px solid rgba(242, 232, 207, .06);
  transition: background .4s;
  will-change: transform;
}
.board-row:last-child { border-bottom: none; }
.board-row:hover { background: rgba(232, 165, 75, .05); }
.b-dest { font-weight: 700; font-size: clamp(1rem, 2vw, 1.22rem); color: var(--moon); }
.b-time, .b-plat {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(.82rem, 1.7vw, .96rem); letter-spacing: .1em;
  color: #F5C87E; font-variant-numeric: tabular-nums;
}
.b-note {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(.78rem, 1.6vw, .9rem); line-height: 1.7;
  color: rgba(242, 232, 207, .62);
}
.row-last .b-dest { color: #E9967F; }
.row-last .b-time, .row-last .b-plat { color: #D77B60; }
.row-last { border-bottom-color: rgba(180, 67, 46, .3); }
.row-off .b-dest, .row-off .b-time, .row-off .b-plat { color: rgba(242, 232, 207, .3); }
.row-off .b-note { color: rgba(242, 232, 207, .35); font-style: italic; }

/* ─ מפת הקו ─ */
.map-stage {
  border: 1px solid rgba(242, 232, 207, .14);
  outline: 1px solid rgba(242, 232, 207, .05); outline-offset: 7px;
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(28, 39, 71, .35) 0%, transparent 75%),
    #060A18;
  padding: clamp(14px, 3vw, 34px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
#routeMap { display: block; width: 100%; height: auto; overflow: visible; }
#routeMap text {
  font-family: var(--sans); font-weight: 400; font-size: 16px;
  letter-spacing: .04em; fill: rgba(242, 232, 207, .3);
  transition: fill .7s;
}
#routeMap .stn .halo { fill: var(--amber); opacity: 0; transition: opacity .8s; }
#routeMap .stn .ring { fill: #0B1226; stroke: rgba(242, 232, 207, .35); stroke-width: 1.6; transition: stroke .6s, fill .6s; }
#routeMap .stn .core { fill: rgba(242, 232, 207, .4); transition: fill .6s; }
#routeMap .stn.lit .halo { opacity: .28; }
#routeMap .stn.lit .ring { stroke: var(--amber); fill: #120E06; }
#routeMap .stn.lit .core { fill: #FFE9BE; }
#routeMap .stn.lit text { fill: var(--moon); }
#routeMap .stn-last.lit .ring { stroke: var(--signal); }
#routeMap .stn-last.lit text { fill: #E9967F; }
#routeMap .stn text.sub { font-size: 12.5px; letter-spacing: .2em; }
#routeMap .stn.lit text.sub { fill: var(--amber); }
#routeMap .stn-last.lit text.sub { fill: #D77B60; }
.map-caption {
  margin-top: 3.2em; text-align: center;
  font-family: var(--sans); font-weight: 200;
  font-size: .68rem; letter-spacing: .3em;
  color: rgba(242, 232, 207, .38);
}

/* ─ מאחורי הקלעים ─ */
.bts-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
}
.bts-panel {
  background: #060A18;
  border: 1px solid rgba(242, 232, 207, .14);
  padding-bottom: 1.6em; overflow: hidden;
  transition: transform .55s cubic-bezier(.19,1,.22,1), border-color .45s, box-shadow .55s;
}
.bts-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 165, 75, .4);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
}
.bts-demo {
  height: clamp(150px, 22vw, 190px);
  border-bottom: 1px solid rgba(242, 232, 207, .1);
  background-repeat: repeat-x; background-position: bottom center;
  position: relative;
}
#demoRidge { background-size: auto 100%; transition: opacity .3s; }
#demoTrain { background-size: auto 62%; background-position: center 68%; background-color: #050815; }
.demo-canvas { background: #050815; }
.demo-canvas canvas { display: block; width: 100%; height: 100%; }
.demo-grain {
  background-color: #0B0F20;
  display: grid; place-items: center;
  overflow: hidden;
}
.demo-grain::before {
  content: ""; position: absolute; inset: -60px; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grainShift .45s steps(3) infinite;
}
.demo-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(100% 90% at 50% 45%, transparent 45%, rgba(3, 5, 12, .7) 100%);
  animation: flick 4.2s steps(1) infinite;
}
.demo-grain span {
  position: relative; z-index: 1;
  font-family: var(--sans); font-weight: 300;
  font-size: .64rem; letter-spacing: .4em;
  color: rgba(242, 232, 207, .55);
  text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.bts-panel h3 {
  font-weight: 700; font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  margin: 1.1em 1.3em .35em;
}
.bts-panel p {
  font-weight: 400; line-height: 1.85;
  font-size: clamp(.88rem, 1.7vw, .98rem);
  color: rgba(242, 232, 207, .76);
  margin: 0 1.5em .3em;
}
.bts-row { display: flex; align-items: center; gap: 12px; margin: 1.1em 1.5em 0; }
.chip-btn {
  font-family: var(--sans); font-weight: 400;
  font-size: .72rem; letter-spacing: .12em;
  color: var(--amber); background: transparent;
  border: 1px solid rgba(232, 165, 75, .5);
  padding: .65em 1.5em; cursor: pointer;
  transition: background .35s, transform .25s, box-shadow .35s;
}
.chip-btn:hover { background: rgba(232, 165, 75, .12); box-shadow: 0 6px 20px rgba(232, 165, 75, .15); }
.chip-btn:active { transform: scale(.95); }
.chip {
  font-family: var(--sans); font-weight: 300;
  font-size: .68rem; letter-spacing: .1em;
  color: rgba(242, 232, 207, .55);
  border: 1px dashed rgba(242, 232, 207, .25);
  padding: .55em 1.1em;
}
.bts-note {
  margin-top: 6vh; text-align: center;
  font-size: clamp(.95rem, 1.9vw, 1.08rem);
  color: rgba(242, 232, 207, .75);
}
.bts-note a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(232, 165, 75, .4); padding-bottom: 2px; transition: border-color .3s; }
.bts-note a:hover { border-color: var(--amber); }

/* ─ פוטר ─ */
#siteFooter {
  border-top: 1px solid rgba(242, 232, 207, .1);
  max-width: 1080px; margin: 4vh auto 0;
  padding: 8vh clamp(20px, 4vw, 44px) calc(var(--bar-h) + 5vh);
}
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
.foot-brand strong { font-weight: 700; font-size: 1.25rem; }
.foot-brand p, .foot-col p {
  margin-top: 1em; font-family: var(--sans); font-weight: 300;
  font-size: .84rem; line-height: 2.1; color: rgba(242, 232, 207, .55);
}
.foot-col h4 {
  font-family: var(--sans); font-weight: 600;
  font-size: .7rem; letter-spacing: .32em;
  color: var(--amber); margin-bottom: 1.2em;
}
.foot-col a {
  display: block; font-family: var(--sans); font-weight: 300;
  font-size: .88rem; padding: .32em 0;
  color: rgba(242, 232, 207, .7); text-decoration: none;
  transition: color .3s, padding .35s;
}
.foot-col a:hover { color: var(--amber); padding-inline-start: 6px; }
.foot-line {
  margin-top: 7vh; padding-top: 2.6em; text-align: center;
  border-top: 1px solid rgba(242, 232, 207, .07);
  font-family: var(--sans); font-weight: 200;
  font-size: .64rem; letter-spacing: .26em;
  color: rgba(242, 232, 207, .35);
}

/* ═══ מובייל ═══ */
@media (max-width: 900px) {
  .bar-nav { display: none; }
}
@media (max-width: 760px) {
  .stories-grid, .bts-grid { grid-template-columns: 1fr; }
  .board-head, .board-row { grid-template-columns: 1.1fr .8fr 1.4fr; }
  .b-plat, .board-head span:nth-child(3) { display: none; }
  .board-top { justify-content: center; text-align: center; }
  .board-date { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 34px; }
  .epi { padding: 9vh clamp(18px, 4vw, 30px) 5vh; }
  #routeMap text { font-size: 21px; }
  #routeMap .stn text.sub { font-size: 16px; }
}
@media (max-width: 640px) {
  .bar-note { display: none; }
  .route { max-width: 150px; }
  .moon { top: 9vh; left: 58vw; }
  #lyr-poles { bottom: 8vh; height: 58vh; }
  .station .post { height: 24vh; }
  .station .lamp { bottom: 24vh; }
  .station .sign { bottom: 16vh; }
  .card { top: 36%; }
  .card-text { line-height: 1.85; }
  #lyr-train { height: 16vh; }
  #hint { bottom: 24vh; }
}

/* ═══ הפחתת תנועה ═══ */
@media (prefers-reduced-motion: reduce) {
  .cloud, #grain, #flicker, #lyr-train, .station .lamp, #hint i, .loader-sub,
  .demo-grain::before, .demo-grain::after, .ending-more i, .clk-sep { animation: none !important; }
  .story, .bts-panel, .btn { transition: none; }
}
