@property --p { syntax: "<percentage>"; inherits: true; initial-value: 0%; }

:root {
  --bg: #07060b;
  --ink: #f3f1ff;
  --dim: #9a94b8;
  --faint: #6c6790;
  --line: rgba(255, 255, 255, .1);
  --glass: rgba(20, 18, 32, .78);
  --c1: #7cf7ff;
  --c2: #a78bff;
  --c3: #ff6ad5;
  --accent: var(--c1);
  --hud-h: 64px;
  --console-h: 124px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Unbounded", system-ui, sans-serif;
  --text: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body {
  font: 14px/1.4 var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; }
kbd {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px; margin: 0 1px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, .06);
  font: 600 11px/1 var(--mono); color: var(--ink);
}

.app {
  position: relative;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--hud-h) 1fr auto;
  isolation: isolate;
}
/* фон машины: мягкое свечение в цвет текущей эпохи */
.app::before {
  content: "";
  position: absolute; inset: -20%;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 20% 30%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(45% 55% at 85% 75%, color-mix(in oklab, var(--c3) 14%, transparent), transparent 70%),
    var(--bg);
  animation: drift 24s ease-in-out infinite alternate;
}
.app::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 50% 50%, transparent 40%, #000 100%);
  opacity: .35;
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(3deg); } }

/* ---------- Шапка: только бренд и служебное ---------- */
.hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; justify-self: start; }
.brand-mark { width: 38px; height: 38px; overflow: visible; }
.bm-ring { transform-origin: 24px 24px; }
.bm-ring-a { animation: spin 14s linear infinite; }
.bm-ring-b { animation: spin 9s linear infinite reverse; }
.bm-hand { transform-origin: 24px 24px; animation: spin 6s steps(12) infinite; }
.bm-dot { transform-origin: 24px 24px; animation: spin 4s linear infinite; }
.is-warping .bm-ring-a { animation-duration: .7s; }
.is-warping .bm-ring-b { animation-duration: .5s; }
.is-warping .bm-hand { animation: spin .35s linear infinite; }
.is-warping .bm-dot { animation-duration: .3s; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font: 700 22px/1 var(--display);
  letter-spacing: -.02em;
  background: linear-gradient(90deg, var(--c1), var(--c2) 55%, #ff6ad5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font: 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }
.hud-tag { margin: 0; font-size: 13px; color: var(--dim); white-space: nowrap; }
.hud-tag b { color: var(--ink); font-weight: 600; }

.sys { display: flex; gap: 6px; justify-self: end; }
.sys-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--dim); font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, transform .15s var(--ease);
}
.sys-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.sys-btn:active { transform: scale(.95); }
.sys-icon { width: 36px; padding: 0; justify-content: center; }
.sys-btn.is-on { color: var(--ink); border-color: color-mix(in oklab, var(--accent) 55%, transparent); background: color-mix(in oklab, var(--accent) 14%, transparent); }
.sys-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#btnSound .snd-wave { display: none; }
#btnSound.is-on .snd-wave { display: inline; }
#btnSound.is-on .snd-off { display: none; }

/* ---------- Сцена ---------- */
.stage { position: relative; min-height: 0; display: grid; place-items: center; z-index: 5; }
.scaler { position: absolute; left: 50%; top: 50%; transform-origin: 0 0; }
.frame {
  position: relative;
  display: flex; flex-direction: column;
  width: 1200px; height: 740px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
  transition: border-radius .6s var(--ease), box-shadow .6s, background .6s;
}
.frame.is-mob { width: 420px; height: 800px; border-radius: 36px; }
.fr-top, .fr-status { flex: none; position: relative; z-index: 3; }
.fr-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.era-host { position: absolute; inset: 0; }
.era { position: absolute; inset: 0; overflow: hidden; }

