/* "ציר הזמן" and "על המפה" (web/explore.js): the main feed's panels, and the teacher's "🗺️ המפה שלנו"
   (ב-108, web/teacher/myclass.js), where they're bigger, to show on the classroom's screen (.explore.big). */
.explore {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #0d0d10;
  color: var(--fg, #fff);
  opacity: 0;
  transition: opacity 0.2s;
}
.explore.open { opacity: 1; }
.explore-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + var(--safe-top, 0px)) var(--gutter, 16px) 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.explore-title { margin: 0; font-size: 22px; font-weight: 800; }
.explore-sub { margin: 4px 0 0; color: var(--fg-dim, rgba(255, 255, 255, 0.78)); font-size: 14px; line-height: 1.5; }
.explore-close { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.explore-close svg { width: 100%; height: 100%; }
.explore-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.explore-note, .explore-hint { margin: 8px var(--gutter, 16px); color: var(--fg-dim, rgba(255, 255, 255, 0.78)); font-size: 14px; line-height: 1.5; }
.explore-hint { text-align: center; }

.tl-scroller {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: stretch;
}
.tl-track { position: relative; display: flex; min-height: 420px; padding-inline: 24px; }
.tl-rail {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to left, #a02cfe, #fe2c55, #ffb800, #25f4ee);
}
.tl-era {
  position: relative;
  flex: none;
  border-inline-start: 1px dashed rgba(255, 255, 255, 0.18);
}
.tl-era-label {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  display: grid;
  gap: 2px;
}
.tl-era-name { font-size: 17px; font-weight: 800; }
.tl-era-span { color: var(--fg-dim, rgba(255, 255, 255, 0.78)); font-size: 12px; }
.tl-empty {
  position: absolute;
  top: calc(50% + 22px);
  inset-inline: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  text-align: center;
}
.tl-item {
  position: absolute;
  width: 88px;
  margin-inline-start: -44px;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.tl-item:active .tl-face { transform: scale(0.94); }
.tl-item.picked .tl-face { box-shadow: 0 0 0 3px #fe2c55; }
/* A tapped entry: its name and a button to watch it, on the other side of the line. */
.tl-pop {
  position: absolute;
  z-index: 2;
  width: 150px;
  margin-inline-start: -75px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  color: #111;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: 'Rubik', system-ui, sans-serif;
}
.tl-pop.above { top: calc(50% + 14px); }
.tl-pop.below { bottom: calc(50% + 14px); }
.tl-pop strong { font-size: 14px; line-height: 1.25; }
.tl-pop span { color: #555; font-size: 12px; }
.tl-item.above { bottom: calc(50% + 14px); }
.tl-item.below { top: calc(50% + 14px); }
.tl-item::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
}
.tl-item.above::after { bottom: -14px; }
.tl-item.below::after { top: -14px; }
.tl-item.below .tl-face { order: -1; }
.tl-face, .map-face {
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent, #fe2c55);
  color: #fff;
  font-weight: 800;
}
.tl-face { width: 58px; height: 58px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); font-size: 22px; }
/* Leaflet sizes marker images to their natural size; keep the thumbnail whole. */
.tl-face, .map-face { position: relative; }
.tl-face img, .map-face img, .leaflet-container .map-face img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}
.thumb-whole { object-fit: contain; }
.thumb-back { object-fit: cover; filter: blur(4px) brightness(0.8); transform: scale(1.2); }
.tl-name { font-size: 12px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-year { color: #ffd166; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }

.map-box { flex: 1; min-height: 0; background: #aad3df; }
.map-pin { background: none; border: none; }
.map-face { width: 46px; height: 46px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); font-size: 18px; }
.map-pop { display: grid; gap: 2px; font-family: 'Rubik', system-ui, sans-serif; direction: rtl; text-align: right; }
.map-pop strong { font-size: 14px; }
.map-pop span { color: #555; font-size: 12px; }
.map-watch {
  margin-top: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #fe2c55;
  color: #fff;
  font: 700 13px/1.2 'Rubik', system-ui, sans-serif;
  cursor: pointer;
}

/* ב-108: on the classroom's screen, everything readable from the back of the room. */
.explore.big .explore-title { font-size: clamp(26px, 3.2vw, 44px); }
.explore.big .explore-sub { font-size: clamp(16px, 1.8vw, 24px); }
.explore.big .tl-track { min-height: 560px; }
.explore.big .tl-item { width: 128px; margin-inline-start: -64px; }
.explore.big .tl-face { width: calc(76px * var(--w, 1)); height: calc(76px * var(--w, 1)); font-size: 30px; }
.explore.big .tl-name { font-size: 16px; }
.explore.big .tl-year { font-size: 14px; }
.explore.big .tl-era-name { font-size: 22px; }
.explore.big .tl-era-span { font-size: 15px; }
.explore.big .tl-pop { width: 240px; margin-inline-start: -120px; padding: 14px; }
.explore.big .tl-pop strong, .explore.big .map-pop strong { font-size: 20px; }
.explore.big .tl-pop img, .explore.big .map-pop img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 10px; }
.explore.big .map-face { font-size: 24px; }
.explore-tabs { display: flex; gap: 6px; padding: 8px var(--gutter, 16px) 0; }
.explore-tab { padding: 10px 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff; font: 700 16px/1.2 'Rubik', system-ui, sans-serif; cursor: pointer; }
.explore-tab[aria-pressed="true"] { background: #fff; color: #111; }
.explore-tools { display: flex; gap: 8px; align-items: center; }
.explore-tool { flex: none; white-space: nowrap; height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 700 15px/1 'Rubik', system-ui, sans-serif; cursor: pointer; }
.explore .explore-close { color: #fff; border: 0; cursor: pointer; }
