/* урокиастрономии.рф — небесный симулятор.
 * Оформление — как у урок3Д (open3d): светлый интерфейс, Montserrat,
 * логотип из цветных букв, белые карточки, сегментные переключатели.
 * Тёмное только само небо внутри круга горизонта.
 * Montserrat лежит в vendor/fonts: Google Fonts школьные сети режут. */
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../vendor/fonts/montserrat-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(../vendor/fonts/montserrat-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 600;
  src: url(../vendor/fonts/montserrat-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 700;
  src: url(../vendor/fonts/montserrat-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 800;
  src: url(../vendor/fonts/montserrat-cyrillic-800-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../vendor/fonts/montserrat-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(../vendor/fonts/montserrat-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 600;
  src: url(../vendor/fonts/montserrat-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 700;
  src: url(../vendor/fonts/montserrat-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 800;
  src: url(../vendor/fonts/montserrat-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --accent: #2563eb; --accent-d: #1d4ed8; --accent-l: #eaf1fe; --accent-b: #bfd3fb;
  --ink: #172033; --ink-2: #2f3a4b; --muted: #5b6778; --muted-2: #8591a3; --faint: #9aa5b5;
  --line: #e2e8f1; --line-2: #edf2f8; --panel: #ffffff; --soft: #f7faff; --app: #eef4fd;
  --seg: #e7ecf1; --ok: #2f9e57;
  --shadow: 0 14px 34px rgba(45, 80, 110, .16);
  --shadow-sm: 0 2px 5px rgba(45, 80, 110, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Армянских букв в Montserrat нет: их браузер берёт из следующих гарнитур
 * списка — системных, со шрифтом под армянский на всех ОС (Noto — Android и
 * Linux, Sylfaen — Windows, на macOS и iOS — системный). */
body { font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Armenian", "Noto Sans",
  Helvetica, Arial, Sylfaen, sans-serif;
  color: var(--ink); background: var(--app); -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
/* Капсула с отступом от края, как шапка урок3Д (.topcard) и публичных
 * страниц RobX: скругление 28 px, тонкая рамка, мягкая тень. Она же — на
 * страницах mks/. */
.topbar { grid-row: 1; position: relative; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 18px 0 16px;
  margin: 8px 8px 0; background: rgba(255, 255, 255, .92); border: 1px solid rgba(15, 23, 42, .07); border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 20px 44px -24px rgba(40, 60, 130, .28), 0 3px 10px -6px rgba(40, 60, 130, .14);
  min-width: 0; z-index: 3; }
.logo { display: flex; align-items: center; gap: 3px; text-decoration: none; flex: none; }
.logo b { width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.logo .w { margin-left: 7px; font-weight: 800; font-size: 16px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
/* Разделы не сжимаются (иначе ссылки наезжают на соседей) — сжимается время
 * справа, а где разделы не помещаются, их сменяет кнопка «Разделы». */
.topnav { display: flex; flex: none; gap: 2px; margin-left: 6px; }
.topnav a { padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none;
  white-space: nowrap; transition: background .12s, color .12s; }
.topnav a:hover { background: var(--line-2); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--accent-l); color: var(--accent); }
/* На телефоне разделы — списком под кнопкой «Разделы» (details: работает и
 * без скрипта, js/nav.js закрывает его щелчком мимо и Escape). */
.navm { display: none; position: relative; margin-left: auto; }
.navm summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 700; cursor: pointer; user-select: none; }
.navm summary::-webkit-details-marker { display: none; }
.navm summary::before { content: ""; width: 14px; height: 10px; background:
  linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
  linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
  linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
.navm[open] summary { border-color: var(--accent-b); color: var(--accent); background: var(--accent-l); }
.navm-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 220px; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.navm-list a { padding: 10px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.navm-list a:hover { background: var(--line-2); }
.navm-list a[aria-current="page"] { background: var(--accent-l); color: var(--accent); }
/* Выбор языка — флажок и код языка, список под ним (details, как меню
 * «Разделы»). Стоит справа: на карте — после времени, на страницах — сразу
 * после разделов. Флаги нарисованы SVG (tools/pages-lib.mjs, FLAG): на
 * Windows флаговых эмодзи нет. */
.langm { position: relative; flex: none; margin-left: auto; }
.topbar-now + .langm { margin-left: 0; }
.langm + .navm { margin-left: 0; }
.langm summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 700; cursor: pointer; user-select: none; }
.langm summary::-webkit-details-marker { display: none; }
.langm[open] summary { border-color: var(--accent-b); color: var(--accent); background: var(--accent-l); }
.flag { width: 20px; height: 14px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); }
.langm-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 170px; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.langm-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.langm-list a:hover { background: var(--line-2); }
.langm-list a[aria-current="true"] { background: var(--accent-l); color: var(--accent); }
.topbar-now { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-now::before { content: ""; display: inline-block; vertical-align: 1px; width: 7px; height: 7px; margin-right: 8px;
  border-radius: 50%; background: var(--accent); }

/* ── Рабочая область: карта и панель в одной карточке ──────────────── */
/* Как .work в урок3Д: тот же радиус, углы общие; overflow срезает углы у
 * карты и уехавшей вправо панели. */
.work { grid-row: 2; position: relative; display: flex; min-width: 0; min-height: 0; margin: 8px; border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 28px; overflow: hidden; background: #fff;
  box-shadow: 0 20px 44px -28px rgba(40, 60, 130, .24), 0 3px 10px -6px rgba(40, 60, 130, .10); }

/* ── Карта ─────────────────────────────────────────────────────────── */
.stage { flex: 1; position: relative; min-width: 0; min-height: 0; overflow: hidden; touch-action: none;
  background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #f1f6fd 55%, #e2edf8 100%); }
#sky { display: block; width: 100%; height: 100%; cursor: grab; }
#sky.over { cursor: pointer; }
#sky.dragging { cursor: grabbing; }

.hint { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px 6px 6px 14px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); max-width: calc(100% - 24px); }
.hint button { white-space: nowrap; }

.zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.cbtn { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: rgba(255, 255, 255, .94); border-radius: 50%;
  color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: border-color .12s, color .12s; }
.cbtn:hover { border-color: var(--accent-b); color: var(--accent); }

.tip { position: absolute; pointer-events: none; z-index: 5; max-width: 270px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 13px; font-size: 12.5px; line-height: 1.5; color: var(--muted); box-shadow: var(--shadow); }
.tip b { color: var(--ink); font-size: 14px; font-weight: 700; }
.tip .tip-more { font-size: 11.5px; color: var(--accent); font-weight: 600; }

/* ── Карточка объекта ───────────────────────────────────────────────── */
/* Поверх карты в левом нижнем углу рабочей области. */
.objcard { position: absolute; left: 16px; bottom: 16px; z-index: 4; width: 360px; max-width: calc(100% - 32px);
  max-height: calc(100% - 32px); overflow-y: auto; padding: 14px 16px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(20, 40, 80, .22); }
.oc-head { display: flex; align-items: center; gap: 12px; }
.oc-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #1d3570, #0d1838);
  color: #fff; display: flex; align-items: center; justify-content: center; }
.oc-ic i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 9px var(--c, #fff); }
.oc-ic svg { display: block; }
.oc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.oc-title b { font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.oc-title small { font-size: 12.5px; font-weight: 600; color: var(--muted-2); }
.oc-x { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: var(--line-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.oc-x:hover { background: var(--accent-l); color: var(--accent); }
.oc-now { margin: 12px 0 10px; padding: 8px 11px; border-radius: 10px; background: var(--accent-l); color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.oc-now b { color: var(--accent); font-weight: 800; }
.oc-facts { margin: 0; }
.oc-facts > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.oc-facts > div:first-child { border-top: 0; }
.oc-facts dt { color: var(--muted-2); font-weight: 600; }
.oc-facts dd { margin: 0; color: var(--ink); font-weight: 500; }
.oc-about { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.oc-link { display: inline; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: none; }
.oc-link:hover { text-decoration: underline; }
.oc-links { margin-top: 10px; font-size: 13px; }

/* ── Панель ────────────────────────────────────────────────────────── */
/* Панель — стопка белых карточек на светлой подложке, как боковые панели
 * урок3Д: место, время, и вкладки «Что видно / МКС / Слои». Вкладки, а не
 * длинная лента: всё нужное помещается в экран без прокрутки. */
.panel { flex: none; position: relative; width: 340px; display: flex; flex-direction: column; min-height: 0; z-index: 2;
  background: #f3f6fb; border-left: 1px solid var(--line); transition: margin-right .28s ease; }
/* Прокрутка — у внутреннего блока, а не у самой панели: иначе она срезала
 * бы «язычок», который торчит за её левый край. */
.panel-in { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.panel-in::-webkit-scrollbar { width: 11px; }
.panel-in::-webkit-scrollbar-thumb { background: #d6dee8; border-radius: 11px; border: 3px solid #f3f6fb; }
/* «Язычок» на левом краю панели — сворачивает и разворачивает её, как
 * библиотеку фигур в урок3Д (.libTab). Свёрнутая панель уезжает вправо
 * отрицательным отступом, язычок остаётся у края карточки. */
.panel-tab { position: absolute; left: -17px; top: 50%; transform: translateY(-50%); width: 17px; height: 58px; padding: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-right: 0;
  border-radius: 9px 0 0 9px; color: #8795a0; cursor: pointer; box-shadow: -3px 2px 7px rgba(45, 80, 110, .10); }
.panel-tab:hover { color: var(--accent); }
.panel-tab svg { flex: none; transition: transform .28s ease; }
.panel-tab-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.work.closed .panel { margin-right: -340px; }
.work.closed .panel-tab svg { transform: rotate(180deg); }
.pc { flex: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 1px 2px rgba(45, 80, 110, .05); }
.pc-lab { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; }
.pc-lab-in { margin: 16px 0 4px; }
.pc-lab-in:first-child { margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; }
.coords { color: var(--muted-2); font-size: 12px; font-weight: 500; margin-top: 8px; }

/* Кнопки: белая с рамкой (topbtn) и квадратная со значком */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line);
  background: #fff; border-radius: 9px; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--accent-l); border-color: var(--accent-b); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-d); }
.ibtn { width: 42px; height: 42px; flex: none; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s, color .12s; }
.ibtn:hover, .ibtn.on { border-color: var(--accent-b); color: var(--accent); background: var(--accent-l); }
.ibtn.busy svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Выпадающий список — свой, а не системный <select>: тот на каждой ОС свой
 * и в оформление не встаёт (на macOS — серый «пилюлей», на Windows — плоский). */
.ddl { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 34px 0 12px;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left; transition: border-color .12s, box-shadow .12s; }
.ddl:hover { border-color: var(--accent-b); }
.ddl[aria-expanded="true"], .ddl:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); outline: none; }
.ddl .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ddl .car { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: #8795a0; pointer-events: none; }

.menu { position: fixed; z-index: 5000; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 16px 34px rgba(45, 80, 110, .22); padding: 6px; min-width: 220px; }
.menu-search { position: relative; margin: 0 0 6px; flex: none; }
.menu-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.menu-search input { width: 100%; border: 1px solid var(--line); background: #f5f8fa; border-radius: 9px; padding: 9px 11px 9px 32px;
  font-size: 13px; color: var(--ink); outline: none; }
.menu-search input:focus { border-color: var(--accent); background: #fff; }
.menu-list { flex: 1 1 auto; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.menu-list::-webkit-scrollbar { width: 10px; }
.menu-list::-webkit-scrollbar-thumb { background: #dce3ea; border-radius: 10px; border: 3px solid #fff; }
.menu-item { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; }
.menu-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .tz { flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted-2); }
.menu-item .ck { flex: none; width: 14px; color: var(--accent); visibility: hidden; }
.menu-item:hover, .menu-item.hl { background: var(--accent-l); }
.menu-item.on { color: var(--accent); font-weight: 700; }
.menu-item.on .ck { visibility: visible; }
.menu-head { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 8px 10px 6px; }
.menu-empty { padding: 12px 10px; font-size: 13px; color: var(--muted-2); }

/* ── Время: «часы», полоса дня, шаги ─────────────────────────────── */
.tc-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* «Часы» — свой текст, а не поле ввода: формат поля задаёт браузер, и в
 * английском он 12-часовой. Щелчок открывает обычные поля (.tc-edit). */
.tc-face { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; margin: -4px 0 0 -8px; padding: 2px 8px 4px;
  border: 0; border-radius: 10px; background: none; font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.tc-face:hover { background: var(--soft); }
.tc-face:focus { outline: none; }
.tc-face:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, .22); }
.tc-clock { font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tc-date { font-size: 13px; font-weight: 600; color: var(--muted); }
.tc-edit { display: flex; gap: 6px; margin-top: 10px; }
.tc-edit input { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); outline: none; color-scheme: light; }
.tc-edit input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.tc-edit .ibtn { width: 40px; height: 40px; color: var(--accent); }
.skychip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--soft);
  border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.skychip i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sky, #101c40); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cloudchip svg { flex: none; color: var(--muted-2); }

/* Полоса дня: дорожка ползунка раскрашена светом неба на этот день — ночь,
 * три сумерек, день, — и видно, где темнеет. Цвета считает js/sky.js. */
.dayline { margin: 12px 0 0; }
.dayline input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; }
.dayline input:focus { outline: none; }
.dayline input::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--day, #dfe7f2); box-shadow: inset 0 0 0 1px rgba(15, 30, 60, .08); }
.dayline input::-moz-range-track { height: 10px; border-radius: 5px; background: var(--day, #dfe7f2); box-shadow: inset 0 0 0 1px rgba(15, 30, 60, .08); }
.dayline input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -5px; border-radius: 50%; background: #fff;
  border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(45, 80, 110, .3); }
.dayline input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(45, 80, 110, .3); }
.dayline input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(37, 99, 235, .22); }
.dayline-scale { display: flex; justify-content: space-between; padding: 0 3px; margin-top: 3px; font-size: 10.5px; font-weight: 600; color: var(--faint); }
/* Облака по часам — полоска под полосой дня, на тех же часах: чем гуще
 * облака, тем темнее час (js/sky.js, updateWeather). */
.cloudline { display: flex; height: 6px; margin: 2px 0 0; border-radius: 3px; overflow: hidden; background: var(--line-2); }
.cloudline i { flex: 1; background: var(--cloud, #6f7f9c); }
.cloudline i.none { background: transparent; }
/* Полоса года под полосой дня — второй круг подвижной карты: тот же час в
 * каждый день года. */
.yearline { margin-top: 8px; }
.sunrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.sunrow > div { min-width: 0; padding: 7px 9px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line-2); }
.sunrow b { display: block; font-size: 14.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Подпись может перенестись: «օրվա տևողություն» в треть панели не влезает. */
.sunrow small { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 1.25; color: var(--muted-2); }
.sunrow svg { flex: none; color: #e6a23c; }

/* Шаги по времени — одна сгруппированная полоса, «Сейчас» пошире */
.stepgroup { display: grid; grid-template-columns: 1fr 1fr 1.45fr 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.stepgroup button { min-width: 0; height: 36px; padding: 0; border: 0; border-left: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.stepgroup button:first-child { border-left: 0; }
.stepgroup button:hover { background: var(--accent-l); color: var(--accent); }
.stepgroup .now { color: var(--accent); font-weight: 700; }
.speedlab { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }

/* Сегментный переключатель — как .seg в инспекторе урок3Д */
.seg { display: flex; gap: 2px; background: var(--seg); border-radius: 9px; padding: 3px; }
.seg button { flex: 1; min-width: 0; height: 30px; border: 0; background: transparent; border-radius: 7px; color: var(--muted); cursor: pointer;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: color .12s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; box-shadow: 0 1px 2px rgba(45, 80, 110, .16); color: var(--accent); }

/* ── Вкладки ──────────────────────────────────────────────────────── */
.pc-tabs { padding: 0; }
.ptabs { display: flex; padding: 0 6px; border-bottom: 1px solid var(--line-2); }
.ptabs button { position: relative; flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px;
  padding: 0 4px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--muted-2); cursor: pointer; white-space: nowrap; transition: color .12s; }
.ptabs button svg { flex: none; }
.ptabs button:hover { color: var(--ink); }
.ptabs button.on { color: var(--accent); }
.ptabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--accent); }
.tabdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 158, 87, .18); }
.tabp { padding: 8px 14px 14px; }
.phint { margin: 8px 0 0; font-size: 12px; color: var(--muted-2); }
.phint a { color: var(--accent); font-weight: 600; text-decoration: none; }
.phint a:hover { text-decoration: underline; }

/* Что видно: светило — значок на «кусочке неба», название, созвездие,
 * справа высота и сторона света (или когда взойдёт). */
.objs, .passes { list-style: none; margin: 0; padding: 0; }
.obj { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 10px; }
.obj.up { cursor: pointer; }
.obj.up:hover { background: var(--soft); }
.obj-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #1d3570, #0d1838);
  display: flex; align-items: center; justify-content: center; }
.obj-ic i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 7px var(--c, #fff); }
.obj-ic svg { display: block; }
.obj-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.obj-main b { font-size: 14px; font-weight: 700; color: var(--ink); }
.obj-main small { font-size: 12px; font-weight: 500; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-pos { flex: none; padding: 4px 9px; border-radius: 999px; background: var(--accent-l); color: var(--accent); font-size: 12.5px; font-weight: 700;
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.obj-off { flex: none; font-size: 12px; font-weight: 600; color: var(--muted-2); text-align: right; white-space: nowrap; }
.obj.down .obj-main b { color: var(--muted); font-weight: 600; }
.obj.down .obj-ic { background: #e8edf5; }
.obj.down .obj-ic i { box-shadow: none; opacity: .75; }
.obj.down .obj-ic svg { opacity: .6; }

/* МКС */
.iss-now { display: flex; align-items: center; gap: 12px; padding: 6px 0 12px; }
.iss-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #1d3570, #0d1838); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.iss-txt { flex: 1; min-width: 0; }
.iss-txt b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.iss-txt span { font-size: 12.5px; color: var(--muted); }
.iss-txt .lnk { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.chip.vis { background: #e3f5ea; color: #1f7a42; }
.chip.day { background: #fff3dc; color: #96600a; }
.chip.shadow { background: var(--line-2); color: var(--muted); }
/* Ближайший видимый пролёт — «ночная» карточка: это то, ради чего вкладку
 * открывают, и она не должна теряться среди строк списка. */
.issnext { border-radius: 14px; padding: 14px 16px; margin-bottom: 4px; background: linear-gradient(140deg, #0f1b3d, #1f3a78); color: #fff; }
.issnext-k { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9fb4dc; margin-bottom: 4px; }
.issnext-t { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.issnext ol { list-style: none; margin: 0 0 12px; padding: 0; }
.issnext li { font-size: 13px; color: #d6e2f7; padding: 2px 0; }
.issnext li b { display: inline-block; min-width: 46px; color: #9cc6f2; font-weight: 700; font-variant-numeric: tabular-nums; }
.issnext-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: #fff;
  color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.issnext-btn:hover { background: var(--accent-l); }
.issnext.none { background: var(--soft); border: 1px solid var(--line-2); color: var(--ink-2); }
.issnext.none .issnext-k { color: var(--muted-2); }
.issnext.none p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.issnext-p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: #c4d2ea; }
a.issnext-btn { text-decoration: none; }
.pass { display: flex; align-items: center; gap: 12px; width: calc(100% + 16px); margin: 0 -8px; padding: 7px 8px; border: 0; border-radius: 10px;
  background: none; font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.pass:hover { background: var(--soft); }
.pass-date { flex: none; width: 44px; padding: 5px 0; border-radius: 10px; background: var(--line-2); text-align: center; line-height: 1.1; }
.pass-date b { display: block; font-size: 16px; font-weight: 800; color: var(--ink); }
.pass-date small { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted-2); }
.pass.is-vis .pass-date { background: #e3f5ea; }
.pass.is-vis .pass-date b { color: #1f7a42; }
.pass-main { flex: 1; min-width: 0; }
.pass-main b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.pass-main small { font-size: 12px; font-weight: 500; color: var(--muted-2); }
.passes .empty { padding: 10px 0; font-size: 13px; color: var(--muted-2); }
.mks-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.mks-link:hover { text-decoration: underline; }

/* Слои: переключатели вместо флажков */
.tg { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); cursor: pointer; }
.tg + .tg { border-top: 1px solid var(--line-2); }
.tg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tg i { flex: none; position: relative; width: 36px; height: 20px; border-radius: 10px; background: #d3dbe6; transition: background .15s; }
.tg i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 30, 60, .25); transition: transform .15s; }
.tg input:checked + i { background: var(--accent); }
.tg input:checked + i::after { transform: translateX(16px); }
.tg input:focus-visible + i { box-shadow: 0 0 0 3px rgba(37, 99, 235, .22); }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 14px 0 0; padding: 12px 14px; background: var(--soft);
  border: 1px solid var(--line-2); border-radius: 12px; }
/* «Откуда данные» во вкладке «Слои» */
.srcs { margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.5; color: var(--muted); }
.srcs li + li { margin-top: 5px; }
.srcs a { color: var(--accent); font-weight: 600; text-decoration: none; }
.srcs a:hover { text-decoration: underline; }

/* Телефон: карта сверху квадратом, панель под ней. */
@media (max-width: 800px) {
  .app { grid-template-rows: auto auto; height: auto; }
  .work { flex-direction: column; margin: 4px; border-radius: 20px; }
  .stage { flex: none; height: min(100vw, 72vh); }
  .objcard { position: static; width: auto; max-width: none; max-height: none; margin: 12px 12px 0;
    box-shadow: 0 6px 20px rgba(20, 40, 80, .12); }
  .panel { width: auto; margin-right: 0 !important; border-left: 0; border-top: 1px solid var(--line); transition: none; }
  .panel-in { overflow: visible; }
  /* На телефоне язычок — ручка над панелью, как у листов урок3Д: полоска и
   * подпись. Свёрнутая панель оставляет одну ручку, а карта растёт на весь
   * экран — её можно крутить и увеличивать, не задевая панель. */
  .panel-tab { position: static; transform: none; width: 100%; height: 40px; gap: 8px; border: 0; border-bottom: 1px solid var(--line-2);
    border-radius: 0; box-shadow: none; background: #fff; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; }
  .panel-tab::before { content: ""; position: absolute; left: 50%; top: 5px; width: 40px; height: 4px; margin-left: -20px; border-radius: 3px; background: #d6dee5; }
  .panel-tab-t { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-top: 6px; }
  .panel-tab svg { margin-top: 6px; transform: rotate(90deg); }
  .work.closed .panel-tab svg { transform: rotate(-90deg); }
  .work.closed .panel-in { display: none; }
  .work.closed .panel-tab { border-bottom: 0; }
  .work.closed .stage { height: calc(100vh - 108px); height: calc(100dvh - 108px); }
  .tabp { padding-bottom: 16px; }
  .topbar { height: 52px; padding: 0 14px; gap: 10px; margin: 4px 4px 0; border-radius: 20px; }
  .logo b { width: 20px; height: 20px; font-size: 12px; }
  .logo .w { font-size: 15px; margin-left: 6px; }
  .topbar-now { font-size: 12px; }
  /* Кнопки масштаба — в самый угол и помельче: круг неба занимает почти
   * весь квадрат, и обычные 40 px ложились на его край. */
  .zoom { right: 10px; bottom: 10px; gap: 6px; }
  .cbtn { width: 34px; height: 34px; }
}
/* Разделов шесть — строкой они помещаются только на широком экране; уже
 * — кнопка «Разделы». Время в узкой шапке не помещается — оно есть в панели.
 * Пороги — по замеру: логотип 270 px, разделы 594 (по-английски 572,
 * по-армянски 823 — слова длиннее), выбор языка 73, плюс отступы шапки. */
@media (max-width: 1160px) {
  .topbar-now { display: none; }
  .topbar-now + .langm { margin-left: auto; }
}
@media (max-width: 1060px) {
  .topnav { display: none; }
  .navm { display: block; }
}
@media (max-width: 1400px) {
  html[lang="hy"] .topbar-now { display: none; }
  html[lang="hy"] .topbar-now + .langm { margin-left: auto; }
}
@media (max-width: 1290px) {
  html[lang="hy"] .topnav { display: none; }
  html[lang="hy"] .navm { display: block; }
}
/* Рядом с логотипом на телефоне помещается только значок меню. */
@media (max-width: 440px) {
  .navm summary { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .navm summary span { display: none; }
  .langm summary { height: 38px; padding: 0 10px; }
  .langm summary span { display: none; }
}
.mks-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.mks-link:hover { text-decoration: underline; }

/* ── Вид «На небе», компас и камера ───────────────────────────────── */
/* Переключатель вида — слева сверху на карте, кнопки компаса и камеры —
 * справа сверху. Подсказки и «что в прицеле» — по центру. */
#camVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; transform-origin: 50% 50%; }
#sky { position: relative; }
.stage.is-sky { background: #050a18; }
.stage.has-cam { background: #000; }
.vmode { position: absolute; left: 14px; top: 14px; z-index: 2; width: 210px; background: rgba(231, 236, 241, .94);
  box-shadow: var(--shadow-sm); }
.vmode button.on { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.is-sky .vmode { background: rgba(20, 30, 55, .72); }
.is-sky .vmode button { color: #c4d2ea; }
.is-sky .vmode button.on { background: #fff; color: var(--accent); }
.arctl { position: absolute; right: 14px; top: 14px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.cbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cbtn.on:hover { color: #fff; }
.arnote { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); z-index: 3; width: max-content; max-width: calc(100% - 28px);
  padding: 9px 14px; border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); font-size: 13px; line-height: 1.45;
  color: var(--ink-2); text-align: center; }
.arnote .lnk { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; }
.aim { position: absolute; left: 50%; top: calc(50% + 40px); transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column;
  align-items: center; gap: 1px; max-width: calc(100% - 40px); padding: 7px 14px; border: 0; border-radius: 14px; background: rgba(10, 18, 40, .78);
  color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.aim b { font-size: 15px; font-weight: 800; }
.aim span { color: #b9c8e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* Над картой «На небе» с телефона — весь экран: шапка и панель под ним
 * остаются на месте, а карточка объекта ложится снизу поверх неба. */
body.ar-full { overflow: hidden; }
.ar-full .stage { position: fixed; inset: 0; z-index: 30; height: auto !important; }
.ar-full .vmode { left: 10px; top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
.ar-full .arctl { right: 10px; top: calc(10px + env(safe-area-inset-top)); }
.ar-full .arnote { top: calc(54px + env(safe-area-inset-top)); }
.ar-full .zoom { bottom: calc(14px + env(safe-area-inset-bottom)); }
.ar-full .objcard { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 31; margin: 0;
  max-height: 46vh; overflow-y: auto; width: auto; }
.ar-full .hint { top: calc(58px + env(safe-area-inset-top)); }
@media (max-width: 800px) {
  /* На телефоне круг карты занимает всю ширину, и сверху переключатель
   * закрывал бы «С». Внизу слева угол свободен: карточка объекта здесь под
   * картой, а не поверх неё. */
  .vmode { left: 10px; top: auto; bottom: 10px; width: 164px; }
  .arctl { right: 10px; top: 10px; gap: 6px; }
  /* Рядом с колонкой кнопок справа: подсказка не налезает на них. */
  .arnote { top: 52px; left: 10px; right: 54px; transform: none; width: auto; max-width: none; }
}

/* Ссылка на соседний сайт (картанеба.рф ↔ урокиастрономии.рф) под списком
 * «Что видно». Скромная строка, а не баннер: это подсказка, куда ещё пойти. */
.sister { display: block; margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line-2);
  color: var(--accent); font-size: 12.5px; font-weight: 700; line-height: 1.35; text-decoration: none; }
.sister:hover { border-color: var(--accent-b); background: var(--accent-l); }