/* переход: уход в туннель */
.warp-out-f { animation: warpOutF .62s cubic-bezier(.6, 0, .9, .4) forwards; }
.warp-out-b { animation: warpOutB .62s cubic-bezier(.6, 0, .9, .4) forwards; }
.warp-in-f { animation: warpInF .9s cubic-bezier(.1, .8, .2, 1) both; }
.warp-in-b { animation: warpInB .9s cubic-bezier(.1, .8, .2, 1) both; }
@keyframes warpOutF {
  40% { filter: blur(2px) saturate(2) hue-rotate(40deg); }
  to { transform: perspective(900px) translateZ(-900px) rotateZ(-8deg); opacity: 0; filter: blur(14px) brightness(3) hue-rotate(160deg); }
}
@keyframes warpOutB {
  40% { filter: blur(2px) saturate(2) hue-rotate(-40deg); }
  to { transform: perspective(900px) translateZ(420px) rotateZ(8deg); opacity: 0; filter: blur(14px) brightness(3) hue-rotate(-160deg); }
}
@keyframes warpInF {
  from { transform: perspective(900px) translateZ(380px) rotateZ(6deg); opacity: 0; filter: blur(16px) brightness(2.5); }
  60% { opacity: 1; }
  to { transform: none; filter: none; }
}
@keyframes warpInB {
  from { transform: perspective(900px) translateZ(-900px) rotateZ(-6deg); opacity: 0; filter: blur(16px) brightness(2.5); }
  60% { opacity: 1; }
  to { transform: none; filter: none; }
}
.warp {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 40;
  mix-blend-mode: screen;
  opacity: 0;
}
.flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 41;
  background: radial-gradient(circle at 50% 50%, #fff, color-mix(in oklab, var(--accent) 60%, transparent) 40%, transparent 70%);
  opacity: 0;
}
.flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 0; } 25% { opacity: .9; } 100% { opacity: 0; } }

