:root {
  --bg: #02040a;
  --glass: rgba(10, 14, 26, 0.58);
  --glass-strong: rgba(10, 14, 26, 0.84);
  --stroke: rgba(150, 180, 255, 0.13);
  --text: #e6ecf7; --muted: #8d9ab3; --dim: #5c6780;
  --accent: #ffb454; --accent2: #ff6f91;
  --dead: #ff6b6b;
  --gap: 16px;                                   /* отступ панелей от краёв */
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 12.5px/1.45 Inter, system-ui, "Segoe UI", sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none; }
#scene { position: fixed; inset: 0; touch-action: none; }
.glass { background: var(--glass); border: 1px solid var(--stroke); border-radius: 12px;
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.ui { transition: opacity .5s, transform .5s; }
body.cinema .ui { opacity: 0; pointer-events: none; }
body.cinema #cinemaHint { opacity: 1; }
button { font: inherit; color: var(--text); background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
  border-radius: 8px; padding: 5px 10px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
button:hover { background: rgba(255,255,255,0.1); border-color: rgba(150,180,255,0.32); }
button.on { background: linear-gradient(135deg, rgba(255,180,84,0.25), rgba(255,111,145,0.22)); border-color: rgba(255,180,84,0.6); color: #fff; }
kbd { font: 10px Inter, sans-serif; padding: 0 4px; border: 1px solid var(--stroke); border-radius: 4px; color: var(--muted); }
@media (pointer: coarse) { kbd { display: none; } }

/* ---------- бренд и цифры (компактно: заголовок + одна полоса цифр) ---------- */
#brand { position: fixed; top: var(--gap); left: var(--gap); max-width: calc(100vw - 2 * var(--gap) - 200px); pointer-events: none; }
#brand .eyebrow { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
#brand h1 { font: 800 clamp(24px, 2.6vw, 34px)/1 Unbounded, Inter, sans-serif; margin: 4px 0 0; letter-spacing: .06em;
  background: linear-gradient(100deg, #fff1d6 0%, var(--accent) 35%, var(--accent2) 75%, #b48cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,140,90,0.22)); }
#stats { display: inline-flex; margin-top: 10px; pointer-events: auto; padding: 6px 4px; border-radius: 10px; }
.stat { padding: 0 12px; border-left: 1px solid var(--stroke); }
.stat:first-child { border-left: 0; }
.stat .v { font: 600 15px/1.15 Unbounded, Inter, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .v small { font: 500 10px Inter, sans-serif; color: var(--muted); margin-left: 2px; }
.stat .k { font-size: 10px; color: var(--muted); }
/* список запусков — столбиком: строкой он растягивался на полэкрана и закрывал Землю */
#batches { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 7px; pointer-events: auto;
  max-height: 38vh; overflow-y: auto; width: max-content; max-width: 100%; padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(160,180,220,0.25) transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 8px currentColor; background: currentColor; }
.chip.off { opacity: .4; }
.chip.off .dot { box-shadow: none; }

/* ---------- слои и инструменты ---------- */
#menuBtn { display: none; }
.langSw { display: flex; gap: 3px; padding: 0 2px 4px; margin-bottom: 2px; border-bottom: 1px solid var(--stroke); }
.langSw button { flex: 1; padding: 3px 0; font-size: 11px; letter-spacing: .06em; color: var(--muted); background: transparent; border-color: transparent; }
#layers .langSw button.on { color: #fff; background: rgba(255,255,255,0.09); }
#layers { position: fixed; top: var(--gap); right: var(--gap); padding: 6px; display: flex; flex-direction: column; gap: 2px; width: 178px; }
#layers > button, .tools > button { text-align: left; display: flex; align-items: center; gap: 8px; border-color: transparent; background: transparent; padding: 4px 8px; }
#layers button.on { background: rgba(255,255,255,0.07); border-color: transparent; color: #fff; }
#layers button .sw { width: 22px; height: 13px; border-radius: 7px; background: rgba(255,255,255,0.12); position: relative; flex: none; transition: background .2s; }
#layers button .sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: #9aa6bd; transition: left .2s, background .2s; }
#layers button.on .sw { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
#layers button.on .sw::after { left: 11px; background: #fff; }
#layers hr { border: 0; border-top: 1px solid var(--stroke); margin: 3px 2px; width: auto; }
#layers .tool { color: var(--muted); }
#layers .tool:hover { color: var(--text); background: rgba(255,255,255,0.06); }
#layers .tool.on { color: #fff; }
.toolsToggle { color: var(--muted) !important; justify-content: space-between; }
.toolsToggle span:last-child { transition: transform .25s; }
#layers.toolsOpen .toolsToggle span:last-child { transform: rotate(90deg); }
.tools { display: none; flex-direction: column; gap: 2px; }
#layers.toolsOpen .tools { display: flex; }
.qual { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 2px; color: var(--muted); }
.qual select { font: inherit; color: var(--text); background: rgba(255,255,255,0.06); border: 1px solid var(--stroke); border-radius: 6px; padding: 1px 3px; }
.qual select option { background: #0d1222; }

/* ---------- док времени ---------- */
#dock { position: fixed; left: 50%; bottom: calc(var(--gap) + var(--safe-b)); transform: translateX(-50%); padding: 7px 12px 8px; width: min(560px, calc(100vw - 2 * var(--gap))); }
#dockTop { display: flex; align-items: center; gap: 12px; }
#clock { font: 600 14px/1 Unbounded, Inter, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
#clockSub { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dockTop > div:first-child { flex: 1 1 auto; min-width: 0; }
#dockTop .clockRow { min-width: 0; }
#speeds { display: flex; gap: 3px; margin-left: auto; flex: none; }
#speeds button { padding: 3px 7px; font-size: 11px; min-width: 34px; }
#scrub { width: 100%; margin: 7px 0 0; height: 14px; accent-color: var(--accent); }
#scrubLabels { display: flex; justify-content: space-between; font-size: 9px; color: var(--dim); }

/* ---------- карточка аппарата ---------- */
#card { position: fixed; left: var(--gap); bottom: calc(var(--gap) + var(--safe-b)); width: 250px; padding: 12px 13px 11px;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .35s, transform .35s; }
#card.show { opacity: 1; transform: none; pointer-events: auto; }
body.cinema #card.show { opacity: 0; pointer-events: none; }
.cardHead { position: relative; }
.cardHead .more { display: none; }
#card .batch { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
#card h2 { font: 600 16px/1.2 Unbounded, Inter, sans-serif; margin: 3px 0 9px; }
#card .big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#card .big .v { font: 600 19px/1 Unbounded, Inter, sans-serif; font-variant-numeric: tabular-nums; }
#card .big .k { font-size: 10px; color: var(--muted); margin-top: 3px; }
#altbar { margin: 10px 0 3px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); position: relative; }
#altbar i { position: absolute; top: -3px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; }
#altbarLbl { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
#card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 9px 0; font-size: 11px; }
#card dt { color: var(--muted); } #card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#card .actions { display: flex; gap: 6px; }
#card .actions button { flex: 1; }

/* ---------- список ---------- */
#listBtn { position: fixed; right: var(--gap); bottom: calc(var(--gap) + var(--safe-b)); }
#drawer { position: fixed; top: var(--gap); right: var(--gap); bottom: calc(var(--gap) + 50px); width: 580px; max-width: calc(100vw - 2 * var(--gap));
  display: flex; flex-direction: column; background: var(--glass-strong); transform: translateX(calc(100% + 40px));
  transition: transform .45s cubic-bezier(.2,.8,.2,1); z-index: 6; }
#drawer.open { transform: none; }
#drawer .head, #sheet .head { padding: 11px 14px 8px; display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--stroke); }
#drawer .head h3, #sheet .head h3 { margin: 0; font: 600 14px Unbounded, Inter, sans-serif; }
#drawer .head span, #sheet .head span { color: var(--muted); font-size: 11px; flex: 1; }
.searchrow { padding: 7px 14px; border-bottom: 1px solid var(--stroke); }
.searchrow input { width: 100%; font: inherit; color: var(--text); background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke); border-radius: 8px; padding: 6px 10px; outline: none; }
.searchrow input:focus { border-color: rgba(255,180,84,0.6); }
#tablewrap { overflow: auto; flex: 1; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 11.5px; }
th, td { padding: 5px 8px; text-align: right; white-space: nowrap; }
th { position: sticky; top: 0; background: #0d1222; color: var(--muted); font-weight: 500; cursor: pointer; }
th:first-child, td:first-child { text-align: left; }
tbody tr { cursor: pointer; border-top: 1px solid rgba(255,255,255,0.03); }
tbody tr:hover { background: rgba(255,255,255,0.05); }
tbody tr.sel { background: rgba(255,180,84,0.14); }
tr.decayed td { color: var(--dead); opacity: .8; }
tr.nodata td { color: var(--dim); }
.dotc { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 6px currentColor; background: currentColor; }
.shadowtxt { color: var(--dim); }
.stale { color: var(--accent); }
#source { padding: 8px 14px; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--stroke); display: flex; gap: 10px; align-items: center; }
#source span { flex: 1; }

/* ---------- выдвижная панель для графиков ---------- */
#sheet { position: fixed; right: var(--gap); bottom: calc(var(--gap) + 50px + var(--safe-b)); width: min(600px, calc(100vw - 2 * var(--gap)));
  max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: var(--glass-strong);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .35s, transform .35s; z-index: 5; }
#sheet.open { opacity: 1; transform: none; pointer-events: auto; }
body.cinema #sheet.open { opacity: 0; pointer-events: none; }
#sheetBody { padding: 10px 14px 12px; overflow: auto; font-size: 11.5px; color: var(--muted); }
#sheetBody svg { display: block; width: 100%; height: auto; }
#sheetBody .note { margin-top: 8px; line-height: 1.5; }
#sheetBody .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
#sheetBody .seg { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: 6px; }
#sheetBody .seg button { padding: 3px 10px; font-size: 11px; color: var(--muted); background: transparent; border-color: transparent; }
#sheetBody .seg button.on { color: #fff; background: rgba(255,255,255,0.09); }
#sheetBody b { color: var(--text); font-weight: 600; }

/* ---------- метки, подписи, заставка ---------- */
.tag { position: fixed; pointer-events: none; font-size: 11px; font-weight: 500; color: #fff; white-space: nowrap;
  padding: 2px 7px; border-radius: 6px; background: rgba(8,12,22,0.7); border: 1px solid var(--stroke);
  transform: translate(12px, -50%); display: none; }
#tagSel { border-color: rgba(255,180,84,0.6); }

/* подписи экскурсии — на тёмной подложке, чтобы светлая Земля их не засвечивала */
#caption { position: fixed; left: 50%; top: 9%; transform: translate(-50%, 10px); width: min(720px, calc(100vw - 32px));
  pointer-events: none; opacity: 0; transition: opacity .7s, transform .7s; z-index: 4; display: flex; justify-content: center; }
#caption.show { opacity: 1; transform: translate(-50%, 0); }
#caption .box { text-align: center; padding: 14px 22px 12px; border-radius: 14px;
  background: rgba(4, 7, 16, 0.62); border: 1px solid rgba(150,180,255,0.12);
  backdrop-filter: blur(10px) brightness(0.7); -webkit-backdrop-filter: blur(10px) brightness(0.7); }
#caption .t { font: 700 clamp(18px, 2.3vw, 28px)/1.2 Unbounded, Inter, sans-serif; color: #fff; }
#caption .s { margin-top: 7px; font-size: clamp(12px, 1.15vw, 14.5px); color: #dbe3f2; line-height: 1.5; }
#caption .skip { margin-top: 9px; font-size: 10px; color: var(--muted); }
body.touring .ui, body.touring #card { opacity: 0 !important; pointer-events: none; }

#toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%); padding: 7px 13px; font-size: 12px;
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 7; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
#net { position: fixed; right: var(--gap); bottom: calc(var(--gap) + 44px + var(--safe-b)); padding: 3px 10px; font-size: 10.5px; color: var(--muted);
  border-radius: 999px; opacity: 0; transition: opacity .4s; pointer-events: none; }
