/* Geo Time Travel (on top of css/style.css + css/voyage.css) */
.format-grid.three { grid-template-columns: repeat(3, 1fr); }
.timetravel .logo h1 span { color: var(--accent); }

/* a faint tint of the active player's era */
body.timetravel::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .18; transition: background 1s;
  background: radial-gradient(circle at 50% 0%, var(--era, transparent), transparent 70%);
}
body[data-era="Prehistory"] { --era: #c98b4a; }
body[data-era="Antiquity"] { --era: #e0b04a; }
body[data-era="Middle Ages"] { --era: #8fa7c9; }
body[data-era="Early Modern"] { --era: #4ab0c9; }
body[data-era="Modern"] { --era: #9a7cff; }

.era-chip { background: color-mix(in srgb, var(--ec) 85%, #000); color: #fff; }
.tt-vp.dead { opacity: .45; filter: grayscale(.7); }
.tt-vp .vp-num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the road through the eras */
.tt-timeline { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tt-timeline::-webkit-scrollbar { display: none; }
.tt-step {
  flex: 1 1 0; min-width: 52px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 12px;
  border: 1px solid var(--panel-border); background: rgba(0,0,0,.2); opacity: .5;
}
.tt-step span { font-size: 18px; line-height: 1; }
.tt-step small { font-size: 9.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tt-step.done { opacity: .85; background: color-mix(in srgb, var(--ec, #06d6a0) 22%, rgba(0,0,0,.2)); }
.tt-step.now { opacity: 1; border-color: var(--ec); box-shadow: 0 0 0 1px var(--ec) inset, 0 0 14px color-mix(in srgb, var(--ec) 50%, transparent); }
.tt-step.now small { color: var(--text); }
.tt-arrow { color: var(--muted); font-size: 14px; flex: none; }
.tt-dots { display: flex; gap: 3px; margin-top: 2px; }
.tt-dots b { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); }
.tt-dots b.on { background: var(--ec); box-shadow: 0 0 6px var(--ec); }

/* the era claims a player */
.doom { z-index: 45; background: rgba(5, 3, 10, .82); cursor: pointer; }
.doom-card { text-align: center; max-width: 420px; padding: 20px; }
.doom-threat { font-size: 120px; line-height: 1.1; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--ec) 70%, transparent)); }
.doom-card h2 { font-family: var(--font-display); font-size: 34px; margin: 10px 0 6px; color: #ff6b6b; }
.doom-card p { color: #e9e6f5; font-size: 17px; margin: 0; }
.doom.play .doom-threat { animation: doom-pounce 1.1s cubic-bezier(.2,.9,.3,1.3) both, doom-shake .5s 1.1s 2 both; }
.doom.play h2 { animation: doom-in .5s .6s both; }
.doom.play p { animation: doom-in .5s .9s both; }
@keyframes doom-pounce { 0% { transform: scale(.1) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.35) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes doom-shake { 25% { transform: translateX(-8px) rotate(-4deg); } 75% { transform: translateX(8px) rotate(4deg); } }
@keyframes doom-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 640px) {
  .tt-step { min-width: 44px; padding: 4px 1px; }
  .tt-step small { font-size: 8.5px; }
  .doom-threat { font-size: 96px; }
  .doom-card h2 { font-size: 28px; }
}