/* ---------- Точки-подсказки ---------- */
.hs {
  position: absolute; z-index: 30;
  width: 26px; height: 26px;
  margin: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0; transform: scale(.4);
  transition: opacity .4s, transform .5s var(--spring);
  font: 700 13px/26px var(--mono);
  color: #fff;
}
.hs::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: linear-gradient(135deg, #7cf7ff, #ff6ad5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 4px 14px rgba(0, 0, 0, .45);
}
.hs::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #7cf7ff;
  animation: ping 2.2s var(--ease) infinite;
}
.hs span { position: relative; font-size: 11px; }
@keyframes ping { 0% { transform: scale(.5); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.show-dots .hs { opacity: 1; transform: scale(1); }
.hs:hover::before, .hs.is-active::before { background: #fff; }
.hs.is-active span { color: #111; }
.hs.is-seen::after { animation: none; opacity: 0; }

.frame.glitch { animation: glitch .42s steps(1) 1; }
@keyframes glitch {
  0% { transform: translate(-5px, 0); filter: hue-rotate(90deg) saturate(2.5); }
  20% { transform: translate(6px, 2px); clip-path: inset(8% 0 58% 0); }
  40% { transform: translate(-3px, -1px); clip-path: inset(46% 0 22% 0); filter: hue-rotate(-60deg) contrast(1.5); }
  60% { transform: translate(2px, 0); clip-path: inset(0 0 0 0); filter: none; }
  100% { transform: none; }
}

/* ---------- Линза времени ---------- */
.lens { position: absolute; inset: 0; z-index: 20; pointer-events: none; clip-path: circle(0 at 50% 50%); transition: clip-path .1s linear; }
.lens.is-open { clip-path: circle(var(--r, 150px) at var(--x, 50%) var(--y, 50%)); }
.lens-inner { position: absolute; inset: 0; }
.lens::after {
  content: ""; position: absolute;
  left: var(--x, 50%); top: var(--y, 50%);
  width: calc(var(--r, 150px) * 2); height: calc(var(--r, 150px) * 2);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .85), inset 0 0 40px 6px rgba(124, 247, 255, .55);
}
.lens-tag {
  position: fixed; z-index: 45; pointer-events: none;
  padding: 4px 9px; border-radius: 99px;
  font: 600 12px/1.2 var(--mono);
  background: #fff; color: #111;
  transform: translate(-50%, 0);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}
.lens-tag[hidden] { display: none; }
.lens-mode .fr-view { cursor: none; }
/* ---------- Окно приметы ---------- */
.pop {
  position: fixed; z-index: 60;
  width: min(340px, calc(100vw - 32px));
  padding: 16px 18px 12px;
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
  transform-origin: var(--ox, 50%) var(--oy, 0);
  animation: popIn .32s var(--spring);
}
.pop[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: scale(.85) translateY(6px); } }
.pop-close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; }
.pop-close:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.pop-kicker { font: 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding-right: 30px; }
.pop-title { font: 500 17px/1.25 var(--display); margin: 8px 0 8px; }
.pop-text { font-size: 14px; line-height: 1.5; color: #d9d5ef; }
.pop-now { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; line-height: 1.45; color: var(--dim); }
.pop-now:empty { display: none; }
.pop-now b { color: var(--ink); font-weight: 700; }
.pop-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.pop-nav span { flex: 1; font: 11px var(--mono); color: var(--faint); text-align: center; }
.pop-nav button { height: 30px; min-width: 30px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s; }
.pop-nav button:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Об эпохе ---------- */
.info {
  position: fixed; z-index: 50;
  top: calc(var(--hud-h) + 6px); left: 16px; bottom: calc(var(--console-h) + 16px);
  width: min(390px, calc(100vw - 32px));
  overflow: auto;
  padding: 24px 22px;
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  animation: infoIn .45s var(--ease);
  scrollbar-width: thin;
}
.info[hidden] { display: none; }
@keyframes infoIn { from { opacity: 0; transform: translate(-24px, 12px); } }
.info-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05);
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--dim);
}
.info-close:hover { color: var(--ink); }
.info-year { font: 700 56px/1 var(--display); letter-spacing: -.04em; color: var(--accent); text-shadow: 0 0 30px color-mix(in oklab, var(--accent) 50%, transparent); }
.info-name { font: 500 18px/1.2 var(--display); margin: 8px 0 4px; }
.info-lead { font-size: 14px; line-height: 1.55; color: #d9d5ef; margin: 12px 0 18px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-fact { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); animation: factIn .5s var(--ease) both; }
.info-fact:nth-child(2) { animation-delay: .05s; } .info-fact:nth-child(3) { animation-delay: .1s; } .info-fact:nth-child(4) { animation-delay: .15s; }
@keyframes factIn { from { opacity: 0; transform: translateY(10px); } }
.info-fact b { display: block; font: 600 17px/1.2 var(--display); color: var(--ink); }
.info-fact span { display: block; font-size: 12px; color: var(--dim); margin-top: 4px; }
.info-h { display: flex; justify-content: space-between; font: 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 22px 0 10px; }
.info-h em { font-style: normal; color: var(--accent); letter-spacing: .04em; }
.info-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.info-tags span { padding: 5px 10px; border-radius: 99px; font: 12px var(--mono); border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.info-note { font-size: 12px; line-height: 1.5; color: var(--faint); margin-top: 18px; }
.info-list { display: flex; flex-direction: column; gap: 2px; }
.info-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.3; color: var(--dim); transition: background .2s, color .2s; }
.info-list button:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }
.info-list i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--mono); font-style: normal; color: var(--dim); border: 1px dashed rgba(255, 255, 255, .3); }
.info-list .seen { color: var(--ink); }
.info-list .seen i { border: 0; color: #111; background: linear-gradient(135deg, #7cf7ff, #ff6ad5); }

/* =====================================================================
   ПРИБОРНАЯ ПАНЕЛЬ: где я · куда · что делать
   ===================================================================== */
.console {
  position: relative; z-index: 20;
  margin: 0 16px 16px;
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(420px, 460px);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 27, 48, .82), rgba(13, 11, 22, .9));
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 30px 70px -30px #000, inset 0 1px rgba(255, 255, 255, .07);
}
/* светящаяся кромка в цвет эпохи */
.console::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .8;
}
.console::after {
  content: ""; position: absolute; left: 20%; right: 20%; top: -18px; height: 36px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in oklab, var(--accent) 22%, transparent), transparent);
}
.zone { position: relative; min-width: 0; padding: 14px 20px 16px; }
.zone + .zone::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: linear-gradient(transparent, rgba(255, 255, 255, .1), transparent); }
.zone-k {
  display: flex; align-items: center; gap: 8px;
  height: 16px; margin-bottom: 10px;
  font: 600 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  white-space: nowrap;
}
.zone-k i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); transition: background .8s, box-shadow .8s; }
.zone-hint { margin-left: auto; display: flex; align-items: center; gap: 3px; font: 11px var(--text); letter-spacing: 0; text-transform: none; color: var(--faint); }
.zone-hint kbd { height: 17px; min-width: 17px; font-size: 10px; }