#net.show { opacity: 1; }
body.cinema #net { opacity: 0; }
#cinemaHint { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); color: var(--dim); font-size: 11px; opacity: 0; transition: opacity 1s; pointer-events: none; }

#loader { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, #1a1030 0%, #02040a 70%);
  z-index: 10; transition: opacity 1.2s; }
#loader.gone { opacity: 0; pointer-events: none; }
#loader .t { font: 800 clamp(40px, 8vw, 84px) Unbounded, Inter, sans-serif; letter-spacing: .08em;
  background: linear-gradient(100deg, #fff1d6, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center; }
#loader .s { color: var(--muted); text-align: center; margin-top: 12px; letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }
#loader .bar { width: 160px; height: 2px; margin: 18px auto 0; background: rgba(255,255,255,0.08); overflow: hidden; border-radius: 1px; }
#loader .bar i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: slide 1.4s infinite; }
/* ---------- главная: выбор группировки ---------- */
body.home .ui, body.home #card, body.home #sheet, body.home #drawer, body.home #caption, body.home #net {
  opacity: 0 !important; pointer-events: none !important; visibility: hidden; }
/* главная скрыта — и её кнопки не должны ловить Tab */
body:not(.home) #home { visibility: hidden; }
#home { position: fixed; inset: 0; display: flex; align-items: center; padding: clamp(16px, 5vw, 72px);
  pointer-events: none; opacity: 0; transition: opacity .7s, visibility 0s linear .7s; }
