:root {
  --panel: rgba(8, 11, 19, 0.78);
  --line: rgba(255, 255, 255, 0.1);
  --text: #dde5f2;
  --mute: #8794ab;
  --time: #ffb65c;
  --obs: #6fe0d0;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Avenir Next", "Helvetica Neue", -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #020308; color: var(--text); font: 13px/1.45 var(--sans); }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#c:active { cursor: grabbing; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* подписи объектов */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lb { position: absolute; left: 0; top: 0; height: 18px; padding: 0 6px; white-space: nowrap; pointer-events: auto; cursor: pointer;
  font-size: 11.5px; line-height: 18px; color: #c5cfe0; text-shadow: 0 0 4px #000, 0 0 2px #000; border-radius: 9px; will-change: transform; }
.lb:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.lb em { font: 10px var(--mono); font-style: normal; color: var(--obs); margin-left: 6px; opacity: 0.85; }
.lb.k-galaxy, .lb.k-cluster, .lb.k-structure, .lb.k-quasar { color: #b9c4ee; }
.lb.k-structure, .lb.k-cluster { letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; }
.lb.k-planet, .lb.k-dwarf { color: #e8edf7; }
.lb.k-moon, .lb.k-exo { color: #aab5c8; }
.lb.k-nebula, .lb.k-starcluster { color: #e2a9bd; }
.lb.sel { color: #fff; background: rgba(255, 182, 92, 0.2); box-shadow: inset 0 0 0 1px rgba(255, 182, 92, 0.6); }
.lb.obs span::before { content: "◉ "; color: var(--obs); }

/* верхняя полоса */
#top { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
#top > * { pointer-events: auto; }
#brand { font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase; font-size: 12px; color: #fff; padding: 0 8px; opacity: 0.9; }
.chip { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: border-color .15s, background .15s; }
button.chip:hover { border-color: rgba(255, 255, 255, 0.35); }
.chip.static { color: var(--mute); cursor: default; }
.chip.static b { color: var(--obs); font-weight: 600; }
.chip.round { width: 34px; padding: 0; justify-content: center; font-size: 10px; }
.chip.round.main { width: 44px; height: 34px; border-radius: 17px; background: var(--time); color: #1a1206; border-color: transparent; font-size: 12px; }
.chip.on { border-color: var(--time); color: var(--time); }
#toggles { margin-left: auto; display: flex; gap: 4px; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#toggles label { display: flex; align-items: center; cursor: pointer; }
#toggles input { display: none; }
#toggles span { padding: 2px 9px; border-radius: 10px; color: var(--mute); font-size: 12px; }
#toggles input:checked + span { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* панели */
aside { position: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#catalog { top: var(--topH); left: 12px; bottom: 190px; width: 248px; padding: 10px; display: none; flex-direction: column; }
#catalog.open { display: flex; }
#search { width: 100%; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); outline: none; }
#search:focus { border-color: rgba(255, 255, 255, 0.35); }
#catList { overflow-y: auto; margin-top: 8px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
#catList h4 { margin: 12px 4px 4px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
#catList h4:first-child { margin-top: 2px; }
#catList button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 4px 6px; border-radius: 6px; color: #c9d2e2; }
#catList button:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
#catList i { flex: none; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }

#info { top: var(--topH); right: 12px; width: 300px; max-height: calc(100vh - 250px); overflow-y: auto; padding: 16px 16px 14px; display: none; scrollbar-width: thin; }
#info.open { display: block; }
#infoClose { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--mute); font-size: 20px; line-height: 1; }
#infoClose:hover { color: #fff; }
#infoKind { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); padding-right: 20px; }
#info h2 { margin: 4px 0 8px; font-size: 20px; line-height: 1.2; font-weight: 600; color: #fff; text-wrap: balance; }
#infoDesc { margin: 0 0 12px; color: #b8c2d4; }
dl { margin: 0; }
dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); }
dt { color: var(--mute); }
dd { margin: 0; text-align: right; font: 12px var(--mono); color: #eef2f8; }
#infoLiveTitle { margin: 14px 0 4px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--obs); }
#infoLive dd { color: var(--obs); }
.row { display: flex; gap: 8px; margin-top: 14px; }
.act { flex: 1; height: 32px; border-radius: 8px; border: 0; background: var(--time); color: #1a1206; font-weight: 600; }
.row .act:first-child { flex: 0 0 84px; }
.act.alt { background: none; border: 1px solid rgba(111, 224, 208, 0.5); color: var(--obs); font-weight: 500; }
.act:disabled { opacity: 0.45; cursor: default; }
.act:not(:disabled):hover { filter: brightness(1.12); }

#hint { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 32px)); padding: 20px 22px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: opacity .4s; }
#hint.gone { opacity: 0; pointer-events: none; }
#hint b { font-size: 16px; color: #fff; }
#hint p { margin: 8px 0; color: #b8c2d4; }
#hint .act { width: 100%; margin-top: 8px; height: 36px; }
#hintClose { position: absolute; top: 8px; right: 12px; border: 0; background: none; color: var(--mute); font-size: 20px; }
#toast { position: fixed; left: 50%; bottom: 200px; transform: translateX(-50%); padding: 8px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
  opacity: 0; transition: opacity .4s; pointer-events: none; text-align: center; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; }

#scale { position: absolute; left: 6px; bottom: calc(100% + 10px); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; pointer-events: none; font: 11px var(--mono); color: #cfd7e6; text-shadow: 0 0 4px #000; }
#scaleBar { height: 5px; border: 1px solid #cfd7e6; border-top: 0; }

/* нижняя панель времени */
#dock { position: fixed; left: 12px; right: 12px; bottom: 12px; padding: 12px 16px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#dockTop { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; min-height: 40px; }
#epoch { flex: 1; min-width: 0; }
#epoch b { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--time); }
#epoch span { display: block; color: #b8c2d4; max-width: 760px; font-size: 12.5px; }
#clock { text-align: right; flex: none; }
#clock b { display: block; font: 600 19px var(--mono); color: #fff; letter-spacing: -0.02em; }
#clock span { font: 11px var(--mono); color: var(--mute); }
#tlWrap { position: relative; margin: 10px 0 20px; }
#tl { width: 100%; margin: 0; display: block; }
#tlTicks { position: absolute; left: 8px; right: 8px; top: -3px; height: 0; }
#tlTicks button { position: absolute; width: 9px; height: 9px; margin-left: -4.5px; padding: 0; border-radius: 50%; border: 1.5px solid var(--time); background: #0a0d15; z-index: 2; }
#tlTicks button:hover { background: var(--time); }
#tlTicks button.now { background: #fff; border-color: #fff; }
#tlScale { position: absolute; left: 8px; right: 8px; top: 16px; font: 10px var(--mono); color: var(--mute); pointer-events: none; }
#tlScale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
#tlScale span:first-child { transform: none; }
#tlScale span:last-child { transform: translateX(-100%); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 16px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #ff8a3c, #5c4a6e 45%, #3d5a8c); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 18px; margin-top: -7.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }
#rate::-webkit-slider-runnable-track { background: rgba(255, 255, 255, 0.22); }
#rate::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; background: var(--time); box-shadow: none; }
#ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#rateBox { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
#rate { width: 190px; }
#rateTxt { font: 12px var(--mono); color: var(--time); min-width: 150px; }
#presets { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
#presets button { border: 0; background: none; color: var(--mute); padding: 4px 8px; border-radius: 10px; font-size: 12px; }
#presets button:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

@media (max-width: 900px) {
  #brand, #toggles span { font-size: 11px; }
  #obs { display: none; }
  #epoch span { display: none; }
  #presets { display: none; }
  #info { left: 12px; right: 12px; width: auto; top: auto; bottom: 200px; max-height: 40vh; }
  #catalog { bottom: 200px; }
  #rate { width: 110px; }
}

/* история Земли в карточке */
.sec { margin: 14px 0 4px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--time); }
#stName { display: block; color: #fff; font-size: 14px; }
#stDesc { margin: 4px 0 8px; color: #b8c2d4; }
#stList { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
#stList button { border: 1px solid var(--line); background: none; color: var(--mute); border-radius: 10px; padding: 2px 8px; font-size: 11px; }
#stList button:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
#stList button.on { color: #1a1206; background: var(--time); border-color: transparent; }

/* экскурсия */
#tour { position: fixed; right: 12px; top: var(--topH); width: min(340px, calc(100vw - 24px)); padding: 14px 18px 14px; display: none;
  background: var(--panel); border: 1px solid rgba(255, 182, 92, 0.35); border-radius: 14px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 3; }
#tour.open { display: block; }
#tourN { font: 10px var(--mono); letter-spacing: 0.1em; color: var(--time); }
#tour h3 { margin: 2px 0 6px; font-size: 17px; font-weight: 600; color: #fff; }
#tour p { margin: 0; color: #c3ccdb; max-height: 30vh; overflow-y: auto; }
#tour .row { margin-top: 12px; justify-content: flex-end; }
#tour .row .act { flex: 0 0 120px; }
#tourClose { position: absolute; top: 8px; right: 12px; border: 0; background: none; color: var(--mute); font-size: 20px; line-height: 1; }
#tourClose:hover { color: #fff; }
#hint .act.alt { color: var(--mute); border-color: var(--line); font-size: 12px; }
#credits { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--mute); }

@media (max-width: 900px) { #tour { top: auto; bottom: 200px; left: 12px; width: auto; } }

/* вид от первого лица */
#lookbar { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 24px); padding: 6px 10px 6px 14px; background: var(--panel); border: 1px solid rgba(111, 224, 208, 0.4); border-radius: 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 4; }
#lookbar.open { display: flex; }
#lookbar b { color: var(--obs); font-weight: 600; }
#lookbar .lbl { color: var(--mute); font-size: 12px; }
#lookTargets { display: flex; gap: 4px; flex-wrap: wrap; }
#lookbar button { border: 1px solid var(--line); background: none; border-radius: 11px; padding: 2px 9px; font-size: 12px; color: #c9d2e2; }
#lookbar button:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
#lookbar button.on { background: var(--obs); color: #06201c; border-color: transparent; }
#lookbar label { display: flex; align-items: center; cursor: pointer; }
#lookbar label input { display: none; }
#lookbar label span { padding: 2px 9px; border-radius: 11px; border: 1px solid var(--line); font-size: 12px; color: var(--mute); }
#lookbar label input:checked + span { background: #fff; color: #000; border-color: transparent; }
#lookExit { color: var(--time) !important; }
body.looking #c { cursor: crosshair; }
.row.second { margin-top: 8px; }
.row .act { font-size: 12.5px; }
.cmp { display: flex; align-items: center; gap: 10px; min-height: 30px; margin: 6px 0; }
.cmp i { flex: none; border-radius: 50%; }
.cmp i:last-child { border: 1px solid #cfd7e6; }
.cmpT { color: #b8c2d4; font-size: 12px; }
.lb.k-craft { color: #9fe6ff; }
.lb.k-comet { color: #cfeeff; }
#tourVoice { position: absolute; top: 9px; right: 38px; border: 1px solid var(--line); background: none; border-radius: 10px; padding: 1px 8px; font-size: 11px; color: var(--mute); }
#tourVoice.on { background: var(--time); color: #1a1206; border-color: transparent; }
@media (max-width: 900px) {
  #top { flex-wrap: wrap; gap: 6px; }
  #brand { display: none; }
  #lookbar { top: var(--topH); }
  #dock { padding: 10px 12px; }
  #clock b { font-size: 15px; }
  #ctl { gap: 6px; }
  #rateTxt { min-width: 0; }
  #info, #tour { bottom: 215px; }
  #catalog { top: var(--topH); bottom: 215px; width: min(280px, calc(100vw - 24px)); }
  .lb { font-size: 12.5px; height: 22px; line-height: 22px; }
}
.row.second .act:first-child { flex: 1; }
@media (max-width: 900px) {
  #lookbar { left: 12px; right: 12px; transform: none; max-width: none; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  #lookbar > *, #lookTargets > * { flex: none; white-space: nowrap; }
  #lookTargets { flex-wrap: nowrap; }
  #lookbar .lbl { display: none; }
  #info, #tour { max-height: 36vh; overflow-y: auto; }
}

/* подписи появляются и исчезают плавно, без мигания при наложении */
.lb { transition: opacity .3s; }
.lb.off { opacity: 0; pointer-events: none; }

/* путеводитель и сравнение */
.chip.hot { border-color: rgba(255, 182, 92, 0.55); color: var(--time); }
.modal { position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; background: rgba(2, 3, 8, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.mbox { position: relative; width: min(1040px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 22px 26px 26px; background: #0a0d16; border: 1px solid var(--line); border-radius: 18px; scrollbar-width: thin; }
.mbox.narrow { width: min(760px, calc(100vw - 24px)); }
.mbox h2 { margin: 0; font-size: 22px; font-weight: 600; color: #fff; }
.msub { margin: 4px 0 6px; color: var(--mute); }
.mclose { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: var(--mute); font-size: 26px; line-height: 1; }
.mclose:hover { color: #fff; }
#guideBody h4 { margin: 18px 0 8px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--time); font-weight: 600; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ggrid button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; gap: 3px; transition: border-color .15s, background .15s; }
.ggrid button:hover { border-color: rgba(255, 182, 92, 0.6); background: rgba(255, 182, 92, 0.08); }
.ggrid b { color: #fff; font-weight: 600; font-size: 13.5px; }
.ggrid span { color: var(--mute); font-size: 12px; line-height: 1.35; }
.cmpSel { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.cmpSel span { color: var(--mute); }
.cmpSel select { flex: 1; min-width: 0; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #121623; color: var(--text); padding: 0 8px; font: inherit; }
#cmpCanvas { display: block; width: 100%; height: min(380px, 48vh); }
#cmpText { margin: 4px 0 12px; color: #dde5f2; font-size: 14px; }
#cmpPresets { display: flex; flex-wrap: wrap; gap: 6px; }
#cmpPresets button, button.mini { border: 1px solid var(--line); background: none; color: #c9d2e2; border-radius: 11px; padding: 3px 10px; font-size: 12px; }
#cmpPresets button:hover, button.mini:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
button.mini { float: right; margin-top: 12px; color: var(--time); border-color: rgba(255, 182, 92, 0.4); }
#hint .act.alt2 { background: none; border: 1px solid rgba(255, 182, 92, 0.5); color: var(--time); font-weight: 500; }
.row.second .act { flex: 1 !important; }

.ringLb { position: absolute; left: 0; top: 0; font: 10px var(--mono); color: #9fc0ff; text-shadow: 0 0 4px #000; white-space: nowrap; pointer-events: none; }

#fatal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(2, 3, 8, 0.82); }
#fatal.open { display: flex; }
#fatal > div { max-width: 420px; padding: 22px 24px; text-align: center; background: #0a0d16; border: 1px solid var(--line); border-radius: 16px; }
#fatal p { margin: 0 0 14px; color: #dde5f2; font-size: 14px; }
#fatal button { height: 34px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--time); color: #1a1206; font-weight: 600; }

/* панели подстраиваются под высоту нижней панели времени */
:root { --dockH: 150px; }
#catalog { bottom: calc(var(--dockH) + 46px); }
#info { max-height: calc(100vh - var(--topH) - var(--dockH) - 30px); }
#tour { max-height: calc(100vh - var(--topH) - var(--dockH) - 30px); overflow-y: auto; }
body.looking #info, body.looking #tour { max-height: calc(100vh - var(--topH) - var(--dockH) - 84px); }
/* панель вида от первого лица — внизу, над временем: не спорит с каталогом и карточкой */
#lookbar { top: auto; bottom: calc(var(--dockH) + 22px); left: 170px; right: 12px; transform: none; max-width: none; flex-wrap: nowrap; justify-content: center; overflow-x: auto; scrollbar-width: none; }
#lookbar > *, #lookTargets > * { flex: none; white-space: nowrap; }
#lookTargets { flex-wrap: nowrap; }
#info .row { margin: 0 0 8px; }
#info .row.second { margin: 0 0 12px; }
.chip:disabled { opacity: 0.4; cursor: default; }
#catList .empty { color: var(--mute); padding: 10px 6px; margin: 0; }
button.mini.inl { float: none; margin: 0 0 0 6px; padding: 1px 7px; }
.keys { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--mute); font-size: 12.5px; }
.keys b { color: #dde5f2; }
@media (max-width: 900px) {
  #catalog { top: var(--topH); bottom: calc(var(--dockH) + 24px); z-index: 6; background: #0a0d16; }
  #info, #tour { top: auto; bottom: calc(var(--dockH) + 24px); max-height: 38vh; }
  #lookbar { left: 12px; top: auto; bottom: calc(var(--dockH) + 22px); justify-content: flex-start; }
  body.looking #info, body.looking #tour { bottom: calc(var(--dockH) + 70px); max-height: 32vh; }
  #scale { display: none; }
}

/* правки по ревью */
#tlTicks button.now { z-index: 3; }
:root { --tourH: 0px; }
body.touring #info { top: calc(var(--topH) + var(--tourH) + 10px); max-height: calc(100vh - var(--topH) - var(--tourH) - 10px - var(--dockH) - 30px); }
/* переключатели доступны с клавиатуры: поле скрыто визуально, но получает фокус */
#toggles input, #lookbar label input { display: inline; position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
#toggles input:focus-visible + span, #lookbar label input:focus-visible + span { outline: 2px solid var(--obs); outline-offset: 1px; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--obs); outline-offset: 1px; }
@media (max-width: 900px) { body.touring #info { top: auto; bottom: calc(var(--dockH) + 34px + var(--tourH)); max-height: 28vh; } }
@media (max-height: 480px) { #epoch span, #presets, #tlScale { display: none; } #tlWrap { margin: 6px 0 8px; } #dock { padding: 8px 12px; } }

/* верхняя полоса переносится на вторую строку, если кнопки не помещаются; панели встают под ней */
:root { --topH: 54px; }
#top { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 1320px) { #brand { display: none; } }

#fate { height: 28px; border-radius: 14px; border: 1px solid var(--line); background: #0d111b; color: var(--mute); padding: 0 8px; font: inherit; font-size: 12px; max-width: 210px; }
@media (max-width: 900px) { #fate { display: none; } }

/* повтор сюжета */
#replay { position: fixed; left: 50%; bottom: calc(var(--dockH) + 22px); transform: translateX(-50%); display: none; align-items: center; z-index: 5; max-width: calc(100vw - 24px);
  background: var(--panel); border: 1px solid rgba(255, 182, 92, 0.5); border-radius: 17px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#replay.on { display: flex; }
body.looking #replay { bottom: calc(var(--dockH) + 70px); }
body.present #replay { display: none; }
#replayBtn { height: 32px; padding: 0 6px 0 14px; border: 0; background: none; color: var(--time); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#replayBtn b { color: #fff; font-weight: 600; }
#replayBtn:hover { filter: brightness(1.2); }
#replayX { height: 32px; width: 30px; border: 0; background: none; color: var(--mute); font-size: 17px; }
#replayX:hover { color: #fff; }
#tour .row .act#tourAgain { flex: 0 0 40px; }

/* подсказка о наблюдателе */
#obs b { color: var(--obs); font-weight: 600; }
#obsPop { position: fixed; width: 320px; max-width: calc(100vw - 24px); padding: 14px 16px; display: none; z-index: 12; background: #0a0d16; border: 1px solid rgba(111, 224, 208, 0.45); border-radius: 14px; }
#obsPop.on { display: block; }
#obsPop > b { color: #fff; font-size: 14px; }
#obsPop p { margin: 6px 0; color: #b8c2d4; font-size: 12.5px; }
#obsPop .how { color: var(--mute); }
#obsQuick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
#obsQuick button { border: 1px solid var(--line); background: none; color: #c9d2e2; border-radius: 12px; padding: 3px 10px; font-size: 12px; }
#obsQuick button:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
#obsQuick button.on { background: var(--obs); color: #06201c; border-color: transparent; }
@media (max-width: 900px) { #obs { display: inline-flex; } }

/* всплывающие подсказки */
#tip { position: fixed; left: 0; top: 0; max-width: 280px; padding: 6px 10px; border-radius: 8px; background: #141926; border: 1px solid rgba(255, 255, 255, 0.18); color: #dde5f2;
  font-size: 12px; line-height: 1.35; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
#tip.on { opacity: 1; }
body.present #tip { display: none; }
@media (hover: none) { #tip { display: none; } }

/* шкала первого года Вселенной */
#tlEarlyWrap { position: relative; margin: 10px 0 22px; display: none; }
body.early #tlEarlyWrap { display: block; }
body.early #tlWrap { opacity: 0.35; }
#tlEarly { width: 100%; margin: 0; display: block; }
#tlEarly::-webkit-slider-runnable-track { background: linear-gradient(90deg, #b48cff, #ffffff 30%, #ffd37a 70%, #ff8a3c); }
#tlEarlyTicks { position: absolute; left: 8px; right: 8px; top: -3px; height: 0; }
#tlEarlyTicks button { position: absolute; width: 9px; height: 9px; margin-left: -4.5px; padding: 0; border-radius: 50%; border: 1.5px solid #b48cff; background: #0a0d15; z-index: 2; }
#tlEarlyTicks button:hover { background: #b48cff; }
#tlEarlyScale { position: absolute; left: 8px; right: 8px; top: 16px; font: 10px var(--mono); color: var(--mute); pointer-events: none; }
#tlEarlyScale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
#tlEarlyScale span:first-child { transform: none; }
body.early #btnEarly { border-color: #b48cff; color: #d9c4ff; }

/* первый год: шаги по эпохам и подпись-сравнение */
#earlyBar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
#earlySteps { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#earlySteps button { flex: none; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--mute); font-size: 12px; white-space: nowrap; }
#earlySteps button:hover { color: #fff; }
#earlySteps button.on { border-color: #b48cff; color: #fff; background: rgba(180,140,255,.18); }
#earlyBar label { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--mute); white-space: nowrap; }
#earlyNext { border-color: #b48cff; color: #e6d8ff; }
body.early #tlWrap, body.early #rate, body.early #fate, body.early #presets { display: none; }
#earlyCap { position: fixed; left: 50%; top: calc(var(--topH, 56px) + 18px); transform: translateX(-50%); display: none; text-align: center; pointer-events: none; z-index: 5;
  padding: 10px 18px; border-radius: 14px; background: rgba(8,10,18,.72); border: 1px solid var(--line); backdrop-filter: blur(8px); max-width: min(720px, calc(100vw - 32px)); }
body.early #earlyCap { display: block; }
#earlyCap b { display: block; font-size: 20px; color: #fff; line-height: 1.25; }
#earlyCap span { display: block; margin-top: 4px; font: 12px var(--mono); color: #d9c4ff; }
#earlyCap small { display: block; margin-top: 4px; font-size: 11px; color: var(--mute); }
@media (max-width: 700px) { #earlyCap b { font-size: 15px; } #earlyCap small { display: none; } }

#earlyCap b, #earlyCap span, #earlyCap small { pointer-events: auto; }
#earlyBefore { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -60%); width: min(520px, calc(100vw - 32px)); display: none; z-index: 40;
  padding: 18px 22px; border-radius: 16px; background: var(--panel); border: 1px solid #b48cff; backdrop-filter: blur(12px); }
body.early #earlyBefore.open { display: block; }
#earlyBefore h3 { margin: 0 0 8px; font-size: 17px; color: #fff; }
#earlyBefore p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; color: #c9d2e2; }
#earlyBefore > button { position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; border: 0; background: none; color: var(--mute); font-size: 20px; }

/* мерки первого года: знакомые предметы в масштабе шара Вселенной */
#earlyRef { position: fixed; left: 50%; top: 50%; width: 0; height: 0; display: none; pointer-events: none; z-index: 3; }
body.early #earlyRef { display: block; }
body.early.looking #earlyRef { display: none; }
#earlyRef > * { position: absolute; left: 0; top: 0; }
#refIcon { transform: translate(-50%, -50%); line-height: 1; font-style: normal; font-weight: 400; filter: drop-shadow(0 0 6px rgba(0,0,0,.8)); }
#refLbl, #refOuterLbl { white-space: nowrap; font: 12px var(--mono); color: #fff; padding: 3px 9px; border-radius: 8px; background: rgba(8,10,18,.78); border: 1px solid var(--line); }
#refOuterLbl { border-color: #b48cff; color: #e6d8ff; }
#refOuter { transform: translate(-50%, -50%); border-radius: 50%; border: 2px dashed #b48cff; box-sizing: border-box; }
@media (max-width: 700px) { #refLbl, #refOuterLbl { font-size: 10px; white-space: normal; width: 80vw; text-align: center; } }

#btnAfter { display: none; border-color: #b48cff; color: #e6d8ff; }
body.early #btnAfter { display: inline-flex; align-items: center; }

#tlEarlyLine { position: relative; }

/* рисунки мерок и перенос шагов */
#refIcon { display: block; filter: drop-shadow(0 0 10px rgba(0,0,0,.75)); }
#refIcon svg { width: 100%; height: 100%; display: block; }
#refOuterLbl { display: inline-flex; align-items: center; gap: 7px; }
#refOuterIc { width: 22px; height: 22px; flex: none; }
#refOuterIc svg { width: 100%; height: 100%; display: block; }
#refOuterTxt { position: static !important; }
body.norefs #earlyRef { display: none !important; }
#earlySteps { flex-wrap: wrap; overflow: visible; flex: 1 1 100%; order: 5; }

#brand { text-decoration: none; }
#brand:hover { opacity: 1; color: #ffcf6b; }
#credits a { color: #c9d2e2; }

/* ссылки на страницу «О проекте» */
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; white-space: nowrap; }
#btnAbout { border-color: rgba(255, 207, 107, .55); color: #ffe7b0; }
#btnAbout:hover { border-color: #ffcf6b; color: #fff; }
#hintAbout { display: block; margin-top: 10px; text-align: center; font-size: 12.5px; color: #ffe7b0; text-decoration: underline; text-underline-offset: 3px; }
#hintAbout:hover { color: #fff; }