/* --- Эпоха --- */
.era-read {
  display: flex; align-items: center; gap: 14px;
  width: calc(100% + 16px); margin: -6px -8px; padding: 6px 8px;
  border: 0; border-radius: 16px; background: transparent;
  text-align: left; cursor: pointer;
  transition: background .25s;
}
.era-read:hover, .era-read.is-on { background: rgba(255, 255, 255, .05); }
.clock-year {
  flex: none;
  display: inline-flex;
  font: 600 40px/1 var(--mono);
  letter-spacing: .02em;
  color: var(--accent);
  text-shadow: 0 0 18px color-mix(in oklab, var(--accent) 70%, transparent);
  transition: color .8s, text-shadow .8s;
}
.digit { display: inline-block; height: 1em; overflow: hidden; width: .62em; }
.digit-strip { display: flex; flex-direction: column; transition: transform 1.1s cubic-bezier(.65, 0, .2, 1); }
.digit-strip span { height: 1em; display: block; text-align: center; }
.era-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.clock-era { font: 500 13px/1.25 var(--display); color: var(--ink); }
.era-more { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--accent); transition: gap .25s var(--ease); }
.era-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.era-read:hover .era-more svg { transform: translateX(3px); }
.era-read.is-on .era-more svg { transform: rotate(180deg); }