body.home #home { opacity: 1; visibility: visible; transition: opacity .7s, visibility 0s; }
body.home #home .homeBox { pointer-events: auto; }
#home .homeBox { width: min(560px, 100%); max-height: 100%; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: rgba(160,180,220,0.25) transparent; padding-right: 6px; }
#home .eyebrow { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
#home h1 { font: 800 clamp(40px, 5.4vw, 68px)/1 Unbounded, Inter, sans-serif; margin: 8px 0 0; letter-spacing: .06em;
  background: linear-gradient(100deg, #fff1d6 0%, #ffb454 35%, var(--accent2) 75%, #b48cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255,140,90,0.22)); }
#home .lead { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 14px 0 22px; }
#homeCards { display: flex; flex-direction: column; gap: 14px; }
#homeCards h3 { margin: 0 0 7px; font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
#homeCards .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.homeCard { display: grid; gap: 2px; align-content: start; text-align: left; padding: 10px 12px 9px; cursor: pointer; color: var(--text);
  border-left: 3px solid var(--c); transition: transform .25s, background .25s, border-color .25s; font: inherit; }
.homeCard:hover { transform: translateX(5px); background: var(--glass-strong); }
.homeCard .e { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.homeCard .t { font: 700 15px/1.15 Unbounded, Inter, sans-serif; letter-spacing: .06em; color: var(--c); }
.homeCard .d { font-size: 11.5px; line-height: 1.35; color: var(--text); opacity: .8; }
.homeCard .n { font-size: 11px; color: var(--dim); min-height: 1em; }
.homeCard.busy { opacity: .7; cursor: progress; }
#home .foot { display: flex; align-items: center; gap: 14px; margin-top: 20px; color: var(--dim); font-size: 11px; }
#home .langSw { border: none; padding: 0; margin: 0; width: 84px; flex: none; }
#home .langSw button.on { color: #fff; background: rgba(255,255,255,0.09); }
.tools > a.tool { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; text-decoration: none; }
.tools > a.tool:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.tools > a.tool[hidden] { display: none; }
#homeBtn { pointer-events: auto; background: none; border: none; padding: 0 0 4px; color: var(--muted); font-size: 11px;
  letter-spacing: .06em; cursor: pointer; }
