/* Пульт инженера ННБ — тёмная приборная тема */
:root {
  color-scheme: dark;
  --ground: #0d1316;
  --panel: #141c20;
  --panel-2: #1a242a;
  --panel-3: #22303700;
  --line: #2a373e;
  --line-2: #37474f;
  --text: #dbe3e5;
  --muted: #8b9ca2;
  --faint: #5e6f75;
  --accent: #f2a541;      /* янтарь стрелочных приборов */
  --accent-ink: #1b1204;
  --tf: #f2a541;
  --tf-old: #a0773a;
  --spp: #4fc3d9;
  --hook: #e6e1d0;
  --wob: #f2a541;
  --rop: #79c77f;
  --plan: #8b9ca2;
  --fact: #4fc3d9;
  --proj: #f2a541;
  --ok: #6cbf79;
  --warn: #e3b341;
  --crit: #e5534b;
  --f-label: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "JetBrains Mono", "Consolas", "DejaVu Sans Mono", monospace;
  --r: 4px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 14px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-label); font-weight: 600; letter-spacing: 0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
a { color: var(--accent); }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.lbl { font-family: var(--f-label); text-transform: uppercase; letter-spacing: 0.09em; font-size: 12px; color: var(--muted); }
[hidden] { display: none !important; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 6px 11px; cursor: pointer; font-family: var(--f-label); font-size: 14px; letter-spacing: 0.04em;
  transition: background .12s, border-color .12s; white-space: nowrap; min-height: 32px;
}
.btn:hover { background: #22303a; border-color: var(--muted); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #ffb95e; }
.btn.danger { border-color: #7a3431; color: #ffb3ae; }
.btn.on { background: #203a2a; border-color: var(--ok); color: #bff0c6; }
.btn.sm { padding: 3px 8px; min-height: 26px; font-size: 13px; }
.btn.ghost { background: transparent; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], select {
  background: var(--ground); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 8px; min-height: 32px; width: 100%;
}
input[type=number] { font-family: var(--f-mono); }
label.field { display: grid; gap: 4px; }

/* каркас */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark { color: var(--accent); align-self: center; display: inline-flex; margin-right: -2px; }
.brand b { font-family: var(--f-label); font-size: 20px; letter-spacing: 0.05em; color: var(--accent); }
.brand span { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.page { padding: 18px 16px 40px; max-width: 1280px; width: 100%; margin: 0 auto; display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.panel > h3 { margin-bottom: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 12px; font-family: var(--f-label); letter-spacing: 0.05em; }
.chip.ok { border-color: var(--ok); color: var(--ok); } .chip.warn { border-color: var(--warn); color: var(--warn); } .chip.crit { border-color: var(--crit); color: var(--crit); }
.note { border-left: 3px solid var(--line-2); padding: 6px 10px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.note.warn { border-left-color: var(--warn); color: var(--text); } .note.crit { border-left-color: var(--crit); color: var(--text); } .note.ok { border-left-color: var(--ok); color: var(--text); }

/* таблицы */
.tbl-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: var(--panel-2); font-family: var(--f-label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--muted); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.l, .tbl th.l { text-align: left; font-family: var(--f-body); }
.tbl tr.prev td { color: var(--faint); }
.tbl tr.hl td { background: #2a2414; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--panel-2); }
.bad { color: var(--crit); } .good { color: var(--ok); } .warnc { color: var(--warn); }

/* вход */
.login { max-width: 420px; margin: 8vh auto 0; display: grid; gap: 14px; }
.login .panel { display: grid; gap: 12px; padding: 22px; }

/* шаги настройки */
.steps { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.steps button { flex: 1 1 140px; background: var(--panel); border: 0; border-right: 1px solid var(--line); padding: 9px 12px; text-align: left; cursor: pointer; font-family: var(--f-label); letter-spacing: 0.05em; color: var(--muted); }
.steps button:last-child { border-right: 0; }
.steps button.cur { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.steps button.done { color: var(--ok); }
.steps button:disabled { cursor: default; opacity: .6; }
.steps small { display: block; font-family: var(--f-mono); font-size: 11px; opacity: .8; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.bha-list { display: grid; gap: 2px; }
.bha-el { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; background: var(--panel-2); border-radius: 3px; font-size: 13px; }
.bha-el .n { font-family: var(--f-mono); color: var(--faint); font-size: 12px; }
.bha-el .th { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.bha-el.sensor { box-shadow: inset 3px 0 0 var(--spp); }
.bha-el.motor { box-shadow: inset 3px 0 0 var(--accent); }

/* ПУЛЬТ */
.console {
  display: grid; gap: 10px; padding: 10px 16px 16px;
  grid-template-columns: 290px minmax(0, 1fr) 340px;
  grid-template-areas: "ctl mid info" "tabs tabs tabs";
}
.c-ctl { grid-area: ctl; display: grid; gap: 10px; align-content: start; }
.c-mid { grid-area: mid; display: grid; gap: 10px; align-content: start; min-width: 0; }
.c-info { grid-area: info; display: grid; gap: 10px; align-content: start; min-width: 0; }
.c-tabs { grid-area: tabs; min-width: 0; }
@media (max-width: 1250px) {
  .console { grid-template-columns: 280px minmax(0, 1fr); grid-template-areas: "ctl mid" "info info" "tabs tabs"; }
  .c-info { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 760px) {
  .console { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mid" "ctl" "info" "tabs"; padding-inline: 16px; }
}
.ctl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; }
.ctl-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ctl-h .lbl { font-size: 13px; color: var(--text); }
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.btn-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.btn-grid.g2 { grid-template-columns: repeat(2, 1fr); }
.readout { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.readout b { color: var(--text); font-weight: 600; }
.pump { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.stepper { display: grid; grid-template-columns: 30px 1fr 30px; gap: 3px; align-items: center; }
.stepper .val { text-align: center; font-family: var(--f-mono); font-size: 15px; background: var(--ground); border: 1px solid var(--line); border-radius: 3px; padding: 3px 0; }
.stepper .btn { padding: 0; min-height: 28px; }

.depthbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.depthbar > div { padding: 8px 12px; border-right: 1px solid var(--line); min-width: 0; }
.depthbar > div:last-child { border-right: 0; }
.depthbar .v { font-family: var(--f-mono); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.depthbar .v small { font-size: 12px; color: var(--muted); margin-left: 3px; }
@media (max-width: 760px) { .depthbar { grid-template-columns: repeat(2, 1fr); } .depthbar > div { border-bottom: 1px solid var(--line); } }

.midrow { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: 10px; }
@media (max-width: 1000px) { .midrow { grid-template-columns: minmax(0, 1fr); } }
.tfpanel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 6px; align-content: start; }
.tfpanel svg { width: 100%; max-width: 310px; aspect-ratio: 1; justify-self: center; }
.tf-big { display: flex; justify-content: space-between; align-items: baseline; }
.tf-big .v { font-family: var(--f-mono); font-size: 30px; color: var(--tf); }
.tiles { align-self: start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; align-content: start; }
.tile { background: var(--panel); padding: 8px 10px; min-width: 0; }
.tile .v { font-family: var(--f-mono); font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .v small { font-size: 11px; color: var(--muted); margin-left: 3px; }
.tile .sub { font-family: var(--f-mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.warn { box-shadow: inset 0 -3px 0 var(--warn); } .tile.crit { box-shadow: inset 0 -3px 0 var(--crit); background: #2a1716; }
.stripbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.stripbox canvas { width: 100%; height: 250px; display: block; }

.status-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alarm { background: #3a1614; border: 1px solid var(--crit); color: #ffd1cd; padding: 8px 12px; border-radius: var(--r); font-weight: 500; }
.warnbar { background: #33290f; border: 1px solid var(--warn); color: #ffe7b0; padding: 6px 12px; border-radius: var(--r); }

.survey-card { border: 1px solid var(--accent); background: #251d0e; border-radius: var(--r); padding: 10px; display: grid; gap: 8px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.kv > span:nth-child(even) { font-family: var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }
.events { max-height: 300px; overflow: auto; display: grid; gap: 3px; font-size: 12.5px; }
.ev { display: grid; grid-template-columns: 58px 1fr; gap: 6px; padding: 3px 6px; border-left: 3px solid var(--line-2); }
.ev .t { font-family: var(--f-mono); color: var(--faint); font-size: 11px; padding-top: 1px; }
.ev.warn { border-left-color: var(--warn); } .ev.penalty { border-left-color: var(--warn); background: #2a2210; } .ev.fatal { border-left-color: var(--crit); background: #2e1413; }

.tabbar { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabbar button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 12px; cursor: pointer; font-family: var(--f-label); letter-spacing: 0.06em; font-size: 14px; color: var(--muted); }
.tabbar button.cur { color: var(--text); border-bottom-color: var(--accent); }
.plot { width: 100%; max-width: 900px; display: block; }
.score { display: flex; align-items: baseline; gap: 6px; font-family: var(--f-mono); }
.score b { font-size: 20px; color: var(--accent); }
.speed { display: flex; gap: 2px; }
.speed .btn { min-width: 40px; }
.bars { display: grid; gap: 4px; }
.bar { display: grid; grid-template-columns: 150px 1fr 70px; gap: 8px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 12px; background: var(--spp); border-radius: 2px; }
.modal-bg { position: fixed; inset: 0; background: rgba(5, 8, 10, .72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px; max-width: 560px; width: 100%; display: grid; gap: 12px; max-height: 90vh; overflow: auto; }
.progress { height: 8px; background: var(--ground); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.lg { display: inline-block; width: 26px; height: 0; border-top: 2px solid; vertical-align: middle; }
.lg.d { border-top-style: dashed; }
@media (max-width: 760px) { .topbar { position: static; } .brand span { display: none; } }

/* витрина */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 380px); gap: 28px; align-items: start; padding-block: 18px 8px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero-h { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.05; margin: 8px 0 14px; letter-spacing: 0.01em; }
.hero-p { color: var(--muted); font-size: 16px; max-width: 62ch; margin: 0 0 18px; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hero-stats > div { background: var(--panel); padding: 10px 12px; display: grid; gap: 2px; }
.hero-stats b { font-family: var(--f-mono); font-size: 20px; color: var(--accent); font-weight: 600; }
.hero-stats span { font-size: 12px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.feat { border-top: 2px solid var(--line-2); padding: 12px 2px 4px; }
.feat h3 { color: var(--text); margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); font-size: 13.5px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; align-content: start; }
.plan.hot { border-color: var(--accent); }
.plan h3 { color: var(--text); font-size: 17px; }
.price { font-family: var(--f-mono); font-size: 26px; color: var(--accent); }
.price small { font-size: 13px; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 3px; }
.foot { padding-block: 10px 20px; border-top: 1px solid var(--line); }
.ta { width: 100%; background: var(--ground); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); font-family: var(--f-mono); font-size: 12.5px; padding: 8px; resize: vertical; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.wgrid .row input { min-width: 0; }
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero .panel .btn { white-space: normal; text-align: center; }
.hero .panel { min-width: 0; }

/* 3D-просмотр оборудования */
.v3d { position: relative; width: 100%; height: 300px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 20%, #24343c 0%, #111a1e 60%, #0b1013 100%); touch-action: none; }
.v3d canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.v3d canvas:active { cursor: grabbing; }
.v3d-tip { position: absolute; pointer-events: none; background: rgba(12,18,21,.92); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 9px; display: grid; gap: 2px; font-size: 12px; max-width: 320px; z-index: 2; }
.v3d-tip b { font-family: var(--f-label); font-size: 14px; letter-spacing: .03em; }
.v3d-tip span { font-family: var(--f-mono); color: var(--muted); font-size: 11px; }
.v3d-labels { position: absolute; inset: 0; pointer-events: none; }
.v3d-lab { position: absolute; transform: translate(-50%, calc(-100% - 22px)); font-family: var(--f-label); font-size: 12px; letter-spacing: .05em; white-space: nowrap;
  padding: 2px 7px; border-radius: 3px; background: rgba(12,18,21,.85); border: 1px solid var(--line-2); }
.v3d-lab::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 20px; background: currentColor; opacity: .6; }
.v3d-lab.sensor { color: var(--spp); } .v3d-lab.bend { color: var(--accent); } .v3d-lab.bit { color: var(--text); }
.v3d-bar { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; z-index: 2; }
.v3d-hint { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: var(--faint); pointer-events: none; }
.v3d-prev { display: grid; gap: 6px; margin: 8px 0 10px; }
.v3d-cap { font-family: var(--f-mono); font-size: 12px; color: var(--muted); min-height: 16px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(255,255,255,0.03); }
tr.muted-row td { opacity: .5; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.geo-svg { background: #0b1114; border-radius: var(--r); }
.geo-legend { width: 100%; height: auto; margin-top: 6px; }
.eq-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
@media (max-width: 1000px) { .eq-grid { grid-template-columns: minmax(0, 1fr); } }
.eq-modal { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 16px; max-height: 70vh; overflow: auto; margin: 10px 0; }
@media (max-width: 800px) { .eq-modal { grid-template-columns: minmax(0, 1fr); } }
.eq-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.eq-form .field input, .eq-form .field select { width: 100%; min-width: 0; }
.eq-sub { margin-top: 10px; }

/* буровая */
.rig-panel { display: grid; gap: 6px; }
.rig-canvas { width: 100%; height: 270px; display: block; border-radius: var(--r); background: #0f171b; }

/* анимации */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { background: rgba(229,83,75,.35); } 100% { background: var(--panel); } }
@keyframes draw { from { stroke-dashoffset: 3000; } to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(0.8); opacity: .9; } 50% { transform: scale(1.6); opacity: .25; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.page > *, .panel, .modal { animation: fadeUp .35s ease both; }
.page > *:nth-child(2) { animation-delay: .04s; } .page > *:nth-child(3) { animation-delay: .08s; }
.console .panel, .console .ctl, .console .tfpanel, .console .tiles { animation: none; }
.tile.flash { animation: flash .9s ease; }
.tile .v { transition: color .3s; }
polyline.draw { stroke-dasharray: 3000; animation: draw 2.2s ease-out both; }
.geo-bit .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.6s ease-in-out infinite; }
.btn { transition: background .12s, border-color .12s, transform .08s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.modal-bg { animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.steps button.cur { position: relative; }
.steps button.cur::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
#app.no-anim .page > *, #app.no-anim .panel { animation: none; }
.showcase { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 16px; margin: 18px 0; }
@media (max-width: 900px) { .showcase { grid-template-columns: minmax(0, 1fr); } }
.hero-3d { height: 380px !important; }
.geo-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.geo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.v3d-lab.bit { transform: translate(-50%, 24px); }
.v3d-lab.bit::after { top: auto; bottom: 100%; }
.plot.geo-svg { max-width: none; }
/* стрелочные приборы */
.gauge-box { display: grid; gap: 8px; }
.dials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: linear-gradient(180deg, #27313a, #1b2328); border: 1px solid var(--line); border-radius: var(--r); padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -2px 6px rgba(0,0,0,.4); }
@media (max-width: 700px) { .dials { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dial-wrap { aspect-ratio: 1; min-width: 0; }
.dial { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }

/* настраиваемый пульт */
.console-dash { padding: 6px 11px 16px; display: grid; gap: 8px; }
.dash { position: relative; min-height: 400px; }
.dw { position: absolute; padding: 12px 5px 5px; box-sizing: border-box; transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease; }
.dw.dragging { transition: none; z-index: 5; }
.dw.dragging .dw-body { box-shadow: 0 12px 30px rgba(0,0,0,.55); outline: 2px solid var(--accent); }
.dw-body { width: 100%; height: 100%; overflow: auto; border-radius: var(--r); }
.dw-body > * { height: 100%; box-sizing: border-box; }
.dw-bar { display: none; }
.dash.editing .dw-body { pointer-events: none; opacity: .55; outline: 1px dashed var(--line-2); }
.dash.editing .dw-bar { display: flex; position: absolute; left: 5px; right: 5px; top: 12px; height: 30px; align-items: center; justify-content: space-between; gap: 6px;
  padding: 0 4px 0 10px; background: rgba(242,165,65,.92); color: var(--accent-ink); font-family: var(--f-label); font-size: 14px; letter-spacing: .05em; text-transform: uppercase;
  border-radius: var(--r) var(--r) 0 0; cursor: grab; touch-action: none; user-select: none; z-index: 2; }
.dash.editing .dw-bar:active { cursor: grabbing; }
.dw-x { background: transparent; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--accent-ink); padding: 0 6px; }
/* перемещение и размер — всегда: полоска над панелью, правый и нижний край, угол */
.dw-grab { position: absolute; left: 14px; right: 14px; top: 0; height: 12px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; z-index: 3; }
.dw-grab::before { content: ''; width: 36px; height: 4px; border-radius: 3px; background: var(--line-2); opacity: 0; transition: opacity .15s, width .2s, background .15s; }
.dw:hover .dw-grab::before { opacity: .9; }
.dw-grab:hover::before, .dw.dragging .dw-grab::before { width: 72px; background: var(--accent); opacity: 1; }
.dw-grab span { position: absolute; left: 0; max-width: calc(50% - 44px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 10px/12px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .15s; pointer-events: none; }
.dw-grab:hover span, .dw.dragging .dw-grab span { opacity: 1; }
.dw-grab:active { cursor: grabbing; }
.dw-re { position: absolute; right: 0; top: 24px; bottom: 20px; width: 6px; cursor: ew-resize; touch-action: none; z-index: 3; border-radius: 4px; }
.dw-be { position: absolute; bottom: 0; left: 20px; right: 20px; height: 6px; cursor: ns-resize; touch-action: none; z-index: 3; border-radius: 4px; }
.dw-re:hover, .dw-be:hover { background: rgba(242,165,65,.35); }
.dw-rs { position: absolute; right: 1px; bottom: 1px; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; z-index: 4; opacity: 0; transition: opacity .15s;
  background: linear-gradient(135deg, transparent 52%, var(--accent) 52%, var(--accent) 60%, transparent 60%, transparent 70%, var(--accent) 70%, var(--accent) 78%, transparent 78%); }
.dw:hover .dw-rs, .dw.dragging .dw-rs { opacity: .85; }
.dash.editing .dw-grab { display: none; }
.dash.editing .dw-rs { opacity: 1; width: 22px; height: 22px; right: 5px; bottom: 5px; background: linear-gradient(135deg, transparent 50%, var(--accent) 50%); border-radius: 0 0 var(--r) 0; }
.dash.dragging-any .dw-body { pointer-events: none; }
.dash.moving, .dash.moving * { cursor: grabbing !important; }
.dash.dragging-any, .dash.dragging-any * { user-select: none; }
.dash.narrow .dw-grab, .dash.narrow .dw-re, .dash.narrow .dw-be, .dash.narrow .dw-rs { display: none; }
@media (hover: none) { .dw-grab::before, .dw-rs { opacity: .6; } }
/* стеклянный вид пульта */
.console-dash { position: relative; isolation: isolate; }
.console-dash.glass::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 560px at 10% 6%, rgba(242,165,65,.22), transparent 62%),
    radial-gradient(900px 640px at 92% 28%, rgba(79,195,217,.2), transparent 62%),
    radial-gradient(760px 520px at 45% 100%, rgba(121,199,127,.12), transparent 60%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 40px 100%,
    var(--ground); }
.dash.glass { --panel: rgba(18,28,34,.38); --panel-2: rgba(32,46,54,.45); --line: rgba(255,255,255,.08); }
.dash.glass .dw-body { background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.015) 40%, rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 10px 30px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.1); }
.dash.glass .dw-body > * { border-color: transparent; }
.dash.glass .dw.dragging .dw-body { box-shadow: 0 18px 44px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.14); outline: 1px solid rgba(242,165,65,.8); }
.dash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--accent); border-radius: var(--r); padding: 8px 12px; }
.dash.narrow { display: flex; flex-direction: column; gap: 10px; height: auto !important; }
.dash.narrow .dw { position: static; padding: 0; width: auto; height: auto; }
.dash.narrow .dw-body { height: auto; overflow: visible; }
.dash.narrow .dw-body > * { height: auto; }
.dash.narrow .rig-canvas { height: 260px; }
/* содержимое панелей растягивается вместе с панелью */
.dw-body > .ctl { align-content: start; }
.dw-body > .tfpanel { display: flex; flex-direction: column; }
.dw-body > .tfpanel svg { flex: 1; min-height: 0; width: 100%; max-width: none; aspect-ratio: auto; }
.dw-body > .tiles { align-self: stretch; grid-auto-rows: 1fr; }
.dw-body > .panel { overflow: auto; }
.dw-body > .gauge-box { display: flex; flex-direction: column; gap: 8px; }
.gauge-box > .dials { flex: 1; min-height: 0; justify-content: center; align-content: center; }
.gauge-box > .stripbox { flex: 1; min-height: 120px; display: flex; }
.gauge-box > .stripbox canvas { height: auto; flex: 1; min-height: 110px; }
.dw-body > .rig-panel { display: flex; flex-direction: column; }
.rig-panel > .rig-box { flex: 1; min-height: 0; }
.dw-body .rig-canvas { height: 100%; min-height: 120px; }
.dw-body > .c-tabs { display: flex; flex-direction: column; }
.dw-body > .c-tabs > div { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dw-body > .c-tabs .tab-body { flex: 1; overflow: auto; min-height: 0; }
.dials { background: var(--panel); background-image: none; box-shadow: none; padding: 6px; gap: 8px; }
.dial { filter: none; }
/* расчёт ориентирования */
.calc-grid { display: grid; grid-template-columns: minmax(320px, 520px) minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 4px; }
@media (max-width: 1000px) { .calc-grid { grid-template-columns: minmax(0, 1fr); } }
.calc-form { display: grid; gap: 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.seg-ctl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.seg-ctl button { background: var(--ground); border: 0; border-right: 1px solid var(--line-2); padding: 9px 8px; cursor: pointer; font-family: var(--f-label); font-size: 14px; letter-spacing: .03em; color: var(--muted); white-space: normal; line-height: 1.2; transition: background .12s, color .12s; }
.seg-ctl button:last-child { border-right: 0; }
.seg-ctl button:hover { color: var(--text); background: #1d2830; }
.seg-ctl button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.calc-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-inputs input { width: 100%; }
.calc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-actions .btn { min-height: 40px; white-space: normal; }
.calc-res { display: grid; gap: 14px; }
.calc-main { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; }
.calc-tf { width: 180px; height: 180px; }
.calc-big { font-family: var(--f-mono); font-size: 44px; color: var(--accent); line-height: 1.1; margin: 4px 0; }
.calc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.calc-stat { background: var(--panel); padding: 10px 14px; display: grid; gap: 3px; }
.calc-stat .v { font-family: var(--f-mono); font-size: 22px; }
/* увеличение графиков */
svg.plot { cursor: zoom-in; transition: box-shadow .15s; border-radius: var(--r); }
svg.plot:hover { box-shadow: 0 0 0 1px var(--accent); }
.zoom-bg { position: fixed; inset: 0; z-index: 100; background: #0b1013; display: grid; grid-template-rows: auto 1fr auto; animation: fadeIn .15s ease both; }
.zoom-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.zoom-lbl { flex: 1; font-family: var(--f-label); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-size: 14px; }
.zoom-pct { font-family: var(--f-mono); font-size: 13px; color: var(--text); min-width: 48px; text-align: center; }
.zoom-stage { position: relative; overflow: hidden; cursor: grab; touch-action: none; }
.zoom-stage.grab { cursor: grabbing; }
.zoom-pic { position: absolute; left: 0; top: 0; }
.zoom-hint { padding: 6px 16px 10px; font-size: 12px; color: var(--faint); text-align: center; }
/* тёмные полосы прокрутки */
* { scrollbar-width: thin; scrollbar-color: #3a4a52 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #33424a; border-radius: 6px; border: 2px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: #4a5d66; }
::-webkit-scrollbar-corner { background: transparent; }
/* контроль скважины */
.wc-panel { display: grid; gap: 10px; align-content: start; }
.wc-state { font-family: var(--f-label); letter-spacing: .05em; font-size: 15px; padding: 8px 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); }
.wc-state.crit { background: #3a1614; border-color: var(--crit); color: #ffb4ae; animation: pulseBg 1s ease-in-out infinite; }
.wc-state.warn { background: #33280f; border-color: var(--warn); color: #ffd98a; }
.wc-state.ok { background: #13291a; border-color: var(--ok); color: #a6e3b0; }
@keyframes pulseBg { 50% { background: #5a1c18; } }
.wc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wc-cell { background: var(--panel); padding: 8px 10px; min-width: 0; }
.wc-num { font-family: var(--f-mono); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-num.crit { color: #ff8a80; }
.wc-kill { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.wc-kill input { width: 100%; }
.wc-panel { overflow-x: hidden; }
.wc-state { white-space: normal; line-height: 1.3; }
.wc-grid { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
.wc-panel .btn-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.wc-panel .btn { white-space: normal; line-height: 1.2; }
.wc-panel { grid-auto-rows: max-content; }
/* витрина: компоновка по траектории */
.show3d { background: #040607; }
.show3d canvas { cursor: default; }
.show-lab { transform: translate(-50%, calc(-100% - var(--lift, 22px))); font-size: 12px; color: var(--text); transition: opacity .2s; }
.show-lab::after { height: var(--lift, 22px); }
.show-lab.hi { color: var(--accent); border-color: var(--accent); }
.show-hud { position: absolute; left: 12px; bottom: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); background: rgba(12,18,21,.75); border: 1px solid var(--line-2); border-radius: 4px; padding: 4px 8px; pointer-events: none; }
.show-hud b { color: var(--accent); font-weight: 600; }
.hero-3d.show3d { height: 460px !important; }
.show-lab { transform: translate(calc(-50% + var(--dx, 0px)), calc(-100% - var(--lift, 22px))); }
.show-lab::after { left: calc(50% - var(--dx, 0px)); }

/* пиктограммы органов управления */
.ctl-ic { position: relative; padding-left: 48px !important; }
.ctl-icon { position: absolute; left: 6px; top: 10px; bottom: 10px; width: 34px; color: var(--muted); border-right: 1px solid var(--line); padding-right: 4px;
  display: flex; align-items: flex-start; justify-content: center; }
.ctl-icon svg { width: 30px; height: 100%; max-height: 90px; overflow: visible; }
.ctl-icon.on { color: var(--text); }
.ctl-icon * { transform-box: fill-box; }
@keyframes ciPiston { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }
.ci-pumps.on .ci-piston { animation: ciPiston var(--ci-dur, 1s) ease-in-out infinite; }
.ci-pumps.on .ci-piston.p2 { animation-delay: calc(var(--ci-dur, 1s) / -3); } .ci-pumps.on .ci-piston.p3 { animation-delay: calc(var(--ci-dur, 1s) / -1.5); }
.ci-pumps .ci-flow { opacity: 0; }
@keyframes ciFlow { to { stroke-dashoffset: -16; } }
.ci-pumps.on .ci-flow { opacity: 1; animation: ciFlow .6s linear infinite; }
@keyframes ciSpin { 0% { transform: scaleX(1); } 25% { transform: scaleX(0.15); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(-0.15); } 100% { transform: scaleX(1); } }
.ci-rotary .ci-spin { transform-origin: center; } .ci-rotary.on .ci-spin { animation: ciSpin var(--ci-dur, 1s) linear infinite; }
@keyframes ciKelly { to { transform: translateY(12px); } }
.ci-rotary.on .ci-kelly { animation: ciKelly var(--ci-dur, 1s) linear infinite; }
@keyframes ciBlock { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(22px); } }
.ci-block.on .ci-block { animation: ciBlock 3s ease-in-out infinite; }
@keyframes ciPress { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(8px); opacity: 1; } }
.ci-wob.on .ci-press { animation: ciPress 1.1s ease-in-out infinite; }
.ci-wob .ci-crack { opacity: 0; } .ci-wob.on .ci-crack { opacity: .7; }
.ci-orient .ci-tf { transform-origin: 50% 100%; transform: rotate(var(--ci-rot, 0deg)); transition: transform 1.2s cubic-bezier(.3,1.4,.5,1); }
@keyframes ciJoint { 0% { transform: translateY(-6px); } 60% { transform: translateY(6px); } 100% { transform: translateY(6px); } }
.ci-conn.on .ci-joint { animation: ciJoint 2.4s ease-in-out infinite; }
.ci-wc .ci-ram { transition: transform .6s ease; } .ci-wc.on .ci-ram.l { transform: translateX(4px); } .ci-wc.on .ci-ram.r { transform: translateX(-4px); }
.ci-wc.alarm { color: var(--crit); animation: pulseBg 1s infinite; }
@media (prefers-reduced-motion: reduce) { .ctl-icon * { animation: none !important; } }

/* ненавязчивый объём: кнопки, панели, поля */
.btn { background: linear-gradient(180deg, #243039 0%, #1a242a 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.45); }
.btn:hover { background: linear-gradient(180deg, #2b3944 0%, #1f2a31 100%); }
.btn:active:not(:disabled) { box-shadow: inset 0 2px 4px rgba(0,0,0,.55); }
.btn.primary { background: linear-gradient(180deg, #ffbb5a 0%, #ea9a33 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 3px rgba(0,0,0,.5); }
.btn.primary:hover { background: linear-gradient(180deg, #ffc774 0%, #f1a544 100%); }
.btn.on { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(108,191,121,.35), 0 1px 2px rgba(0,0,0,.45); }
.btn.danger { background: linear-gradient(180deg, #2c2224 0%, #211a1b 100%); }
.panel, .ctl, .tfpanel, .depthbar, .stripbox, .dials, .rig-panel, .tiles {
  background-image: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 40%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.35); }
.tile { background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 60%); }
input[type=text], input[type=email], input[type=search], input[type=number], input[type=password], select, textarea, .stepper .val { box-shadow: inset 0 2px 3px rgba(0,0,0,.45); }
.lbl, h3 { text-shadow: 0 1px 0 rgba(0,0,0,.7), 0 -1px 0 rgba(255,255,255,.03); }
.tabbar button.cur { text-shadow: 0 0 8px rgba(242,165,65,.25); }
.seg-ctl button.on { box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }

/* ---------- связь, инструктор, прихват, вибрации (v3) */
.instr-bar { background: linear-gradient(180deg, #1d3350, #152a42); border: 1px solid #4f7fb8; color: #dce9ff; padding: 10px 14px; border-radius: 6px; font-weight: 600; cursor: pointer; box-shadow: 0 0 0 1px rgba(79,127,184,.25), 0 6px 18px rgba(0,0,0,.35); animation: instrIn .35s ease-out; }
.instr-bar::before { content: 'СООБЩЕНИЕ ИНСТРУКТОРА · '; letter-spacing: .08em; font-size: 11px; color: #9cc3ff; }
@keyframes instrIn { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.instr-panel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 16px 0; padding: 8px 12px; border: 1px solid #4f7fb8; border-radius: 6px; background: linear-gradient(180deg, rgba(79,127,184,.18), rgba(79,127,184,.08)); }
.instr-panel select { max-width: 280px; }
.team-code { font-size: 42px; letter-spacing: .18em; text-align: center; color: var(--accent); padding: 10px; border: 1px dashed var(--line-2); border-radius: 8px; }
.ev.instr { border-left: 3px solid #4f7fb8; background: rgba(79,127,184,.12); }
.ev.instr-hidden { border-left: 3px dashed #b77ad9; opacity: .85; font-style: italic; }
.ev.chat { border-left: 3px solid var(--line-2); }
.events.chat { max-height: 180px; }
.team-panel, .stuck-panel, .vib-panel { display: grid; gap: 8px; align-content: start; }
.stuck-panel .kv { font-size: 12px; }
.vib-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 10px; align-items: center; }
.vib-bar { height: 10px; border-radius: 5px; background: var(--ground); border: 1px solid var(--line); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.vib-bar i { display: block; height: 100%; border-radius: 5px; transition: width .6s, background .6s; }
.ci-jar { animation: ciJar 1.2s ease-in infinite; animation-play-state: paused; }
.ctl-icon.on .ci-jar, .stuck-panel .ci-jar { animation-play-state: running; }
@keyframes ciJar { 0%, 60% { transform: translateY(0); } 70% { transform: translateY(14px); } 100% { transform: translateY(0); } }
/* работа вдвоём: чужая часть пульта приглушена */
.dash[data-myrole="engineer"] .dw:is([data-id="pumps"], [data-id="rotary"], [data-id="block"], [data-id="wob"], [data-id="conn"], [data-id="stuck"]) .dw-body,
.dash[data-myrole="driller"] .dw:is([data-id="orient"]) .dw-body { opacity: .5; pointer-events: none; filter: saturate(.4); }
.dash[data-myrole="engineer"] .dw:is([data-id="pumps"], [data-id="rotary"], [data-id="block"], [data-id="wob"], [data-id="conn"], [data-id="stuck"])::after,
.dash[data-myrole="driller"] .dw:is([data-id="orient"])::after { position: absolute; right: 8px; bottom: 8px; font-size: 11px; letter-spacing: .06em; color: var(--muted); background: var(--panel); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; pointer-events: none; }
.dash[data-myrole="engineer"] .dw:is([data-id="pumps"], [data-id="rotary"], [data-id="block"], [data-id="wob"], [data-id="conn"], [data-id="stuck"])::after { content: 'управляет бурильщик'; }
.dash[data-myrole="driller"] .dw:is([data-id="orient"])::after { content: 'управляет инженер ННБ'; }
/* инструктор: список попыток */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.live-card { display: grid; gap: 8px; }
.live-card .kvs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.live-card .kvs div { background: var(--ground); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.live-card .kvs b { display: block; font-family: var(--f-mono); font-size: 15px; }
.live-card.alarm { border-color: var(--crit, #e0584f); box-shadow: 0 0 0 1px rgba(224,88,79,.4), 0 6px 18px rgba(0,0,0,.35); }
.live-card .prog { height: 6px; background: var(--ground); border-radius: 3px; overflow: hidden; }
.live-card .prog i { display: block; height: 100%; background: var(--accent); }

/* ---------- обучение и сертификаты */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.course-card { display: grid; gap: 8px; align-content: start; }
.course-card .prog, .live-card .prog { height: 6px; background: var(--ground); border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.course-card .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffd08a); }
.course-tickets { display: grid; gap: 4px; }
.ct { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 4px; background: var(--ground); border: 1px solid var(--line); }
.ct.ok { border-color: rgba(121,199,127,.45); } .ct.ok > span:first-child { color: #79c77f; }
.ct.fail > span:first-child { color: var(--crit); }
.cert-box svg { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.print-only { display: none; }
@media print {
  body.printing > *:not(.print-only) { display: none !important; }
  body.printing .print-only { display: block !important; }
  body.printing .print-only svg { width: 100%; height: auto; }
  @page { size: A4 landscape; margin: 0; }
}

/* ---------- обучающий билет */
.tut-card { position: fixed; left: 18px; bottom: 18px; width: 380px; max-width: calc(100vw - 36px); z-index: 60; padding: 14px 16px; border-radius: 10px;
  background: linear-gradient(180deg, #243142, #1a2431); border: 1px solid var(--accent); box-shadow: 0 0 0 1px rgba(242,165,65,.25), 0 14px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
  display: grid; gap: 6px; animation: instrIn .35s ease-out; }
.tut-card h3 { margin: 0; color: var(--accent); }
.tut-card p { margin: 0; font-size: 14px; line-height: 1.45; }
.tut-card.ok { border-color: #79c77f; }
.tut-card.ok h3::after { content: '  ✓'; color: #79c77f; }
.tut-dots { display: flex; gap: 4px; } .tut-dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--line-2); } .tut-dots i.done { background: #79c77f; } .tut-dots i.cur { background: var(--accent); }
.tut-hl { outline: 3px solid var(--accent) !important; outline-offset: 3px; animation: tutPulse 1s ease-in-out infinite; position: relative; z-index: 5; }
@keyframes tutPulse { 50% { outline-color: rgba(242,165,65,.25); } }
.tut-note { border-left: 3px solid var(--accent); margin-bottom: 12px; }
@media (max-width: 700px) { .tut-card { left: 8px; right: 8px; bottom: 8px; width: auto; } }
.bars.wide .bar { grid-template-columns: minmax(180px, 1.3fr) 1fr 110px; }

/* ---------- пульт на один экран */
.dash-fit { position: relative; overflow: hidden; }
.dash-fit > .dash { transform-origin: 0 0; }
.dash-fit.fitted { overflow: hidden; }
.console-dash { padding: 4px 11px 0; }
.status-strip { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 32px)); z-index: 66; pointer-events: none; }
.status-strip > .alarm { pointer-events: auto; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.55); animation: pulseBg 1.2s infinite; }
.status-strip > div[hidden] { display: none; }
/* состояние режима — в шапке: зелёный «в норме» или жёлтое предупреждение (клик — текст целиком) */
.hstat { flex: 1 1 160px; min-width: 110px; display: flex; position: relative; }
.hstat > div { flex: 1; min-width: 0; height: 28px; box-sizing: border-box; padding: 0 10px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 14px; font-size: 13px; }
.hstat > div[hidden] { display: none; }
.hstat .warnbar { cursor: pointer; }
.hstat .warnbar::before { content: '⚠ '; }
.hstat .warnbar.open { position: absolute; top: 0; left: 0; right: auto; width: max(100%, 420px); height: auto; white-space: normal; line-height: 1.35; padding: 6px 12px; z-index: 80; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.okbar { background: rgba(121,199,127,.07); border: 1px solid rgba(121,199,127,.28); color: #9fd8a4; }
.okbar::before { content: '● '; color: #79c77f; }
/* скорость времени — выпадающий список */
.speed { position: relative; }
.speed-btn { min-width: 52px; }
.speed-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 80; display: flex; gap: 3px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.speed-menu[hidden] { display: none; }
.toast-float { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: min(760px, calc(100vw - 32px)); background: linear-gradient(180deg, #3b3016, #2c2410); border: 1px solid var(--warn); color: #ffe7b0; padding: 10px 16px; border-radius: 8px; box-shadow: 0 12px 34px rgba(0,0,0,.55); animation: instrIn .25s ease-out; }
.float-instr { position: fixed; top: 96px; left: 50%; transform: translateX(-50%); z-index: 70; max-width: min(820px, calc(100vw - 32px)); }
.ctl { padding: 7px 9px; gap: 5px; }
.ctl-ic { padding-left: 46px !important; }
.ctl .btn.sm { padding-top: 3px; padding-bottom: 3px; }
.ctl-more { display: none; }
.ctl.more .ctl-more { display: block; }
.more-btn { background: var(--ground); border: 1px solid var(--line-2); color: var(--muted); border-radius: 4px; width: 24px; height: 20px; line-height: 16px; padding: 0; cursor: pointer; font-size: 14px; }
.more-btn:hover { color: var(--accent); border-color: var(--accent); }
.btn-grid.g6 { grid-template-columns: repeat(6, 1fr); }
.btn-grid.g6 .btn { padding-left: 0; padding-right: 0; }
.tiles.t4 { grid-template-columns: repeat(4, minmax(0, 1fr)); height: 100%; align-content: stretch; }
.tiles.t4 .tile { padding: 6px 9px; }
.tiles.t4 .tile .v { font-size: 20px; }
.tiles.t4 .tile .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles .tile.dup { display: none; }
.tiles.show-dup .tile.dup { display: block; }
.depthbar > div { padding: 5px 12px; }
.depthbar .v { font-size: 20px; }
.gauge-box { position: relative; gap: 0; }
.gauge-mode { position: absolute; left: 4px; top: 4px; z-index: 2; display: flex; gap: 3px; opacity: .55; transition: opacity .2s; }
.gauge-box:hover .gauge-mode { opacity: 1; }
.gauge-mode .btn { padding: 1px 6px; font-size: 11px; min-height: 0; }
.tab-expand { margin-left: auto; }
.c-tabs.expanded { position: fixed; inset: 70px 24px 24px; z-index: 65; overflow: auto; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55), 0 20px 60px rgba(0,0,0,.6); }
.dw-body > .panel { padding: 9px 11px; }
.dw-body > .panel h3 { margin-bottom: 6px; }
.tfpanel { padding: 8px; }
[data-myrole="engineer"] .dw:is([data-id="pumps"], [data-id="rotary"], [data-id="block"], [data-id="wob"], [data-id="conn"], [data-id="stuck"]) .dw-body,
[data-myrole="driller"] .dw:is([data-id="orient"]) .dw-body { opacity: .5; pointer-events: none; filter: saturate(.4); }

/* ---------- окно «Замеры, профиль, расчёты» поверх пульта */
.launcher { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; height: 100%; padding: 0 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; box-sizing: border-box; }
.launcher .btn { flex: 1 1 auto; }
.float-win { position: fixed; right: 24px; top: 110px; width: min(1100px, 62vw); height: min(720px, 74vh); min-width: 480px; min-height: 300px; z-index: 60; display: flex; flex-direction: column; gap: 6px; resize: both; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.65), 0 0 0 1px rgba(242,165,65,.25), inset 0 1px 0 rgba(255,255,255,.06); animation: instrIn .2s ease-out; }
.float-win[hidden] { display: none; }
.float-win .win-head { display: flex; align-items: center; gap: 6px; cursor: move; user-select: none; margin: -4px -4px 0; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.float-win .tabbar { margin-bottom: 4px; flex: none; }
.float-win .tab-body { flex: 1; overflow: auto; min-height: 0; }
.float-win.max { inset: 64px 16px 16px !important; width: auto !important; height: auto !important; resize: none; }
@media (max-width: 900px) { .float-win { inset: 60px 6px 6px !important; width: auto !important; height: auto !important; min-width: 0; resize: none; } }

/* компактная шапка пульта */
.console-app .topbar { flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; gap: 10px; }
.console-app .topbar .brand span { display: none; }
.console-app .topbar > .row { flex-wrap: nowrap; gap: 6px; }
.console-app .topbar .spacer { display: none; }
.console-app .topbar .row.small > span:not(.chip) { display: none; }
.console-app .topbar .row.small > .chip:not(.warn) { display: none; }
.console-app .topbar .row.small > button { display: none; }   /* на пульте один выход — «Выход с пульта» */
.console-app .topbar > .console-head { flex: 1 1 auto; min-width: 0; }
@media (max-width: 1700px) { .console-app .topbar .muted.small { display: none; } }
@media (max-width: 1500px) { .console-app .topbar .btn.sm { padding-left: 7px; padding-right: 7px; } }
/* ГНВП: в штатном режиме — компактно */
.wc-panel:not(.closed) .wc-cell:nth-child(n+3) { display: none; }
.wc-panel .wc-grid { grid-template-columns: 1fr 1fr; }
.launcher { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: center; gap: 5px; overflow: hidden; }
.launcher .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wc-panel:not(.closed) .wc-state { padding: 5px 10px; font-size: 13px; } .wc-panel:not(.closed) .wc-cell { padding: 5px 10px; } .wc-panel { gap: 6px !important; }

/* ---------- пакеты */
.chip.lock { display: inline-flex; align-items: center; gap: 4px; color: #d9c7a0; border-color: rgba(242,165,65,.45); background: rgba(242,165,65,.08); margin-right: 6px; }
.chip.lock svg { flex: none; }
.lock-panel { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 20px; max-width: 620px; margin: 20px auto; }
.lock-panel .lock-ic { color: var(--accent); filter: drop-shadow(0 0 12px rgba(242,165,65,.35)); animation: lockIn .6s cubic-bezier(.2,1.6,.4,1); }
.lock-panel p { margin: 0; color: var(--muted); }
@keyframes lockIn { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.pkg-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; }
.pkg-dot { font-size: 11px; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--muted); text-decoration: line-through; opacity: .7; }
.pkg-dot.on { color: #9fd8a4; border-color: rgba(121,199,127,.5); background: rgba(121,199,127,.08); text-decoration: none; opacity: 1; }
.pkg-dot.add { color: var(--accent); border-color: var(--accent); text-decoration: none; opacity: 1; }
.pkg-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 12px 0; }
.pkg-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, var(--panel), var(--panel-2)); cursor: pointer; transition: border-color .2s, transform .2s; }
.pkg-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pkg-card.on { border-color: rgba(121,199,127,.5); cursor: default; }

/* ---------- эффекты пульта */
.dash-fit { will-change: transform; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); box-shadow: inset 0 2px 4px rgba(0,0,0,.45); }
.fx-flash-accent { animation: fxFlashA 1.3s ease-out; }
.fx-flash-crit { animation: fxFlashC 1.3s ease-out; }
@keyframes fxFlashA { 0% { box-shadow: 0 0 0 2px var(--accent), 0 0 26px rgba(242,165,65,.55); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes fxFlashC { 0% { box-shadow: 0 0 0 2px var(--crit), 0 0 30px rgba(229,83,75,.6); } 100% { box-shadow: 0 0 0 0 transparent; } }
.fx-float { position: fixed; z-index: 90; transform: translate(-50%, 0); font: 700 22px var(--f-mono); pointer-events: none; animation: fxFloat 1.6s ease-out forwards; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.fx-float.fx-crit { color: var(--crit); }
@keyframes fxFloat { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }
.fx-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 55; opacity: 0; transition: opacity .6s; }
.fx-vignette.vg-alarm { opacity: 1; animation: fxVigA 1.4s ease-in-out infinite; }
.fx-vignette.vg-warn { opacity: 1; box-shadow: inset 0 0 80px 10px rgba(242,165,65,.18); }
.fx-vignette.vg-dark { opacity: 1; box-shadow: inset 0 0 160px 40px rgba(0,0,0,.65); }
@keyframes fxVigA { 0%, 100% { box-shadow: inset 0 0 90px 12px rgba(229,83,75,.18); } 50% { box-shadow: inset 0 0 140px 30px rgba(229,83,75,.42); } }
.fx-hit { position: fixed; inset: 0; z-index: 56; pointer-events: none; background: radial-gradient(circle at 50% 60%, rgba(255,240,210,.22), transparent 60%); animation: fxHit .45s ease-out forwards; }
@keyframes fxHit { from { opacity: 1; } to { opacity: 0; } }
.dw.pop .dw-body { animation: dwPop .9s cubic-bezier(.2,1.2,.4,1); }
@keyframes dwPop { 0% { transform: scale(.94); opacity: 0; box-shadow: 0 0 0 2px var(--accent), 0 0 40px rgba(242,165,65,.5); } 60% { transform: scale(1.01); opacity: 1; } 100% { transform: none; box-shadow: 0 0 0 0 transparent; } }
.depthbar .v, .tile .v { transition: color .4s; }
@media (prefers-reduced-motion: reduce) { .fx-vignette.vg-alarm, .dw.pop .dw-body, .fx-flash-accent, .fx-flash-crit { animation: none !important; } }

/* группы вкладок в окне расчётов */
.win-groups { display: flex; flex-wrap: wrap; gap: 3px; flex: none; }
.win-groups button { background: var(--ground); border: 1px solid var(--line); color: var(--muted); border-radius: 4px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
.win-groups button:hover { color: var(--text); border-color: var(--line-2); }
.win-groups button.cur { color: #1b1204; background: var(--accent); border-color: var(--accent); }
.float-win .tabbar[hidden] { display: none; }
.tab-lock { display: inline-flex; margin-left: 5px; color: var(--accent); vertical-align: -1px; }

/* ---------- отчёт для руководителя (светлый лист A4, печать в PDF) ---------- */
.rep-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(8, 11, 13, .88); display: flex; flex-direction: column; }
.rep-bar-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.rep-bar-top .spacer { flex: 1; }
.rep-scroll { overflow: auto; flex: 1; padding: 20px 12px 40px; }
.rep-doc { display: grid; gap: 18px; justify-items: center; }
.rep-page { box-sizing: border-box; width: 210mm; max-width: 100%; min-height: 297mm; background: #fff; color: #1c2226; padding: 16mm 15mm; font: 13px/1.45 'IBM Plex Sans', system-ui, sans-serif; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.rep-page h1 { font: 600 26px/1.15 'Barlow Condensed', sans-serif; margin: 4px 0 2px; letter-spacing: .01em; color: #111; }
.rep-page h2 { font: 600 15px 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #8a5a10; margin: 20px 0 8px; border-bottom: 1px solid #e3ddd0; padding-bottom: 4px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 3px solid #f2a541; padding-bottom: 10px; }
.rep-kicker { font: 600 11px 'Barlow Condensed', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #b07314; }
.rep-sub, .rep-date, .rep-muted { color: #6a7479; font-size: 12px; }
.rep-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #e3ddd0; border: 1px solid #e3ddd0; margin-top: 14px; }
.rep-kpi > div { background: #fbfaf6; padding: 10px 12px; display: grid; gap: 2px; }
.rep-kpi b { font: 600 24px 'JetBrains Mono', monospace; color: #111; }
.rep-kpi span { font-size: 11.5px; color: #5d676c; }
.rep-concl { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.rep-chart { width: 100%; height: auto; display: block; }
.rep-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: #5d676c; }
.rep-legend i { display: inline-block; width: 16px; height: 3px; margin-right: 5px; vertical-align: middle; }
.rep-legend i.d { height: 0; border-top: 2px dashed; }
.rep-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.rep-tbl th { text-align: right; font: 600 11px 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #6a7479; border-bottom: 1.5px solid #cfc8b8; padding: 5px 6px; }
.rep-page td, .rep-page li, .rep-page p { color: inherit; }
.rep-page .rep-tbl th { color: #4b5559 !important; opacity: 1; background: none; position: static; }
.rep-page .rep-muted { color: #6a7479; }
.rep-tbl td { color: #1c2226; background: none; text-align: right; padding: 5px 6px; border-bottom: 1px solid #ece7dc; vertical-align: top; font-variant-numeric: tabular-nums; }
.rep-tbl .l { text-align: left; }
.rep-st { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.rep-st.ok { background: #e1f3e4; color: #1f6b2c; } .rep-st.warn { background: #fdf0d9; color: #8a5a10; } .rep-st.muted { background: #eef0f1; color: #5d676c; }
.rep-bar { display: inline-block; width: 70px; height: 7px; background: #eee8dc; vertical-align: middle; margin-right: 4px; }
.rep-bar i { display: block; height: 100%; background: #f2a541; }
.rep-foot { margin-top: 22px; font-size: 11px; color: #858f93; border-top: 1px solid #ece7dc; padding-top: 8px; }
body.rep-standalone .rep-doc { padding: 20px 0; }
@media print {
  @page { size: A4; margin: 0; }
  body.rep-open > *:not(.rep-overlay) { display: none !important; }
  body.rep-open { background: #fff !important; }
  .rep-overlay { position: static; background: none; display: block; }
  .rep-bar-top { display: none; }
  .rep-scroll { overflow: visible; padding: 0; }
  .rep-doc { display: block; }
  .rep-page { box-shadow: none; width: 210mm; min-height: 0; height: 297mm; page-break-after: always; break-after: page; }
  body.rep-standalone { background: #fff; }
}

/* ---------- калькулятор окупаемости ---------- */
.roi { display: grid; gap: 12px; }
.roi-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.roi-in input { width: 100%; min-width: 0; }
.roi-in select { width: 100%; }
.roi-out { display: grid; gap: 8px; }
.roi-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.roi-kpi > div { background: var(--panel-2); padding: 10px 12px; display: grid; gap: 3px; }
.roi-kpi span { font-size: 12px; color: var(--muted); }
.roi-kpi b { font: 600 22px var(--f-mono); }
.roi-kpi b.ok { color: var(--ok); } .roi-kpi b.crit { color: var(--crit, #e5534b); }
.roi-be { background: #2a2414; border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 4px; }
.roi-sec { display: grid; gap: 8px; }

/* ---------- первые шаги пробного периода ---------- */
.first-steps { margin-bottom: 12px; display: grid; gap: 8px; }
.first-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.first-steps li { padding-left: 4px; }
.first-steps li > * { vertical-align: middle; }
.first-steps li span:first-child { margin-right: 10px; }
.first-steps li.done span:first-child { color: var(--muted); text-decoration: line-through; }
.fs-bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.fs-bar i { display: block; height: 100%; background: var(--accent); transition: width .5s; }
@media (max-width: 640px) { .rep-kpi { grid-template-columns: repeat(2, 1fr); } .rep-page { padding: 8mm 6mm; min-height: 0; } }

/* ---------- учётная запись ---------- */
.qr-box { background: #fff; padding: 8px; border-radius: 6px; width: 180px; height: 180px; flex: none; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.backup-codes { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 18px; justify-content: start; font-size: 15px; background: var(--ground); padding: 10px 14px; border-radius: 6px; border: 1px dashed var(--line-2); }
.tbl tr.bad-row td { color: var(--crit, #e5534b); }
.warnc { color: var(--accent); } .good { color: var(--ok); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.model-note { margin: 10px 0 0; font-size: 11px; color: var(--faint); border-top: 1px dashed var(--line); padding-top: 6px; }
.rss-ctl { display: grid; gap: 6px; } .rss-ctl input[type=range] { width: 110px; } .seg-ctl.sm button { padding: 5px 6px; font-size: 12px; white-space: nowrap; line-height: 1.1; }
.st-steps { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; } .st-steps span { padding: 2px 6px; border-radius: 4px; background: var(--ground); color: var(--muted); } .st-steps span.cur { background: #2a2414; color: var(--accent); } .st-steps span.done { color: var(--ok); } .st-ctl { display: grid; gap: 6px; }
.exam-clock { font-family: var(--f-mono); } .exam-clock.crit { color: var(--crit, #e5534b); border-color: currentColor; }

/* ---------- «Как надо» ---------- */
.howto { display: grid; gap: 10px; }
.howto-stagebox { background: #0f171b; border: 1px solid var(--line); border-radius: 8px; }
.howto-stage { width: 100%; height: auto; display: block; }
.howto-cap { min-height: 3.2em; font-size: 15px; line-height: 1.45; }
.howto-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.howto-item { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); cursor: pointer; font: inherit; }
.howto-item:hover { border-color: var(--accent); }
.howto-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.howto-play { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; font-size: 12px; }

/* ИИ-наставник */
.ai-panel { border-left: 3px solid var(--accent); }
.ai-md { line-height: 1.55; }
.ai-md h4 { margin: 14px 0 6px; font-size: 15px; color: var(--accent); letter-spacing: .3px; }
.ai-md h4:first-child { margin-top: 4px; }
.ai-md p { margin: 4px 0; }
.ai-md ul, .ai-md ol { margin: 4px 0 4px 20px; padding: 0; }
.ai-md li { margin: 3px 0; }
.spin { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.small.warn { color: var(--warn); }

/* крупные зенит и азимут */
.nav-panel { display: grid; align-content: center; padding: 6px 14px; overflow: hidden; }
.navbar { display: grid; grid-template-columns: 1fr 1fr 1.15fr 0.9fr; gap: 4px 18px; align-items: end; }
.nav-cell { min-width: 0; }
.nav-lbl { font: 600 12px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav-big { font: 600 30px/1.1 var(--f-mono, 'JetBrains Mono', monospace); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nav-cell:first-child .nav-big, .nav-cell:nth-child(2) .nav-big { color: var(--accent); font-size: 38px; }
.nav-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-cell.warn .nav-big { color: var(--warn, #e3b341); } .nav-cell.bad .nav-big { color: var(--crit, #e5534b); }
.nav-foot { grid-column: 1 / -1; font-size: 11px; color: var(--faint); }

/* ---------- глубины и зенит/азимут: шрифт по размеру панели, чтобы цифры не упирались в рамку */
.dw[data-id="depth"] .dw-body, .dw[data-id="nav"] .dw-body { container-type: size; }
.dw[data-id="depth"] .depthbar { height: 100%; align-items: center; }
.dw[data-id="depth"] .depthbar > div { padding: 3px 12px; display: grid; align-content: center; height: 100%; }
.dw[data-id="depth"] .depthbar .lbl { font-size: clamp(10px, 20cqh, 12px); line-height: 1.1; }
.dw[data-id="depth"] .depthbar .v { font-size: clamp(13px, min(42cqh, 3.3cqw), 22px); line-height: 1.15; }
.dw[data-id="depth"] .depthbar .v small { font-size: .6em; }
.dw[data-id="nav"] .nav-panel { height: 100%; padding: 4px 14px; }
.dw[data-id="nav"] .navbar { gap: 0 16px; }
.dw[data-id="nav"] .nav-lbl { font-size: clamp(10px, 11cqh, 12px); }
.dw[data-id="nav"] .nav-big { font-size: clamp(15px, min(25cqh, 3.9cqw), 30px); line-height: 1.12; }
.dw[data-id="nav"] .nav-cell:first-child .nav-big, .dw[data-id="nav"] .nav-cell:nth-child(2) .nav-big { font-size: clamp(17px, min(32cqh, 4.8cqw), 38px); }
.dw[data-id="nav"] .nav-sub { font-size: clamp(10px, 10.5cqh, 12px); }
.dw[data-id="nav"] .nav-foot { font-size: clamp(9px, 9.5cqh, 11px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- профиль слева внизу */
.user-dock { position: fixed; left: 12px; bottom: 12px; z-index: 64; display: flex; align-items: center; gap: 9px; max-width: 250px;
  padding: 5px 10px 5px 5px; border-radius: 12px; cursor: pointer; color: var(--text); text-align: left;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent); border: 1px solid var(--line-2);
  box-shadow: 0 6px 22px rgba(0,0,0,.28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .15s, background .15s; }
.user-dock:hover, .user-dock[aria-expanded="true"] { border-color: var(--accent); }
.um-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--f-label); letter-spacing: .04em;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7a4a0c)); color: var(--accent-ink); }
.um-who { display: grid; min-width: 0; line-height: 1.2; }
.um-who b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-who small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-gear { display: grid; color: var(--muted); margin-left: 2px; transition: transform .3s, color .15s; }
.user-dock:hover .um-gear { color: var(--accent); transform: rotate(60deg); }
.user-dock.compact { padding: 4px; gap: 0; border-radius: 50%; opacity: .8; }
.user-dock.compact:hover { opacity: 1; }
.user-dock.compact .um-who, .user-dock.compact .um-gear { display: none; }
.user-dock.compact::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--panel-2) no-repeat center / 11px;
  border: 1px solid var(--line-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9ca2' stroke-width='2.4'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M5.3 18.7l2.1-2.1M16.6 7.4l2.1-2.1'/%3E%3C/svg%3E"); }
.um-menu { position: fixed; z-index: 95; min-width: 250px; max-width: 320px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: umIn .14s ease-out; display: grid; gap: 1px; }
@keyframes umIn { from { opacity: 0; transform: translateY(6px); } }
.um-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-head > div { display: grid; min-width: 0; } .um-head b { font-size: 14px; } .um-head small { font-size: 12px; }
.um-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-size: 14px; color: var(--text); }
.um-item:hover, .um-item:focus-visible { background: var(--panel-2); outline: none; }
.um-item i { display: grid; width: 18px; color: var(--muted); }
.um-item:hover i { color: var(--accent); }
.um-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.page { padding-bottom: 72px; }

/* ---------- окно настроек */
.settings { display: grid; gap: 18px; margin: 10px 0 14px; min-width: min(640px, 80vw); }
.settings section { display: grid; gap: 10px; }
.set-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; }
.set-row .seg-ctl button { padding: 7px 10px; }
@media (max-width: 600px) { .set-row { grid-template-columns: 1fr; } }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.preset-card { display: grid; gap: 4px; align-content: start; text-align: left; padding: 8px; border-radius: 8px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); }
.preset-card:hover { border-color: var(--muted); }
.preset-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.preset-card i { display: block; aspect-ratio: 120 / 72; background: var(--ground); border-radius: 4px; overflow: hidden; }
.preset-card svg { display: block; width: 100%; height: 100%; }
.preset-card b { font-family: var(--f-label); font-size: 15px; letter-spacing: .03em; }
.preset-card small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pv-c { fill: color-mix(in srgb, var(--accent) 70%, transparent); } .pv-k { fill: color-mix(in srgb, var(--accent) 35%, var(--panel-2)); } .pv-g { fill: color-mix(in srgb, var(--spp) 45%, var(--panel-2)); }
.pv-r { fill: color-mix(in srgb, var(--rop) 45%, var(--panel-2)); } .pv-i { fill: var(--line-2); }
.theme-btn { padding: 3px 7px; }

/* ================================================================= светлая тема */
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #e8ecee; --panel: #ffffff; --panel-2: #f2f5f6; --line: #d4dbdf; --line-2: #b8c3c9;
  --text: #182226; --muted: #52616a; --faint: #7e8c93;
  --accent: #c0720d; --accent-ink: #ffffff; --tf: #c0720d; --tf-old: #d9ab6e;
  --spp: #0b85a0; --hook: #3d464c; --wob: #c0720d; --rop: #2b8a3a; --plan: #6d7b82; --fact: #0b85a0; --proj: #c0720d;
  --ok: #2b8a3a; --warn: #a06d00; --crit: #c9352d; --plan-line: #56646b;
}
:root { --plan-line: #e8e3d6; }
[data-theme="light"] .btn { background: linear-gradient(180deg, #ffffff 0%, #eef2f4 100%); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(20,30,36,.12); }
[data-theme="light"] .btn:hover { background: linear-gradient(180deg, #ffffff 0%, #e4eaed 100%); border-color: var(--muted); }
[data-theme="light"] .btn:active:not(:disabled) { box-shadow: inset 0 2px 4px rgba(20,30,36,.18); }
[data-theme="light"] .btn.primary { background: linear-gradient(180deg, #e08f26 0%, #c0720d 100%); color: #fff; border-color: #a9630a; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 3px rgba(120,70,0,.3); }
[data-theme="light"] .btn.primary:hover { background: linear-gradient(180deg, #eb9c34 0%, #cc7c14 100%); }
[data-theme="light"] .btn.danger { background: linear-gradient(180deg, #fff 0%, #fbeeed 100%); border-color: #e0a19c; color: #b02a22; }
[data-theme="light"] .btn.on { background: #e3f3e6; border-color: var(--ok); color: #1d6b2a; }
[data-theme="light"] .btn.ghost { background: transparent; box-shadow: none; }
[data-theme="light"] .panel, [data-theme="light"] .ctl, [data-theme="light"] .tfpanel, [data-theme="light"] .depthbar, [data-theme="light"] .stripbox,
[data-theme="light"] .dials, [data-theme="light"] .tiles { background-image: none; box-shadow: 0 1px 3px rgba(20,30,36,.08); }
[data-theme="light"] .tile { background-image: none; }
[data-theme="light"] input[type=text], [data-theme="light"] input[type=email], [data-theme="light"] input[type=search], [data-theme="light"] input[type=number],
[data-theme="light"] input[type=password], [data-theme="light"] select, [data-theme="light"] textarea, [data-theme="light"] .stepper .val { background: #fff; box-shadow: inset 0 1px 2px rgba(20,30,36,.1); }
[data-theme="light"] .lbl, [data-theme="light"] h3 { text-shadow: none; }
[data-theme="light"] .tbl tr.hl td, [data-theme="light"] .roi-be, [data-theme="light"] .st-steps span.cur { background: #fdf1dc; }
[data-theme="light"] .tile.crit { background: #fdecea; }
[data-theme="light"] .alarm { background: #fdecea; color: #8e1f18; }
[data-theme="light"] .warnbar { background: #fff4d6; color: #6b4a00; }
[data-theme="light"] .survey-card { background: #fff6e8; }
[data-theme="light"] .ev.penalty { background: #fff6e0; } [data-theme="light"] .ev.fatal { background: #fdecea; }
[data-theme="light"] .modal-bg { background: rgba(30,40,46,.45); }
[data-theme="light"] .seg-ctl button:not(.on) { background: #fff; }
[data-theme="light"] .seg-ctl button:not(.on):hover { background: #eef2f4; }
[data-theme="light"] .wc-state.crit { background: #fdecea; color: #8e1f18; }
[data-theme="light"] .wc-state.warn { background: #fff4d6; color: #6b4a00; }
[data-theme="light"] .wc-state.ok { background: #e6f4e8; color: #1d6b2a; }
[data-theme="light"] .wc-num.crit { color: var(--crit); }
@keyframes pulseBgL { 50% { background: #f9d0cc; } }
[data-theme="light"] .wc-state.crit, [data-theme="light"] .status-strip > .alarm { animation-name: pulseBgL; }
[data-theme="light"] .okbar { background: #eaf6ec; border-color: #9ccfa4; color: #1d6b2a; }
[data-theme="light"] .okbar::before { color: var(--ok); }
[data-theme="light"] .toast-float { background: linear-gradient(180deg, #fff8e6, #fdefcc); color: #4d3500; }
[data-theme="light"] .instr-bar { background: linear-gradient(180deg, #e8f0fb, #dbe7f7); color: #17365e; }
[data-theme="light"] .instr-bar::before { color: #3a67a3; }
[data-theme="light"] .tut-card { background: linear-gradient(180deg, #ffffff, #f5f8fa); }
[data-theme="light"] .chip.lock { color: #7a4a06; }
[data-theme="light"] .pkg-dot.on, [data-theme="light"] .ct.ok > span:first-child { color: #1d6b2a; }
[data-theme="light"] .win-groups button.cur { color: #fff; }
[data-theme="light"] * { scrollbar-color: #b3bec4 transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #bcc6cb; border-color: var(--ground); }
[data-theme="light"] .float-win { box-shadow: 0 24px 70px rgba(20,30,36,.3), 0 0 0 1px rgba(192,114,13,.35); }
[data-theme="light"] .dw.dragging .dw-body { box-shadow: 0 12px 30px rgba(20,30,36,.25); }
[data-theme="light"] .um-menu { box-shadow: 0 18px 50px rgba(20,30,36,.2); }
[data-theme="light"] .user-dock { box-shadow: 0 6px 22px rgba(20,30,36,.14); }
/* светлое стекло */
[data-theme="light"] .console-dash.glass::before { background:
    radial-gradient(1000px 560px at 10% 6%, rgba(242,165,65,.20), transparent 62%),
    radial-gradient(900px 640px at 92% 28%, rgba(79,195,217,.18), transparent 62%),
    radial-gradient(760px 520px at 45% 100%, rgba(121,199,127,.14), transparent 60%),
    linear-gradient(rgba(20,40,50,.045) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(20,40,50,.045) 1px, transparent 1px) 0 0 / 40px 100%, #e3e9ec; }
[data-theme="light"] .dash.glass { --panel: rgba(255,255,255,.62); --panel-2: rgba(244,247,248,.7); --line: rgba(20,40,50,.1); }
[data-theme="light"] .dash.glass .dw-body { background: linear-gradient(160deg, rgba(255,255,255,.75), rgba(255,255,255,.5) 45%, rgba(255,255,255,.6));
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 8px 26px rgba(20,40,50,.12), inset 0 1px 0 #fff; }
[data-theme="light"] .dash.glass .dw.dragging .dw-body { box-shadow: 0 16px 40px rgba(20,40,50,.2), inset 0 1px 0 #fff; }
[data-theme="light"] .dials { background: var(--panel); }
[data-theme="light"] .rig-canvas { background: #dcedf6; }

/* ---------- вход в 3D на схеме буровой */
.rig-box { position: relative; }
.rig-enter { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); display: grid; gap: 2px; justify-items: center; padding: 12px 20px; border-radius: 12px; cursor: pointer;
  background: rgba(8,14,18,.72); border: 1px solid rgba(242,165,65,.7); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 4px rgba(242,165,65,.12);
  opacity: 0; transition: opacity .18s, transform .18s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rig-enter b { font: 600 17px var(--f-label); letter-spacing: .06em; color: #f2a541; text-transform: uppercase; }
.rig-enter span { font-size: 11.5px; color: #cfd8dc; }
.rig-box:hover .rig-enter, .rig-enter:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rig-box .rig-canvas { cursor: pointer; }

/* ================================================================= Буровая 3D (игровой режим) */
body.g3d-open { overflow: hidden; }
.g3d { position: fixed; inset: 0; z-index: 150; background: #0b1117; outline: none; color: #eef3f5; font-family: var(--f-body); user-select: none; animation: g3dIn .35s ease-out; }
@keyframes g3dIn { from { opacity: 0; transform: scale(1.03); } }
.g3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.g3d-canvas:active { cursor: grabbing; }
.g3d-hud { position: absolute; inset: 0; pointer-events: none; }
.g3d-hud button, .g3d-help { pointer-events: auto; }
.g3d.hud-off .g3d-hud > :not(.g3d-help):not(.g3d-alarm) { opacity: 0; }
.g3d-hud > * { transition: opacity .2s; }
.g3d-kick { font: 600 11px var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: #f2a541; }
.g3d-glass, .g3d-obj, .g3d-score, .g3d-card, .g3d-bar, .g3d-phase, .g3d-depths span, .g3d-hk, .g3d-cams, .g3d-x {
  background: rgba(8,14,18,.62); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.g3d-top { position: absolute; top: 14px; left: 14px; right: 14px; display: grid; grid-template-columns: minmax(260px, 360px) 1fr auto; gap: 14px; align-items: start; }
.g3d-obj { border-radius: 12px; padding: 10px 14px; display: grid; gap: 5px; }
.g3d-obj b { font: 600 15px var(--f-label); letter-spacing: .02em; }
.g3d-obj > span { font-size: 12px; color: #b9c6cb; font-family: var(--f-mono); }
.g3d-prog-b { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.g3d-prog-b i { display: block; height: 100%; background: linear-gradient(90deg, #f2a541, #ffd08a); box-shadow: 0 0 12px rgba(242,165,65,.8); transition: width .4s; }
.g3d-mid { display: grid; justify-items: center; gap: 8px; }
.g3d-phase { border-radius: 999px; padding: 6px 18px; font: 600 16px var(--f-label); letter-spacing: .14em; text-transform: uppercase; }
.g3d-phase.go { color: #9fe3a8; border-color: rgba(121,199,127,.6); box-shadow: 0 0 18px rgba(121,199,127,.35); }
.g3d-phase.info { color: #ffd08a; border-color: rgba(242,165,65,.6); }
.g3d-phase.bad { color: #ffb4ae; border-color: rgba(229,83,75,.8); background: rgba(90,20,18,.7); }
.g3d-depths { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.g3d-depths span { border-radius: 8px; padding: 4px 10px; font: 600 17px var(--f-mono); display: grid; text-align: center; min-width: 100px; }
.g3d-depths small { font: 600 10px var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: #9fb0b7; }
.g3d-warn { max-width: 620px; padding: 6px 14px; border-radius: 10px; background: rgba(90,68,14,.82); border: 1px solid #e3b341; color: #ffe7b0; font-size: 13px; text-align: center; }
.g3d-right { display: grid; justify-items: end; gap: 8px; }
.g3d-score { border-radius: 12px; padding: 6px 14px; display: flex; align-items: baseline; gap: 8px; }
.g3d-score span:first-child { font: 600 11px var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: #9fb0b7; }
.g3d-score b { font: 700 26px var(--f-mono); color: #f2a541; text-shadow: 0 0 12px rgba(242,165,65,.6); }
.g3d-score span:last-child { font-size: 12px; color: #cfd8dc; }
.g3d-cams { display: flex; gap: 2px; padding: 3px; border-radius: 10px; }
.g3d-cb { border: 0; background: none; color: #cfd8dc; padding: 5px 10px; border-radius: 7px; cursor: pointer; font: 600 13px var(--f-label); letter-spacing: .04em; }
.g3d-cb:hover { background: rgba(255,255,255,.1); }
.g3d-cb.on { background: #f2a541; color: #1b1204; }
.g3d-x { border-radius: 10px; padding: 6px 12px; color: #fff; cursor: pointer; font: 600 13px var(--f-label); letter-spacing: .06em; }
.g3d-x:hover { border-color: #f2a541; }
.g3d-side { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 7px; width: 240px; }
.g3d-bar { border-radius: 10px; padding: 7px 10px; display: grid; gap: 5px; }
.g3d-bl { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #b9c6cb; }
.g3d-bl b { font: 600 18px var(--f-mono); color: #fff; } .g3d-bl small { color: #9fb0b7; }
.g3d-bt { position: relative; height: 7px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: visible; }
.g3d-bt i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: linear-gradient(90deg, #2c8fb0, #4fc3d9); box-shadow: 0 0 10px rgba(79,195,217,.6); transition: width .25s; }
.g3d-bar[data-id="wob"] .g3d-bt i, .g3d-bar[data-id="hook"] .g3d-bt i { background: linear-gradient(90deg, #c47a12, #f2a541); box-shadow: 0 0 10px rgba(242,165,65,.6); }
.g3d-bar[data-id="rop"] .g3d-bt i { background: linear-gradient(90deg, #3d8f4a, #79c77f); box-shadow: 0 0 10px rgba(121,199,127,.6); }
.g3d-bt em { position: absolute; top: -3px; width: 2px; height: 13px; background: #fff; border-radius: 1px; }
.g3d-bar.bad { border-color: rgba(229,83,75,.9); box-shadow: 0 0 16px rgba(229,83,75,.5); }
.g3d-bar.bad .g3d-bt i { background: linear-gradient(90deg, #a0302a, #e5534b); }
.g3d-left { position: absolute; left: 14px; bottom: 96px; display: grid; gap: 10px; width: 250px; }
.g3d-card { border-radius: 12px; padding: 8px 10px; display: grid; gap: 4px; }
.g3d-tf { width: 150px; height: 150px; justify-self: center; }
.g3d-mm { width: 100%; height: auto; border-radius: 6px; }
.g3d-tft { font-size: 12px; color: #cfd8dc; text-align: center; }
.g3d-nav { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #b9c6cb; } .g3d-nav b { color: #fff; font-family: var(--f-mono); }
.g3d-hot { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 560px); }
.g3d-hk { position: relative; overflow: hidden; border-radius: 12px; padding: 6px 10px 8px; min-width: 70px; display: grid; justify-items: center; gap: 2px; cursor: pointer; color: #eef3f5; font: 600 12px var(--f-label); letter-spacing: .04em; transition: border-color .15s, transform .1s, background .15s; }
.g3d-hk:hover { border-color: rgba(242,165,65,.8); transform: translateY(-2px); }
.g3d-hk kbd { font: 700 13px var(--f-mono); min-width: 26px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-bottom-width: 3px; color: #fff; }
.g3d-hk .g3d-hv { font: 600 11px var(--f-mono); color: #ffd08a; min-height: 0; }
.g3d-hk.on { border-color: #79c77f; background: rgba(28,60,34,.7); box-shadow: 0 0 16px rgba(121,199,127,.45); }
.g3d-hk.on kbd { background: #79c77f; color: #0b1a0e; }
.g3d-hk.hit { animation: g3dHit .35s ease-out; }
@keyframes g3dHit { 0% { transform: scale(.92); box-shadow: 0 0 0 3px #f2a541, 0 0 30px rgba(242,165,65,.8); } 100% { transform: none; } }
.g3d-prog { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: #f2a541; transition: width .3s; }
.g3d-hk.help { opacity: .8; }
.g3d-toasts { position: absolute; top: 150px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; width: min(620px, 90vw); }
.g3d-toast { padding: 8px 16px; border-radius: 10px; background: rgba(8,14,18,.8); border: 1px solid rgba(255,255,255,.18); font-size: 14px; animation: g3dToast .25s ease-out; transition: opacity .4s, transform .4s; }
.g3d-toast.ok { border-color: #79c77f; color: #bff0c6; } .g3d-toast.bad { border-color: #e5534b; color: #ffd1cd; background: rgba(60,16,14,.85); }
.g3d-toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes g3dToast { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.g3d-alarm { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); max-width: min(760px, 90vw); padding: 16px 24px; border-radius: 14px; text-align: center;
  background: rgba(90,20,18,.85); border: 2px solid #e5534b; color: #fff; font: 600 20px var(--f-label); letter-spacing: .04em; animation: g3dAlarm 1s infinite; }
@keyframes g3dAlarm { 50% { box-shadow: 0 0 60px rgba(229,83,75,.8); } }
.g3d.alarm::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 160px 30px rgba(229,83,75,.45); animation: g3dAlarm 1s infinite; }
.g3d-help { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4,8,10,.55); }
.g3d-helpbox { width: min(720px, 92vw); padding: 22px 26px; border-radius: 16px; background: rgba(12,20,26,.92); border: 1px solid rgba(242,165,65,.5); box-shadow: 0 30px 80px rgba(0,0,0,.6); display: grid; gap: 12px; }
.g3d-helpbox h2 { font: 700 28px var(--f-label); letter-spacing: .06em; color: #f2a541; text-transform: uppercase; }
.g3d-helpbox p { margin: 0; color: #cfd8dc; }
.g3d-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.g3d-keys div { display: flex; gap: 10px; align-items: center; font-size: 13px; color: #dfe6e8; }
.g3d-keys kbd { flex: none; min-width: 64px; text-align: center; font: 700 12px var(--f-mono); padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-bottom-width: 3px; }
.g3d-go { justify-self: start; padding: 10px 28px; border-radius: 10px; border: 0; cursor: pointer; background: linear-gradient(180deg, #ffbb5a, #ea9a33); color: #1b1204; font: 700 16px var(--f-label); letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 1100px) { .g3d-side { width: 190px; } .g3d-left { width: 200px; } .g3d-hot { max-width: calc(100vw - 28px); bottom: 8px; } .g3d-left { bottom: 150px; } .g3d-top { grid-template-columns: 1fr auto; } .g3d-mid { display: none; } }
@media (max-width: 700px) { .g3d-side, .g3d-left { display: none; } .g3d-keys { grid-template-columns: 1fr; } }

/* ---------- рабочее место ГТИ */
.gti-gas, .gti-al, .gti-cut, .gti-plot { display: grid; gap: 8px; padding: 8px 10px; height: 100%; box-sizing: border-box; min-height: 0; }
.gti-plot { grid-template-rows: auto 1fr; }
.gti-plot .gti-canvas { width: 100%; height: 100%; min-height: 120px; display: block; }
.gti-plot:not(:has(select)) { grid-template-rows: 1fr; }
.gti-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: flex-end; }
.gti-cell { display: grid; gap: 1px; min-width: 52px; }
.gti-cell .lbl { font: 600 11px var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gti-cell b { font: 600 17px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.gti-cell.big b { font-size: 30px; color: var(--warn); line-height: 1.05; }
.gti-cell.crit b { color: var(--crit); animation: blink 1s steps(2) infinite; }
.gti-cell small { color: var(--muted); font-size: 11px; }
.gti-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; height: 74px; }
.gti-bar { position: relative; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; font-size: 11px; color: var(--muted); }
.gti-bar i { align-self: end; width: 70%; min-height: 2px; background: linear-gradient(180deg, var(--warn), color-mix(in srgb, var(--warn) 45%, transparent)); border-radius: 3px 3px 0 0; transition: height .6s; }
.gti-bar span { font: 600 12px var(--f-label); color: var(--text); }
.gti-bar small { font: 11px var(--f-mono); }
.gti-cut { grid-template-rows: 1fr auto; overflow: auto; align-content: start; }
.gti-cut table { width: 100%; }
.gti-cut td:nth-child(3) { min-width: 180px; }
.gti-cut td.gti-show { color: var(--warn); }
.gti-al { grid-template-rows: auto 1fr; }
.gti-alarms { display: grid; gap: 4px; align-content: start; overflow: auto; min-height: 0; }
.gti-alarm { display: grid; grid-template-columns: 44px auto 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; }
.gti-alarm.on { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 14%, transparent); }
.gti-alarm.on b { color: var(--crit); }
@keyframes blink { 50% { opacity: .45; } }

/* ---------- планирование скважин */
.plan-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 12px; align-items: start; }
.plan-tree { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 4px; max-height: 78vh; overflow: auto; background: var(--panel-2); position: sticky; top: 8px; }
.pt-row { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.pt-row:hover { background: var(--panel-3); }
.pt-row.cur { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.pt-tog { width: 16px; flex: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }
.pt-ic { width: 18px; text-align: center; flex: none; opacity: .85; }
.pt-name { overflow: hidden; text-overflow: ellipsis; }
.plan-main { min-width: 0; }
.plan-sec td { vertical-align: middle; }
.sec-p { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.sec-p input[type=text] { padding: 3px 5px; }
.plan-plots { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.plan-plots svg.plot { width: 100%; height: auto; }
.print-host { display: none; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } .plan-tree { position: static; max-height: 40vh; } }
@media print {
  body.printing > *:not(.print-host) { display: none !important; }
  body.printing .print-host { display: block; color: #000; background: #fff; font: 11px Arial, sans-serif; }
  body.printing .print-host table { border-collapse: collapse; width: 100%; margin: 8px 0; }
  body.printing .print-host th, body.printing .print-host td { border: 1px solid #999; padding: 2px 4px; text-align: right; }
  body.printing .print-host h2 { font-size: 16px; }
}
.plan-main div { min-width: 0; }
.plan-main svg.plot { max-width: 760px; }
.plan-sec select { min-width: 170px; }
.plan-sec td:nth-child(3) .row { flex-wrap: wrap; }
.plan-sec td:nth-child(3) { min-width: 400px; }
.plan-sec td:nth-child(3) select { width: auto; min-width: 0; }
.plan-sec td:nth-child(2) select { width: 190px; }

/* ================= витрина (страница входа): стекло и объём, как на пульте ================= */
.app.lp { position: relative; isolation: isolate; --cx: 50vw; --cy: 30vh; }
.app.lp::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
    radial-gradient(520px 380px at var(--cx) var(--cy), rgba(242,165,65,.10), transparent 70%),
    radial-gradient(1000px 560px at 10% 6%, rgba(242,165,65,.18), transparent 62%),
    radial-gradient(900px 640px at 92% 28%, rgba(79,195,217,.13), transparent 62%),
    radial-gradient(760px 520px at 45% 100%, rgba(121,199,127,.08), transparent 60%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 40px 100%, var(--ground); }
.lp .topbar { background: rgba(13,19,22,.55); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); border-bottom-color: rgba(255,255,255,.08); }
.lp .panel, .lp .feat, .lp .plan, .lp .pkg-card, .lp .hero-stats > div {
  position: relative; border-radius: 12px; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 45%, rgba(255,255,255,.035)), rgba(18,28,34,.42);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 6px rgba(0,0,0,.28); }
.lp .feat, .lp .plan, .lp .pkg-card, .lp .hero-stats > div {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s, opacity .6s; will-change: transform; }
.lp .tilt::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.14), transparent 60%); }
.lp .tilt:hover { --ty: -4px; border-color: rgba(242,165,65,.55);
  box-shadow: 0 22px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(242,165,65,.18), 0 0 26px -6px rgba(242,165,65,.45), inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 6px rgba(0,0,0,.28); }
.lp .tilt:hover::after { opacity: 1; }
.lp .tilt.moving { transition: transform .08s linear, box-shadow .25s, border-color .25s, opacity .6s; }
.lp .hero-stats { gap: 10px; background: none; border: 0; overflow: visible; }
.lp .hero-stats > div { padding: 12px 14px; }
.lp .hero-stats > div:hover b { text-shadow: 0 0 14px rgba(242,165,65,.7); }
.lp .features { gap: 14px; }
.lp .feat { padding: 16px 16px 14px; border-top: 1px solid rgba(255,255,255,.1); }
.lp .feat h3 { display: flex; align-items: center; gap: 9px; }
.lp .feat h3::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2a363d;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.08); transition: background .2s, box-shadow .2s; }
.lp .feat:hover h3::before { background: var(--accent); box-shadow: 0 0 10px var(--accent), inset 0 1px 1px rgba(255,255,255,.4); }
.lp .feat:hover h3 { color: var(--accent); }
.lp .plan { padding: 18px; }
.lp .plan.hot { border-color: rgba(242,165,65,.7); box-shadow: 0 12px 34px rgba(0,0,0,.42), 0 0 0 1px rgba(242,165,65,.3), 0 0 30px -8px rgba(242,165,65,.5), inset 0 1px 0 rgba(255,255,255,.14); }
.lp .rv { opacity: 0; --ty: 18px; }
.lp .rv.in { opacity: 1; --ty: 0px; }
.lp .btn { transition: transform .15s, box-shadow .2s, filter .2s; }
.lp .btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.lp .btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }
.lp .btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px -4px rgba(242,165,65,.7); }
.lp .hero-h { text-shadow: 0 2px 24px rgba(0,0,0,.5); }
[data-theme="light"] .app.lp::before { background:
    radial-gradient(520px 380px at var(--cx) var(--cy), rgba(242,165,65,.14), transparent 70%),
    radial-gradient(1000px 560px at 10% 6%, rgba(242,165,65,.18), transparent 62%),
    radial-gradient(900px 640px at 92% 28%, rgba(79,195,217,.15), transparent 62%),
    linear-gradient(rgba(20,40,50,.045) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(20,40,50,.045) 1px, transparent 1px) 0 0 / 40px 100%, #e3e9ec; }
[data-theme="light"] .lp .topbar { background: rgba(255,255,255,.6); border-bottom-color: rgba(20,40,50,.1); }
[data-theme="light"] .lp .panel, [data-theme="light"] .lp .feat, [data-theme="light"] .lp .plan, [data-theme="light"] .lp .pkg-card, [data-theme="light"] .lp .hero-stats > div {
  background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(255,255,255,.5) 45%, rgba(255,255,255,.62)); border-color: rgba(255,255,255,.9);
  box-shadow: 0 8px 26px rgba(20,40,50,.12), inset 0 1px 0 #fff, inset 0 -2px 6px rgba(20,40,50,.05); }
[data-theme="light"] .lp .tilt:hover { border-color: rgba(192,114,13,.55); box-shadow: 0 18px 40px rgba(20,40,50,.2), 0 0 0 1px rgba(192,114,13,.2), inset 0 1px 0 #fff; }
[data-theme="light"] .lp .tilt::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.7), transparent 60%); }
[data-theme="light"] .lp .feat h3::before { background: #c9d3d7; box-shadow: inset 0 1px 1px rgba(0,0,0,.2); }
[data-theme="light"] .lp .hero-h { text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .lp .rv { opacity: 1; --ty: 0px; } .lp .tilt, .lp .feat, .lp .plan { transition: none; } }
.lp .tilt > * { position: relative; z-index: 1; }
[data-theme="light"] .lp .tilt::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.55), transparent 60%); }

/* ================= витрина: крупное название, кликабельные возможности ================= */
.lp .topbar .brand b { font-size: 26px; }
.lp-word { font: 700 clamp(64px, 9vw, 120px)/.9 var(--f-label); letter-spacing: .02em; margin: 6px 0 6px; color: var(--accent); display: flex; }
.lp-word span { display: inline-block; transform: translateY(70%); opacity: 0; animation: lpRise .8s cubic-bezier(.2,.9,.25,1.15) forwards; text-shadow: 0 0 34px rgba(242,165,65,.35); }
.lp-word span:nth-child(odd) { color: var(--accent); }
@keyframes lpRise { to { transform: none; opacity: 1; } }
.lp-word::after { content: ''; align-self: flex-end; width: 14px; height: 14px; border-radius: 50%; margin: 0 0 14px 10px; background: var(--accent); box-shadow: 0 0 18px var(--accent); animation: lpPulse 1.6s ease-in-out infinite; }
@keyframes lpPulse { 50% { transform: scale(.55); opacity: .5; } }
.lp .hero-h { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; margin: 4px 0 12px; }
.lp .feat { cursor: pointer; outline: none; }
.lp .feat:focus-visible { border-color: var(--accent); }
.lp .feat .feat-more { display: inline-block; margin-top: 8px; font: 600 12px var(--f-mono); letter-spacing: .06em; color: var(--accent); opacity: .55; transition: opacity .2s, transform .2s; }
.lp .feat:hover .feat-more, .lp .feat:focus-visible .feat-more { opacity: 1; transform: translateX(4px); }
/* «пульт проверяет лампы»: индикаторы карточек по очереди вспыхивают */
.lp .feat h3::before { animation: lpLed 7s ease-in-out infinite; }
@keyframes lpLed { 0%, 6%, 100% { background: #2a363d; box-shadow: inset 0 1px 1px rgba(0,0,0,.6); } 3% { background: var(--accent); box-shadow: 0 0 10px var(--accent); } }
.lp .feat:nth-child(1) h3::before { animation-delay: 0s } .lp .feat:nth-child(2) h3::before { animation-delay: .25s } .lp .feat:nth-child(3) h3::before { animation-delay: .5s } .lp .feat:nth-child(4) h3::before { animation-delay: .75s }
.lp .feat:nth-child(5) h3::before { animation-delay: 1s } .lp .feat:nth-child(6) h3::before { animation-delay: 1.25s } .lp .feat:nth-child(7) h3::before { animation-delay: 1.5s } .lp .feat:nth-child(8) h3::before { animation-delay: 1.75s }
.lp .feat:nth-child(9) h3::before { animation-delay: 2s } .lp .feat:nth-child(10) h3::before { animation-delay: 2.25s } .lp .feat:nth-child(11) h3::before { animation-delay: 2.5s } .lp .feat:nth-child(12) h3::before { animation-delay: 2.75s }
.lp .feat:nth-child(13) h3::before { animation-delay: 3s } .lp .feat:nth-child(14) h3::before { animation-delay: 3.25s }
.lp .feat:hover h3::before { animation: none; }
.lp .hero-stats b { display: inline-block; }
.lp .hero-stats > div:hover b { animation: lpTick .4s ease; }
@keyframes lpTick { 40% { transform: scale(1.12); } }

/* окно возможности */
.fm-bg { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4,8,10,.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.fm-bg.in { opacity: 1; } .fm-bg.out { opacity: 0; }
.fm { width: min(980px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 16px; padding: 20px 22px; display: grid; gap: 14px;
  border: 1px solid rgba(255,255,255,.12); background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 45%, rgba(255,255,255,.04)), rgba(16,24,29,.86);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(242,165,65,.18), inset 0 1px 0 rgba(255,255,255,.14);
  transform: translateY(14px) scale(.97); transition: transform .3s cubic-bezier(.2,.9,.25,1.1); }
.fm-bg.in .fm { transform: none; }
.fm-head { display: flex; align-items: baseline; gap: 14px; }
.fm-head h2 { font-size: clamp(22px, 2.6vw, 30px); flex: 1; color: var(--text); }
.fm-n { font: 600 13px var(--f-mono); color: var(--accent); }
.fm-x { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.fm-x:hover { border-color: var(--accent); color: var(--accent); }
.fm-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.fm-body.fm-r { animation: fmR .35s ease both; } .fm-body.fm-l { animation: fmL .35s ease both; }
@keyframes fmR { from { opacity: 0; transform: translateX(30px); } } @keyframes fmL { from { opacity: 0; transform: translateX(-30px); } }
.fm-media { border-radius: 12px; overflow: hidden; background: #070b0d; border: 1px solid rgba(255,255,255,.08); aspect-ratio: 16 / 9; display: grid; box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.fm-media video, .fm-media .fm-svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.fm-media .fm-3d { height: 100% !important; min-height: 0 !important; }
.fm-lead { margin: 0 0 10px; font-size: 16px; color: var(--text); }
.fm-text ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.fm-text li { position: relative; padding-left: 20px; color: var(--muted); font-size: 14.5px; opacity: 0; animation: fmIn .45s ease forwards; }
.fm-text li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
@keyframes fmIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.fm-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .fm-body { grid-template-columns: 1fr; } .fm-foot .btn:not(.primary) { flex: 1; } }
/* цвета анимаций */
.fm-svg { font-family: var(--f-body); }
.fm-svg .fm-axis path { fill: none; stroke: #4a5a61; stroke-width: 1.5; }
.fm-svg .fm-lbl { fill: #8b9ca2; font: 500 12px var(--f-mono); }
.fm-svg .fm-txt { fill: #dbe3e5; font-size: 13px; }
.fm-svg .fm-mono, .fm-svg .fm-mono text { font-family: var(--f-mono); font-size: 12px; white-space: pre; }
.fm-svg .fm-big { fill: #f2a541; font: 700 44px var(--f-label); }
.fm-svg .fm-amber { stroke: #f2a541; } .fm-svg .fm-amber-t { fill: #f2a541; } .fm-svg .fm-amber-f { fill: #f2a541; }
.fm-svg .fm-red { stroke: #e5534b; fill: none; stroke-width: 2; } .fm-svg .fm-red-t { fill: #e5534b; } .fm-svg .fm-red-f { fill: #c8473f; }
.fm-svg .fm-green { stroke: #79c77f; } .fm-svg .fm-green-t { fill: #79c77f; }
.fm-svg .fm-cyan { stroke: #4fc3d9; } .fm-svg .fm-cyan-f { fill: #4fc3d9; }
.fm-svg .fm-steel { fill: #5d6c73; } .fm-svg .fm-ink-f { fill: #dbe3e5; } .fm-svg .fm-muted { stroke: #4a5a61; }
.fm-svg .fm-box { fill: #0f171b; stroke: #37474f; stroke-width: 1.5; } .fm-svg .fm-ring { fill: none; stroke: #4a5a61; stroke-width: 3; }
.fm-svg .fm-res { fill: rgba(121,199,127,.35); } .fm-svg .fm-alarm { fill: #c8473f; }
.fm-svg .fm-bit { fill: #f2a541; filter: drop-shadow(0 0 6px #f2a541); }
.fm-svg .fm-stamp { fill: none; stroke: #e5534b; stroke-width: 4; }
.fm-svg .fm-draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: fmDraw 6s ease-in-out infinite; }
@keyframes fmDraw { 0% { stroke-dashoffset: 900; } 70%, 100% { stroke-dashoffset: 0; } }
[data-theme="light"] .fm { background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(255,255,255,.75)); border-color: rgba(255,255,255,.95); box-shadow: 0 30px 70px rgba(20,40,50,.25), inset 0 1px 0 #fff; }
[data-theme="light"] .fm-bg { background: rgba(200,212,218,.5); }
[data-theme="light"] .lp-word span { text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .lp-word span { animation: none; transform: none; opacity: 1; } .lp .feat h3::before, .lp-word::after { animation: none; } .fm-text li { animation: none; opacity: 1; } .fm-svg .fm-draw { animation: none; stroke-dashoffset: 0; } }

/* флажок с длинной подписью: флажок слева, текст переносится рядом, а не уезжает на новую строку */
label.chk { flex-wrap: nowrap; align-items: flex-start; gap: 10px; cursor: pointer; }
label.chk > input[type=checkbox] { flex: none; margin: 2px 0 0; width: 16px; height: 16px; }
label.chk > span { flex: 1; min-width: 0; }