/* --- Путешествие --- */
.travel { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px auto; align-items: center; gap: 12px; }
.tl-arrow {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  cursor: pointer; display: grid; place-items: center; color: var(--dim);
  transition: color .2s, background .2s, transform .15s, opacity .2s;
}
.tl-arrow:hover { color: var(--ink); background: rgba(255, 255, 255, .1); }
.tl-arrow:active { transform: scale(.9); }
.tl-arrow:disabled { opacity: .25; cursor: default; }
.tl-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.tl-track { position: relative; height: 56px; margin: 0 16px; cursor: pointer; touch-action: none; outline: none; --p: 0%; transition: --p .9s var(--ease); }
.dragging .tl-track { transition: none; }
.tl-rail { position: absolute; left: -6px; right: -6px; top: 12px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.tl-rail::before, .tl-rail::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 0; bottom: 0; border-radius: inherit;
  background: var(--rail, linear-gradient(90deg, var(--c1), var(--c3)));
}
.tl-rail::before { opacity: .18; }
.tl-rail::after { clip-path: inset(0 calc(100% - var(--p)) 0 0 round 3px); box-shadow: 0 0 14px color-mix(in oklab, var(--accent) 60%, transparent); }
.tl-ticks { position: absolute; left: 0; right: 0; top: 0; height: 30px; pointer-events: none; }
.tl-ticks i { position: absolute; top: 3px; width: 1px; height: 4px; background: rgba(255, 255, 255, .18); }
.tl-stops { position: absolute; inset: 0; }
.tl-stop {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--faint);
}
.tl-stop i { width: 10px; height: 10px; margin-top: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--sc, rgba(255, 255, 255, .4)); transition: transform .3s var(--spring), background .3s; }
.tl-stop b { font: 600 13px/1 var(--mono); margin-top: 11px; color: var(--dim); transition: color .3s, transform .3s var(--spring); }
.tl-stop small { font-size: 10px; font-weight: 600; margin-top: 5px; white-space: nowrap; transition: color .3s; }
.tl-stop:hover i { transform: scale(1.3); }
.tl-stop:hover b { color: var(--ink); }
.tl-stop.is-past i { background: var(--sc); }
.tl-stop.is-active b { color: var(--ink); transform: scale(1.12); }
.tl-stop.is-active small { color: var(--accent); }
.tl-puck {
  position: absolute; top: 3px; left: var(--p);
  width: 24px; height: 24px; margin-left: -12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 22%, var(--accent) 60%, color-mix(in oklab, var(--accent) 60%, #000));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent), 0 0 26px var(--accent), 0 4px 10px rgba(0, 0, 0, .5);
  cursor: grab; z-index: 2;
  transition: transform .2s var(--spring);
}
.tl-puck span { position: absolute; inset: -9px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2.4s var(--ease) infinite; }
.tl-track:hover .tl-puck { transform: scale(1.08); }
.dragging .tl-puck { cursor: grabbing; transform: scale(1.2); }
.tl-track:focus-visible .tl-puck { outline: 2px solid #fff; outline-offset: 5px; }

.autopilot {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 13px;
  border-radius: 99px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  color: var(--dim); font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, transform .15s var(--ease);
}
.autopilot:hover { color: var(--ink); background: rgba(255, 255, 255, .09); }
.autopilot:active { transform: scale(.95); }
.autopilot svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.autopilot .i-pause { display: none; fill: none; }
.autopilot.is-on { color: var(--ink); border-color: color-mix(in oklab, var(--accent) 55%, transparent); background: color-mix(in oklab, var(--accent) 14%, transparent); }
.autopilot.is-on .i-play { display: none; }
.autopilot.is-on .i-pause { display: inline; }
/* полоска: сколько осталось до следующей эпохи */
.autopilot::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.autopilot.is-on.tick::after { animation: apBar var(--ap, 7s) linear forwards; }
@keyframes apBar { to { width: 100%; } }

/* --- Исследовать --- */
.explore { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xbtn {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  min-width: 0; height: 56px; padding: 0 12px 0 9px;
  border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .035);
  text-align: left; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s var(--spring);
}
.xbtn:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
.xbtn:active { transform: scale(.97); }
.xbtn.is-on { border-color: color-mix(in oklab, var(--accent) 60%, transparent); background: color-mix(in oklab, var(--accent) 14%, transparent); }
.x-ico { position: relative; flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--accent); transition: color .8s; }
.x-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.x-ring { border-radius: 50%; background: none; }
.x-ring svg { position: absolute; inset: 0; width: 38px; height: 38px; transform: rotate(-90deg); }
.x-ring .r-bg { stroke: rgba(255, 255, 255, .1); stroke-width: 3; }
.x-ring .r-fg { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset .8s var(--spring), stroke .8s; filter: drop-shadow(0 0 3px var(--accent)); }
.x-ring b { position: relative; font: 700 13px/1 var(--mono); color: var(--ink); }
.x-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.x-t b { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-t small { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbtn.done small { color: #7ef2b0; }
.xbtn.nudge::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--accent); animation: nudge 2s var(--ease) infinite; pointer-events: none; }
@keyframes nudge { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.08, 1.25); } }
.no-dots #btnDots .x-t small::after { content: " · точки скрыты"; }

/* ---------- Как пользоваться ---------- */
.help {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5, 4, 12, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fadeIn .35s ease;
}
.help[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.help-card {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100dvh - 32px); overflow: auto;
  padding: 34px 34px 30px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(34, 30, 54, .92), rgba(14, 12, 24, .95));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 50px 120px -30px #000, inset 0 1px rgba(255, 255, 255, .08);
  animation: helpIn .55s var(--spring);
}
@keyframes helpIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.help-card::before { content: ""; position: absolute; left: 15%; right: 15%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--c1), var(--c3), transparent); }
.help-k { font: 600 10px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.help-title { margin: 12px 0 26px; font: 500 28px/1.2 var(--display); letter-spacing: -.02em; max-width: 620px; }
.help-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.help-step {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 18px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  animation: stepIn .6s var(--ease) both;
  animation-delay: calc(.15s + var(--d) * .1s);
}
@keyframes stepIn { from { opacity: 0; transform: translateY(16px); } }
.help-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--mono); color: #111; background: linear-gradient(135deg, var(--c1), #ff6ad5); margin-bottom: 4px; }
.help-step b { font: 500 16px/1.2 var(--display); }
.help-step p { margin: 0; flex: 1; font-size: 14px; line-height: 1.5; color: #cfcae6; }
.help-keys { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; font-size: 12px; color: var(--faint); margin-top: 4px; }
.help-go {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px; height: 50px; padding: 0 26px;
  border: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--c1), var(--c2), #ff6ad5);
  color: #0b0914; font-size: 15px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 40px -12px rgba(167, 139, 255, .8);
  transition: transform .25s var(--spring), box-shadow .25s;
}
.help-go:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -12px rgba(167, 139, 255, .95); }
.help-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.help-go:hover svg { transform: translateX(4px); }