#homeBtn:hover { color: var(--text); }
@media (max-width: 900px) {
  #home { align-items: flex-end; padding-bottom: calc(18px + var(--safe-b)); }
  #home h1 { font-size: 34px; }
  #home .lead { margin: 8px 0 14px; font-size: 12.5px; }
  #home .homeBox { max-height: 62vh; }
  #homeCards .grid { grid-template-columns: 1fr 1fr; }
  .homeCard .t { font-size: 13px; }
  .homeCard .d { font-size: 10.5px; }
}

/* ---------- легенда и подсказка первого визита ---------- */
.lg-row { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--stroke); }
.lg-ic { flex: none; width: 46px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.lg-line { width: 40px; height: 1px; background: rgba(255,180,84,.55); }
.lg-trail { width: 40px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent)); }
.lg-sel { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: inset 0 0 0 5px rgba(255,180,84,.12); }
.lg-zone { width: 30px; height: 18px; border-radius: 50%; background: rgba(79,195,255,.18); border: 1px solid rgba(79,195,255,.7); }
.lg-bar { width: 44px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #1a59ff, #26f2e6, #ffd94d); }
kbd { font: 600 10px/1 Inter, sans-serif; padding: 2px 5px; border: 1px solid var(--stroke); border-radius: 4px; color: var(--text); }
#hint { position: fixed; left: 50%; top: calc(var(--gap) + 4px); transform: translate(-50%, -10px); width: min(500px, calc(100vw - 2 * var(--gap) - 420px));
  padding: 12px 14px; display: flex; gap: 12px; align-items: center; font-size: 12.5px; line-height: 1.5; z-index: 4;
  background: var(--glass-strong);
  opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .5s, transform .5s, visibility 0s linear .5s; }