/* ---------- Короткие сообщения ---------- */
.toast {
  position: fixed; z-index: 55; left: 50%; bottom: calc(var(--console-h) + 28px);
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px; color: var(--ink); text-align: center;
  box-shadow: 0 16px 40px -16px #000;
  animation: toastIn .5s var(--spring);
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Средние экраны ---------- */
@media (max-width: 1360px) {
  .zone { padding: 14px 16px 16px; }
  .zone-hint { display: none; }
  .autopilot span { display: none; }
  .autopilot { width: 40px; padding: 0; justify-content: center; }
  .x-t small { font-size: 11px; }
}
@media (max-width: 1180px) {
  .hud-tag { display: none; }
  .hud { grid-template-columns: 1fr auto; }
  .console { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "travel travel" "era explore"; }
  .zone-travel { grid-area: travel; }
  .zone-era { grid-area: era; }
  .zone-explore { grid-area: explore; }
  .zone-era::before { display: none; }
  .zone-travel { border-bottom: 1px solid rgba(255, 255, 255, .07); padding-bottom: 8px; }
  .zone-era, .zone-explore { padding-top: 10px; padding-bottom: 12px; }
  .zone-era .zone-k, .zone-explore .zone-k { display: none; }
  .zone-explore::before { top: 10px; bottom: 12px; }
  .explore { grid-template-columns: repeat(2, minmax(0, 200px)); }
}

/* ---------- Телефон ---------- */
@media (max-width: 640px) {
  :root { --hud-h: 56px; }
  .hud { padding: 0 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 18px; }
  .brand-sub { display: none; }
  .sys-btn span { display: none; }
  .sys-btn { width: 36px; padding: 0; justify-content: center; }
  .console { margin: 0 8px 8px; border-radius: 20px; }
  .zone { padding-left: 12px; padding-right: 12px; }
  .zone-travel .zone-k { display: none; }
  .zone-travel { padding-top: 10px; }
  .travel { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .tl-arrow { display: none; }
  .tl-track { margin: 0 14px; height: 48px; }
  .tl-stop small { display: none; }
  .tl-stop b { font-size: 11px; }
  .autopilot { width: 36px; height: 36px; }
  .clock-year { font-size: 26px; }
  .era-read { gap: 10px; }
  .clock-era { font-size: 11px; }
  .era-more { font-size: 11px; }
  .explore { grid-template-columns: auto auto; gap: 6px; }
  .xbtn { width: 50px; height: 50px; padding: 0; justify-content: center; }
  .x-t { display: none; }
  .info { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 78dvh; border-radius: 24px 24px 0 0; }
  .help-card { padding: 24px 20px 20px; border-radius: 24px; }
  .help-title { font-size: 20px; margin-bottom: 18px; }
  .help-steps { grid-template-columns: 1fr; gap: 8px; }
  .help-step { padding: 14px 14px 12px; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; row-gap: 4px; }
  .help-n { grid-row: span 3; margin: 0; }
  .help-go { width: 100%; justify-content: center; margin-top: 16px; }
}

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

/* фокус с клавиатуры — в цвет эпохи, а не стандартная рамка браузера */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.era-read:focus-visible, .xbtn:focus-visible { outline-offset: 2px; }