#hint.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; visibility: visible; transition: opacity .5s, transform .5s, visibility 0s; }
#hint button { flex: none; }
body.home #hint, body.touring #hint, body.cinema #hint { display: none; }
@media (max-width: 900px) { #hint { top: auto; bottom: calc(var(--gap) + 96px + var(--safe-b)); width: calc(100vw - 2 * var(--gap)); } }

/* часы: «вживую» — зелёная точка; выбор даты — скрытое поле */
.clockRow { display: flex; align-items: center; gap: 6px; }
#liveDot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; transition: background .3s; }
#liveDot.on { background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: live 2s infinite; }
@keyframes live { 50% { opacity: .45; } }
#clock { cursor: pointer; }
#when { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#homeSearch { width: 100%; margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--stroke);
  background: var(--glass); color: var(--text); font: inherit; font-size: 13px; }
#homeSearch::placeholder { color: var(--dim); }
/* фокус с клавиатуры — видно, где он */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; } }

@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- средние экраны: карточка и список не наезжают на док ---------- */
@media (max-width: 1100px) {
  #card { bottom: calc(var(--gap) + 86px + var(--safe-b)); }
}

/* ---------- телефон ---------- */
@media (max-width: 700px) {
  :root { --gap: 10px; }
  html, body { font-size: 12px; }
  #brand { max-width: calc(100vw - 110px); }
  #brand .eyebrow { display: none; }
  #brand h1 { font-size: 22px; }
  #stats { margin-top: 18px; padding: 4px 2px; }     /* ниже кнопок «Все аппараты» и ☰ */
  #brand { max-width: calc(100vw - 2 * var(--gap)); }
  .stat { padding: 0 8px; }
  .stat .v { font-size: 12.5px; }
  .stat .k { font-size: 9px; }
  .stat:nth-child(4) { display: none; }
  #batches { display: none; }

  /* меню: кнопка ☰, слои и инструменты — выпадающей панелью */
  #menuBtn { display: block; position: fixed; top: var(--gap); right: var(--gap); width: 40px; height: 40px; padding: 0; font-size: 18px; z-index: 6; }
  #layers { top: calc(var(--gap) + 48px); width: 200px; opacity: 0; transform: translateY(-8px); pointer-events: none; z-index: 6; }
  body.menuOpen #layers { opacity: 1; transform: none; pointer-events: auto; }
  #layers > button, .tools > button { padding: 8px 10px; }
  #layers .tools { display: flex; }
  .toolsToggle { display: none !important; }

  #listBtn { top: var(--gap); right: calc(var(--gap) + 48px); bottom: auto; height: 40px; padding: 0 10px; font-size: 11px; }

  /* док — во всю ширину снизу */
  #dock { width: calc(100vw - 2 * var(--gap)); padding: 6px 8px 7px; }
  #dockTop { gap: 8px; }
  #clock { font-size: 13px; }
  #clockSub { font-size: 9px; }
  #speeds button { padding: 5px 6px; min-width: 30px; font-size: 10.5px; }
  #speeds button[data-k="1200"], #speeds button[data-k="-600"], #speeds button[data-k="300"] { display: none; }
  #scrubLabels span:nth-child(2), #scrubLabels span:nth-child(4) { visibility: hidden; }

  /* карточка — шторкой над доком; подробности по нажатию на заголовок */
  #card { left: var(--gap); right: var(--gap); width: auto; bottom: calc(var(--gap) + 84px + var(--safe-b)); padding: 10px 12px 10px; }
  .cardHead { cursor: pointer; }
  .cardHead .more { display: block; position: absolute; right: 0; top: 0; color: var(--muted); transition: transform .25s; }
  #card:not(.expanded) .more { transform: rotate(180deg); }
  #card h2 { font-size: 14px; margin: 2px 0 6px; }
  #card .big .v { font-size: 16px; }
  #card:not(.expanded) #altbar, #card:not(.expanded) #altbarLbl, #card:not(.expanded) dl { display: none; }
  #card .actions { margin-top: 8px; }
  #card .actions button { padding: 8px; }

  #drawer { top: 0; right: 0; bottom: 0; width: 100vw; max-width: none; border-radius: 0; }
  th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5), th:nth-child(6), td:nth-child(6), th:nth-child(7), td:nth-child(7) { display: none; }
  #sheet { left: 0; right: 0; bottom: 0; width: 100vw; max-height: 70vh; border-radius: 14px 14px 0 0; padding-bottom: var(--safe-b); }

  #caption { top: 7%; }
  #caption .box { padding: 10px 14px 9px; }
  #net { bottom: calc(var(--gap) + 76px + var(--safe-b)); }
  #toast { bottom: calc(150px + var(--safe-b)); }
}

/* ссылки в панелях */
#sheetBody a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(255,180,84,0.35); }
#sheetBody a:hover { border-bottom-color: var(--accent); }
#sheetBody p.note { margin: 0 0 9px; }
