/*
  3D-лаборатория ОГЭ (js/lab3d/app.mjs): интерфейс поверх сцены.

  Сцена светлая — панели тоже светлые, из матового стекла, чтобы не
  спорить с цветом растворов. Акцент — фирменный оранжевый.
*/
.lab3d-host {
    position: relative;
    height: calc(100vh - var(--lab-top, 86px) - 14px);
    height: calc(100dvh - var(--lab-top, 86px) - 14px);
    min-height: 520px;
    margin: 0 14px 14px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.lab3d-host[hidden] { display: none; }
/* Телефон и планшет: снизу — меню сайта (widgets.js, .hp-bnav, 70 px), лаборатория над ним */
@media (max-width: 1080px) {
    html.hp-has-bnav .lab3d-host {
        height: calc(100vh - var(--lab-top, 86px) - 84px - env(safe-area-inset-bottom));
        height: calc(100dvh - var(--lab-top, 86px) - 84px - env(safe-area-inset-bottom));
        min-height: 420px;
        margin-bottom: 0;
    }
}

.l3 {
    --ink: #13233D;
    --ink-2: #3B4B63;
    --muted: #6A7A90;
    --glass: rgba(255, 255, 255, .8);
    --glass-2: rgba(255, 255, 255, .92);
    --line: rgba(19, 35, 61, .1);
    --accent: #F5A623;
    --accent-2: #E8850A;
    position: relative;
    background: #dfe3e8;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    user-select: none;
    touch-action: none;
}
.l3 *, .l3 *::before, .l3 *::after { box-sizing: border-box; }
.l3 button { font: inherit; color: inherit; }
.l3 svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.l3-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }

.l3-top, .l3-panel, .l3-log, .l3-actions, .l3-cab__tabs, .l3-cab__search input, .l3-pick, .l3-vlabel, .l3-obs, .l3-toast, .l3-tip {
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
}

/* ——— верхняя полоса ——— */
.l3-top {
    position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5;
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px 8px 16px; border-radius: 18px;
    background: var(--glass); box-shadow: 0 10px 30px -18px rgba(19, 35, 61, .5), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.l3-brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.l3-brand b { font-size: 15px; font-weight: 850; letter-spacing: -.02em; }
.l3-brand span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.l3-views { display: flex; gap: 4px; padding: 4px; margin: 0 auto; border-radius: 14px; background: rgba(19, 35, 61, .06); }
.l3-views button {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 11px;
    background: none; font-size: 13.5px; font-weight: 750; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.l3-views button:hover { color: var(--ink); }
.l3-views button.is-on { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -6px rgba(19, 35, 61, .45); }
.l3-views button.is-on svg { color: var(--accent-2); }
.l3-top__acts { display: flex; gap: 6px; }
.l3-ibtn {
    position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 750; cursor: pointer;
}
.l3-ibtn:hover { border-color: rgba(19, 35, 61, .25); }
/* Ссылка на курс — единственная оранжевая кнопка панели, чтобы её замечали */
.l3-ibtn--course {
    text-decoration: none; color: #16191F; border-color: transparent;
    background: linear-gradient(135deg, #F7B84B 0%, #E8850A 100%);
    box-shadow: 0 8px 18px -10px rgba(232, 133, 10, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.l3-ibtn--course:hover { border-color: transparent; filter: brightness(1.05); }
.l3-ibtn--course svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.l3-count {
    position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    display: grid; place-items: center; background: var(--accent); color: #1a1206; font-size: 11px; font-weight: 900; font-style: normal;
}

/* ——— шкаф: разделы и поиск ——— */
.l3-cab { position: absolute; top: 76px; left: 50%; z-index: 5; transform: translateX(-50%); width: min(980px, calc(100% - 24px)); display: grid; gap: 8px; }
.l3-cab[hidden] { display: none; }
.l3-cab__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 7px; border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.l3-cab__tabs button {
    display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 10px;
    background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.l3-cab__tabs button::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.l3-cab__tabs button i { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.l3-cab__tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -6px rgba(19, 35, 61, .4); }
.l3-cab__search { position: relative; justify-self: center; width: min(460px, 100%); }
.l3-cab__search input {
    width: 100%; height: 42px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 14px;
    background: var(--glass-2); font: 600 14px/1 'Inter', sans-serif; color: var(--ink); outline: none; box-shadow: 0 10px 24px -16px rgba(19, 35, 61, .5);
}
.l3-cab__search input:focus { border-color: var(--accent); }
.l3-cab__found { position: absolute; left: 0; right: 0; top: 48px; display: grid; gap: 2px; padding: 0; border-radius: 14px; background: #fff; box-shadow: 0 20px 40px -20px rgba(19, 35, 61, .6); overflow: hidden; }
.l3-cab__found:empty { display: none; }
.l3-cab__found button { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 13.5px; }
.l3-cab__found button:hover { background: #FFF6E6; }
.l3-cab__found b { font-weight: 850; }
.l3-cab__found small { color: var(--muted); font-weight: 600; }
.l3-cab__found p { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 13px; }

/* ——— шкаф с оборудованием: список слева, открытый шкаф — в центре ——— */
.l3-equip {
    position: absolute; top: 76px; left: 12px; z-index: 5; width: min(310px, calc(100% - 24px)); max-height: calc(100% - 190px);
    display: grid; grid-template-rows: auto 1fr; gap: 8px; padding: 10px; border-radius: 18px;
    background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 18px 40px -24px rgba(19, 35, 61, .55);
}
.l3-equip[hidden] { display: none; }
.l3-equip__head { display: grid; gap: 2px; padding: 4px 6px; }
.l3-equip__head b { font-size: 14px; font-weight: 850; color: var(--ink); }
.l3-equip__head span { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.l3-equip__list { display: grid; gap: 6px; overflow: auto; padding-right: 2px; }
.l3-equip__list button {
    display: grid; gap: 2px; padding: 9px 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .78);
    text-align: left; cursor: pointer; transition: transform .15s, background .15s;
}
.l3-equip__list button:hover:not(:disabled) { background: #fff; transform: translateX(2px); }
.l3-equip__list button:disabled { opacity: .55; cursor: default; }
.l3-equip__list button.is-tool { box-shadow: inset 3px 0 0 #F5A623; }
.l3-equip__list button.is-ware { box-shadow: inset 3px 0 0 #2F8FD0; }
.l3-equip__list b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.l3-equip__list span { font-size: 12px; font-weight: 550; color: var(--ink-2); line-height: 1.35; }
.l3-equip__list i { font-style: normal; font-size: 11.5px; font-weight: 800; color: #B86E00; }
@media (max-width: 760px) {
    .l3-equip { top: auto; bottom: 86px; left: 8px; right: 8px; width: auto; max-height: 42%; }
}

/* ——— подсказка у курсора ——— */
.l3-tip {
    position: absolute; left: 0; top: 0; z-index: 9; pointer-events: none; max-width: 300px;
    padding: 8px 12px; border-radius: 12px; background: rgba(19, 35, 61, .88); color: #fff;
    font-size: 12.5px; font-weight: 600; line-height: 1.35; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6);
}
.l3-tip b { color: #FFC76A; font-weight: 850; margin-right: 4px; }
.l3-tip small { display: block; margin-top: 2px; color: #B9C4D4; font-weight: 600; }

/* ——— подписи над сосудами ——— */
.l3-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.l3-vlabel {
    position: absolute; left: 0; top: 0; max-width: 200px; padding: 5px 9px; border-radius: 10px;
    background: rgba(255, 255, 255, .78); box-shadow: 0 6px 14px -10px rgba(19, 35, 61, .6);
    font-size: 11.5px; line-height: 1.25; text-align: center; white-space: normal; transition: background .2s, box-shadow .2s;
}
.l3-vlabel b { display: block; font-weight: 850; font-size: 12px; }
.l3-vlabel span { display: block; color: var(--ink-2); font-weight: 600; }
.l3-vlabel.is-num { min-width: 24px; padding: 3px 7px; border-radius: 999px; }
.l3-vlabel.is-sel { z-index: 2;  background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 10px 20px -10px rgba(232, 133, 10, .7); }
.l3.is-picking .l3-vlabel.is-target { box-shadow: 0 0 0 2px #2F8FD0, 0 10px 20px -10px rgba(47, 143, 208, .7); }

/* ——— карточка сосуда ——— */
.l3-panel {
    position: absolute; top: 76px; right: 12px; z-index: 4; width: 300px; max-height: calc(100% - 236px); overflow: auto;
    padding: 14px 16px; border-radius: 18px; background: var(--glass); box-shadow: 0 16px 36px -22px rgba(19, 35, 61, .6), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.l3.is-cab .l3-panel { display: none; }
.l3-panel__name { display: block; font-size: 16px; font-weight: 850; letter-spacing: -.01em; }
.l3-panel__sub { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }
.l3-panel__body:empty { display: none; }
.l3-panel__body { margin-top: 12px; display: grid; gap: 10px; }
.l3-ph__row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }
.l3-ph__row b { color: var(--ink); font-weight: 850; }
.l3-ph__bar { position: relative; height: 8px; margin-top: 6px; border-radius: 6px; background: linear-gradient(90deg, #E0453C, #F2A33A 25%, #E8D84A 42%, #3FB26B 50%, #2F8FD0 70%, #6B3FC0); }
.l3-ph__bar i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #13233D; box-shadow: 0 0 0 2px #fff; transition: left .6s cubic-bezier(.2, .8, .2, 1); }
.l3-ph__ends { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.l3-meta { display: flex; gap: 6px; }
.l3-meta span { padding: 4px 9px; border-radius: 8px; background: rgba(19, 35, 61, .06); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.l3-added { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.l3-added b { color: var(--ink); }
.l3-rx { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.l3-rx li { padding: 9px 11px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.l3-rx p { margin: 0; font-size: 12.5px; font-weight: 650; line-height: 1.4; }
.l3 code { display: block; margin-top: 4px; font: 600 12px/1.45 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; color: #0E6B55; white-space: normal; }
.l3 code.is-ionic { color: #6B3FC0; }

/* ——— журнал ——— */
.l3-log {
    position: absolute; top: 76px; right: 12px; bottom: 96px; z-index: 6; width: min(400px, calc(100% - 24px));
    display: flex; flex-direction: column; border-radius: 18px; background: var(--glass-2); box-shadow: 0 20px 44px -22px rgba(19, 35, 61, .7);
}
.l3-log[hidden] { display: none; }
.l3-log__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.l3-log__head b { font-size: 15px; font-weight: 850; }
.l3-log__head div { display: flex; gap: 4px; }
.l3-log__head button { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.l3-log__list { flex: 1; overflow: auto; margin: 0; padding: 10px 14px 14px; list-style: none; display: grid; align-content: start; gap: 10px; }
.l3-log__list li { padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.l3-log__list li > b { display: block; font-size: 13px; font-weight: 800; }
.l3-log__list p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.l3-log__list .is-empty { color: var(--muted); font-size: 13px; }

/* ——— действия ——— */
.l3-actions {
    position: absolute; left: 50%; bottom: 14px; z-index: 5; transform: translateX(-50%);
    display: flex; gap: 8px; max-width: calc(100% - 24px); padding: 8px; border-radius: 20px;
    background: var(--glass); box-shadow: 0 18px 40px -22px rgba(19, 35, 61, .7), inset 0 0 0 1px rgba(255, 255, 255, .6);
    overflow-x: auto; scrollbar-width: none;
}
.l3-actions::-webkit-scrollbar { display: none; }
.l3-actions__group { display: flex; gap: 4px; padding-right: 8px; border-right: 1px solid var(--line); }
.l3-actions__group:last-child { border-right: 0; padding-right: 0; }
.l3-actions button {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 76px; height: 58px; padding: 0 8px; border: 0; border-radius: 13px; background: transparent;
    font-size: 11.5px; font-weight: 750; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .18s, color .18s, transform .18s;
}
.l3-actions button:hover:not(:disabled) { background: #fff; color: var(--ink); transform: translateY(-1px); }
.l3-actions button.is-main { background: linear-gradient(135deg, #F7B84B, #E8850A); color: #1a1206; box-shadow: 0 10px 20px -10px rgba(232, 133, 10, .9); }
.l3-actions button.is-main:hover { background: linear-gradient(135deg, #F9C466, #EE8F12); color: #1a1206; }
.l3-actions button.is-danger:hover:not(:disabled) { color: #BE123C; }
.l3-actions button:disabled { opacity: .38; cursor: default; }
.l3-actions__hint { margin: 0; padding: 10px 14px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.l3.is-busy .l3-actions, .l3.is-busy .l3-views, .l3.is-busy .l3-cab__tabs { opacity: .55; pointer-events: none; }
.l3.is-cab .l3-actions { display: none; }

/* ——— зум: справа внизу, над панелью действий ——— */
.l3-zoom {
    position: absolute; right: 12px; bottom: 100px; z-index: 5;
    display: flex; gap: 4px; padding: 5px; border-radius: 16px;
    background: var(--glass); box-shadow: 0 14px 30px -20px rgba(19, 35, 61, .7), inset 0 0 0 1px rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.l3-zoom button {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 11px;
    background: rgba(255, 255, 255, .7); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.l3-zoom button:hover:not(:disabled) { background: #fff; color: var(--ink); }
.l3-zoom button:active:not(:disabled) { transform: scale(.94); }
.l3-zoom button:disabled { opacity: .38; cursor: default; }
.l3-zoom button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ——— выбор второго сосуда ——— */
.l3-pick {
    position: absolute; top: 76px; left: 50%; z-index: 6; transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px;
    background: rgba(47, 143, 208, .92); color: #fff; font-size: 13.5px; font-weight: 750; box-shadow: 0 14px 30px -16px rgba(47, 143, 208, .9);
}
.l3-pick[hidden] { display: none; }
.l3-pick button { height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 800; cursor: pointer; }

/* ——— наблюдение ——— */
.l3-obs {
    position: absolute; left: 50%; top: 84px; z-index: 7; transform: translate(-50%, -12px); max-width: min(620px, calc(100% - 360px));
    padding: 12px 18px; border-radius: 16px; background: rgba(19, 35, 61, .9); color: #fff; text-align: center;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.l3-obs.is-on { opacity: 1; transform: translate(-50%, 0); }
.l3-obs span { display: block; font-size: 15px; font-weight: 750; line-height: 1.4; }
.l3-obs span::before { content: 'Наблюдение'; display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; color: #FFC76A; }
.l3-obs .k-precipitate::before { content: 'Осадок'; }
.l3-obs .k-gas::before { content: 'Выделяется газ'; }
.l3-obs .k-color::before { content: 'Окраска'; }
.l3-obs .k-boom::before { content: 'Хлопок!'; }
.l3-obs code { margin-top: 6px; color: #8FE3C8; font-size: 12.5px; }
.l3-obs small { display: none; }
.l3.is-cab .l3-obs { top: 190px; }

.l3-toast {
    position: absolute; left: 50%; bottom: 96px; z-index: 8; transform: translate(-50%, 10px);
    padding: 10px 16px; border-radius: 12px; background: rgba(19, 35, 61, .9); color: #fff; font-size: 13.5px; font-weight: 700;
    opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.l3-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ——— как работать ——— */
.l3-help { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(12, 20, 34, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.l3-help[hidden] { display: none; }
.l3-help__card { position: relative; width: min(460px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 26px 26px 0; border-radius: 22px; background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
/* Крестик и «Начать опыт» всегда на виду, текст прокручивается между ними */
.l3-help__x { position: sticky; top: 0; float: right; z-index: 2; width: 40px; height: 40px; margin: -12px -12px 0 8px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #F1F4F8; color: #3B4B63; cursor: pointer; }
.l3-help__x:hover { background: #E3E8F0; }
.l3-help__x svg { width: 20px; height: 20px; }
html.hp-has-bnav .l3-help { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (max-width: 720px) {
    .l3-help { padding: 12px; }
    .l3-help__card { padding: 20px 18px 0; }
    .l3-help__card h2 { font-size: 20px; }
    .l3-help__card ol { font-size: 14px; gap: 6px; }
}
.l3-help__card h2 { margin: 0 0 12px; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.l3-help__card ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.l3-help__card ol b { color: var(--ink); }
.l3-help__card p { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.l3-help__go { position: sticky; bottom: 14px; width: 100%; height: 48px; margin-top: 18px; margin-bottom: 18px; box-sizing: border-box; border: 0; border-radius: 14px; background: linear-gradient(135deg, #F7B84B, #E8850A); font-size: 15px !important; font-weight: 850 !important; cursor: pointer; box-shadow: 0 14px 26px -14px rgba(232, 133, 10, .95), 0 0 0 14px #fff; }

/* ——— загрузка ——— */
.l3-loading { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 14px; background: #e7eaee; color: var(--ink-2); font-size: 14px; font-weight: 700; transition: opacity .6s; }
.l3-loading i { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(19, 35, 61, .12); border-top-color: var(--accent); animation: l3spin .9s linear infinite; }
.l3.is-ready .l3-loading { opacity: 0; pointer-events: none; }
@keyframes l3spin { to { transform: rotate(360deg); } }

/* Переключатель в 2D-лаборатории */
.lab-3d-switch {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(135deg, #F7B84B, #E8850A); color: #1a1206; font: 800 13px/1 'Inter', sans-serif; box-shadow: 0 10px 20px -12px rgba(232, 133, 10, .9);
}

.lab-3d-help {
    margin: 0 0 18px; padding: 16px 18px; border-radius: 16px; background: rgba(247, 184, 75, .1); box-shadow: inset 0 0 0 1px rgba(247, 184, 75, .35);
    color: #E5E7EB; font: 400 14px/1.55 'Inter', sans-serif;
}
.lab-3d-help[hidden] { display: none; }
.lab-3d-help > b { display: block; margin-bottom: 6px; color: #F7B84B; font-size: 15px; }
.lab-3d-help p, .lab-3d-help li { color: #E5E7EB; }
.lab-3d-help p { margin: 6px 0; }
.lab-3d-help ul { margin: 6px 0; padding-left: 20px; }
.lab-3d-help li { margin: 4px 0; }
.lab-3d-switch__s { display: none; }
/* Шапка 2D-лаборатории тесная: на узких экранах кнопка — просто «3D». */
@media (max-width: 1500px) {
    .lab-3d-switch { padding: 0 12px; }
    .lab-3d-switch__l { display: none; }
    .lab-3d-switch__s { display: inline; }
}
@media (max-width: 900px) {
    .lab-3d-switch { height: 40px; }
    .lab-3d-help { margin: 0 0 12px; padding: 14px; font-size: 13.5px; }
}

/* ——— телефон ——— */
@media (max-width: 760px) {
    .lab3d-host { margin: 0 8px 8px; border-radius: 18px; min-height: 460px; }
    .l3-top { top: 8px; left: 8px; right: 8px; gap: 6px; padding: 6px; }
    .l3-brand { display: none; }
    .l3-views { margin: 0; }
    .l3-views button { height: 34px; padding: 0 10px; font-size: 12.5px; }
    .l3-views button span { display: none; }
    .l3-views button.is-on span { display: inline; }
    .l3-top__acts { margin-left: auto; }
    .l3-ibtn { height: 34px; padding: 0 9px; }
    .l3-ibtn span { display: none; }
    .l3-panel { top: auto; bottom: 88px; left: 8px; right: 8px; width: auto; max-height: 30%; padding: 10px 12px; }
    .l3-panel__body { display: none; }
    .l3-actions { bottom: 8px; left: 8px; right: 8px; transform: none; max-width: none; padding: 6px; }
    .l3-actions button { min-width: 66px; height: 54px; font-size: 10.5px; }
    .l3-cab { top: 56px; }
    .l3-cab__tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
    /* Наблюдение — узкая полоса под плашкой задания, слева от кнопок зума; уравнение — в журнале */
    .l3-obs { top: 100px; left: 8px; right: 58px; max-width: none; transform: translate(0, -8px); padding: 7px 11px; border-radius: 12px; text-align: left; }
    .l3-obs.is-on { transform: none; }
    .l3-obs span { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .l3-obs span::before { display: inline; margin: 0 6px 0 0; font-size: 9.5px; }
    .l3-obs code { display: none; }
    .l3-obs small { display: block; margin-top: 2px; font-size: 11px; font-weight: 650; color: rgba(255, 255, 255, .65); }
    .l3.is-cab .l3-obs { top: 100px; }
    /* Сосуд в панели снизу: название и не больше двух строк описания */
    .l3-panel__sub { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .l3-log { top: 56px; bottom: 8px; }
    .l3-vlabel { padding: 3px 7px; font-size: 10px; }
    .l3-vlabel span { display: none; }
    .l3-vlabel.is-sel span { display: block; }
    .l3-tip { display: none; }
    /* Телефон: столбик у правого края под верхней полосой; в шкафу там вкладки */
    .l3-zoom { top: 56px; right: 8px; bottom: auto; flex-direction: column; padding: 4px; }
    .l3-zoom button { width: 38px; height: 38px; }
    .l3-zoom [data-zoom="in"] { order: -1; }
    .l3.is-cab .l3-zoom { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .l3-obs, .l3-toast, .l3-ph__bar i { transition: none; }
}

/* ——— вкладки двух шкафов ——— */
.l3-cab__group { display: inline-flex; align-items: center; gap: 4px; padding-right: 8px; margin-right: 4px; border-right: 1px solid var(--line); }
.l3-cab__group:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.l3-cab__group > span { padding: 0 6px 0 4px; font-size: 10.5px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* ——— журнал-книга ——— */
.l3-book {
    position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; align-content: center; gap: 12px; padding: 20px;
    background: rgba(20, 14, 8, .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    opacity: 0; transition: opacity .25s ease;
}
.l3-book[hidden] { display: none; }
.l3-book.is-open { opacity: 1; }
.l3-book__spread {
    position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(1040px, 100%); height: min(640px, calc(100% - 70px));
    border-radius: 10px 10px 14px 14px; background: #2e4a7a; padding: 10px; perspective: 1600px;
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .2);
    transform: translateY(14px) scale(.97); transition: transform .35s cubic-bezier(.2, .9, .25, 1.1);
}
.l3-book.is-open .l3-book__spread { transform: none; }
.l3-book.is-single .l3-book__spread { grid-template-columns: 1fr; width: min(520px, 100%); }
.l3-book.is-single .is-right { display: none; }
.l3-book__page {
    position: relative; overflow: auto; padding: 30px 30px 40px 56px;
    background-color: #fbf8ef;
    background-image: linear-gradient(90deg, transparent 42px, #e8a0a0 42px, #e8a0a0 44px, transparent 44px), repeating-linear-gradient(180deg, transparent 0 31px, #cddbee 31px 32px);
    background-attachment: local;
    color: #26314a; font-family: Georgia, 'Times New Roman', serif; user-select: text;
}
.l3-book__page.is-left { border-radius: 6px 0 0 6px; box-shadow: inset -18px 0 24px -18px rgba(0, 0, 0, .35); }
.l3-book__page.is-right { border-radius: 0 6px 6px 0; box-shadow: inset 18px 0 24px -18px rgba(0, 0, 0, .35); }
.l3-book__spread.turn-next .is-right { animation: l3turnNext .45s ease; transform-origin: left center; }
.l3-book__spread.turn-prev .is-left { animation: l3turnPrev .45s ease; transform-origin: right center; }
@keyframes l3turnNext { from { transform: rotateY(-70deg); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes l3turnPrev { from { transform: rotateY(70deg); opacity: .3; } to { transform: none; opacity: 1; } }
.l3-book__page h2 { margin: 6px 0 4px; font: italic 700 30px/1.2 'Segoe Print', 'Comic Sans MS', cursive; color: #2e4a7a; }
.l3-book__who { margin: 0 0 20px; font-size: 14px; color: #5a6480; }
.l3-book__stats { list-style: none; display: flex; gap: 12px; margin: 0 0 22px; padding: 0; }
.l3-book__stats li { padding: 10px 14px; border-radius: 10px; background: rgba(46, 74, 122, .08); font-size: 13px; color: #5a6480; }
.l3-book__stats b { display: block; font: 800 24px/1.1 'Inter', sans-serif; color: #26314a; }
.l3-book__notes span { display: block; margin-bottom: 6px; font: italic 700 18px 'Segoe Print', 'Comic Sans MS', cursive; color: #2e4a7a; }
.l3-book__notes textarea {
    width: 100%; resize: vertical; padding: 0; border: 0; background: transparent; outline: none;
    font: italic 17px/32px 'Segoe Print', 'Comic Sans MS', cursive; color: #1f3c88;
}
.l3-book__list { margin: 0; padding: 0 0 0 4px; list-style-position: outside; display: grid; gap: 14px; }
.l3-book__list li { padding-left: 4px; font-size: 14.5px; line-height: 1.55; }
.l3-book__list li::marker { font: 800 14px 'Inter', sans-serif; color: #2e4a7a; }
.l3-book__row { display: flex; justify-content: space-between; gap: 10px; }
.l3-book__row b { font: 700 15px/1.45 'Inter', sans-serif; color: #1c2640; }
.l3-book__row time { font: 600 12px 'Inter', sans-serif; color: #8a93a8; white-space: nowrap; }
.l3-book__list p { margin: 3px 0 0; color: #34405c; }
.l3-book__list p.k-precipitate::before { content: '◆ '; color: #6b7c99; }
.l3-book__list p.k-gas::before { content: '↑ '; color: #2F8FD0; font-weight: 800; }
.l3-book__list p.k-color::before { content: '● '; color: #D6338B; }
.l3-book__list code { color: #0E6B55; font-size: 12.5px; }
.l3-book__list code.is-ionic { color: #6B3FC0; }
.l3-book__num { position: absolute; bottom: 12px; right: 18px; font: 600 12px 'Inter', sans-serif; color: #9aa3b5; }
.l3-book__blank { margin-top: 40px; font-style: italic; color: #8a93a8; }
.l3-book__bar { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, .92); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); }
.l3-book__bar button { height: 36px; min-width: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 750; cursor: pointer; }
.l3-book__bar button:disabled { opacity: .35; cursor: default; }
.l3-book__bar button.is-close { background: #13233D; color: #fff; border-color: #13233D; }
.l3-book__bar i { width: 1px; height: 22px; margin: 0 4px; background: var(--line); }
.l3-book__pages { min-width: 110px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 760px) {
    .l3-book { padding: 10px; }
    .l3-book__spread { height: calc(100% - 64px); padding: 6px; }
    .l3-book__page { padding: 20px 16px 32px 48px; }
    .l3-book__bar { flex-wrap: wrap; justify-content: center; }
    .l3-cab__group > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .l3-book__spread { transition: none; } .l3-book__spread.turn-next .is-right, .l3-book__spread.turn-prev .is-left { animation: none; } }

/* Заголовки сайта несут оранжевую черту и выключку — в книге и подсказке они лишние */
.l3 h2 { padding: 0; border: 0; text-align: left; }
.l3 h2::before, .l3 h2::after { content: none !important; display: none !important; }
.l3 code { background: none; padding: 0; }

/* Журнал размером с тетрадь: разворот в пропорции двух страниц А5,
   высота — почти вся сцена (flex: у сетки проценты высоты не считались) */
.l3-book { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.l3-book__spread { flex: none; height: calc(100% - 86px); max-height: 820px; width: auto; aspect-ratio: 1.42; max-width: 100%; }
.l3-book.is-single .l3-book__spread { aspect-ratio: .72; width: auto; }
.l3-book__page { padding: 38px 38px 46px 64px; background-image: linear-gradient(90deg, transparent 48px, #e8a0a0 48px, #e8a0a0 50px, transparent 50px), repeating-linear-gradient(180deg, transparent 0 35px, #cddbee 35px 36px); }
.l3-book__list li { font-size: 16px; line-height: 1.6; }
.l3-book__row b { font-size: 16.5px; }
.l3-book__list code { font-size: 13.5px; }
.l3-book__page h2 { font-size: 36px; }
.l3-book__notes textarea { font-size: 19px; line-height: 36px; }
@media (max-width: 760px) { .l3-book__spread { height: calc(100% - 110px); } .l3-book__page { padding: 22px 16px 34px 50px; } .l3-book__list li { font-size: 15px; } }

/* ——— настройки графики ——— */
.l3-ibtn.is-on { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(245, 166, 35, .25); }
.l3-gfx {
    position: absolute; top: 76px; right: 14px; z-index: 12; width: min(320px, calc(100% - 28px));
    max-height: calc(100% - 100px); overflow-y: auto;
    padding: 14px 16px 12px; border-radius: 18px; background: var(--glass-2); color: var(--ink);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 24px 50px -24px rgba(12, 20, 34, .55), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.l3-gfx[hidden] { display: none; }
.l3-gfx__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.l3-gfx__head b { font-size: 16px; font-weight: 900; }
.l3-gfx__head button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.l3-gfx__head button:hover { background: rgba(19, 35, 61, .07); color: var(--ink); }
.l3-gfx__row { display: grid; gap: 6px; padding: 9px 0; border-top: 1px solid var(--line); }
.l3-gfx__lbl { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 750; color: var(--ink-2); }
.l3-gfx__lbl output { font-variant-numeric: tabular-nums; color: var(--ink); }
.l3-gfx__row small { font-size: 11.5px; color: var(--muted); }
.l3-gfx__seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 11px; background: rgba(19, 35, 61, .06); }
.l3-gfx__seg--3 { grid-template-columns: repeat(3, 1fr); }
.l3-gfx__seg button { height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 750; color: var(--ink-2); cursor: pointer; }
.l3-gfx__seg button.is-on { background: #fff; color: var(--ink); box-shadow: 0 3px 10px -5px rgba(19, 35, 61, .5); }
.l3-gfx input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent-2); cursor: pointer; }
.l3-gfx__row--sw { grid-template-columns: 1fr auto; align-items: center; cursor: pointer; }
.l3-gfx__row--sw input { position: absolute; opacity: 0; pointer-events: none; }
.l3-gfx__row--sw i { position: relative; width: 40px; height: 22px; border-radius: 11px; background: rgba(19, 35, 61, .18); transition: background .2s; }
.l3-gfx__row--sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.l3-gfx__row--sw input:checked + i { background: var(--accent-2); }
.l3-gfx__row--sw input:checked + i::after { transform: translateX(18px); }
.l3-gfx__row--sw input:focus-visible + i { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.l3-gfx__foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.l3-gfx__fps { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.l3-gfx__foot button { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12.5px; font-weight: 750; cursor: pointer; }
@media (max-width: 760px) {
    .l3-gfx { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; max-height: 70%; }
}

/* ——— журнал заданий: 300 опытов ——— */
/* Счётчик журнала заданий «12/300» — заметный, растёт с каждым выполненным опытом */
.l3-count.is-prog { position: static; min-width: 0; height: 22px; margin-left: 2px; padding: 0 8px; border-radius: 8px; background: var(--accent); color: #1a1206; font-size: 12px; }
.l3-count.is-bump { animation: l3Bump .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes l3Bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); background: #10B981; color: #fff; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .l3-count.is-bump { animation: none; } }
.l3-ibtn--tasks { border-color: rgba(232, 133, 10, .45); }
.l3-tasks {
    position: absolute; top: 76px; left: 12px; bottom: 96px; z-index: 13; width: min(400px, calc(100% - 24px));
    display: flex; flex-direction: column; border-radius: 20px; background: var(--glass-2); color: var(--ink);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 30px 60px -28px rgba(12, 20, 34, .6), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.l3-tasks[hidden] { display: none; }
.l3-tasks__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.l3-tasks__head b { display: block; font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.l3-tasks__prog { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.l3-tasks__x { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.l3-tasks__x:hover { background: rgba(19, 35, 61, .07); color: var(--ink); }
.l3-tasks__bar { height: 5px; margin: 0 16px; border-radius: 3px; background: rgba(19, 35, 61, .08); overflow: hidden; }
.l3-tasks__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F7B84B, #E8850A); transition: width .4s; }
.l3-tasks__search { display: block; padding: 10px 16px 6px; }
.l3-tasks__search input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-size: 14px; }
.l3-tasks__cats { display: flex; gap: 6px; overflow-x: auto; padding: 6px 16px 8px; scrollbar-width: thin; }
.l3-tasks__cats[hidden] { display: none; }
.l3-tasks__cats button { flex: none; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12.5px; font-weight: 750; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.l3-tasks__cats button small { font-weight: 700; color: var(--muted); }
.l3-tasks__cats button.is-on { border-color: var(--accent-2); background: #FFF6E6; color: var(--ink); }
.l3-tasks__body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 16px; }
.l3-tasks__filter { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; font-size: 12.5px; color: var(--muted); }
.l3-tasks__filter button { height: 26px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 12.5px; font-weight: 750; color: var(--ink-2); cursor: pointer; }
.l3-tasks__filter button.is-on { background: rgba(19, 35, 61, .08); color: var(--ink); }
.l3-tasks__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.l3-tasks__list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; text-align: left; font-size: 14px; font-weight: 650; color: var(--ink); cursor: pointer; }
.l3-tasks__list button:hover { background: rgba(19, 35, 61, .05); }
.l3-tasks__list button i { flex: none; min-width: 30px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: rgba(19, 35, 61, .07); font-style: normal; font-size: 11.5px; font-weight: 850; color: var(--ink-2); }
.l3-tasks__list button.is-done i { background: #10B981; color: #fff; }
.l3-tasks__list button.is-active { background: #FFF6E6; }
.l3-tasks__list button em { margin-left: auto; flex: none; font-style: normal; font-size: 11px; font-weight: 750; color: var(--muted); }
.l3-tasks__list button em.is-part { color: #B86A00; }
.l3-part { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.l3-part.is-active { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(247, 184, 75, .35); }
.l3-part.is-done { border-color: rgba(16, 185, 129, .45); }
.l3-part__head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.3; }
.l3-part__head i { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(19, 35, 61, .08); font-style: normal; font-size: 11.5px; font-weight: 850; color: var(--ink-2); }
.l3-part.is-done .l3-part__head i { background: #10B981; color: #fff; }
.l3-part__head b { font-weight: 850; }
.l3-part__head em { margin-left: auto; flex: none; font-style: normal; font-size: 11px; font-weight: 750; color: var(--muted); }
.l3-part .l3-card__acts { margin-top: 10px; }
.l3-part .l3-card__acts button { height: 34px; font-size: 13px; }
.l3-track__group { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.l3-tasks__empty { padding: 20px 0; color: var(--muted); font-size: 14px; text-align: center; }
.l3-tasks__back { margin: 2px 0 8px; height: 28px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 750; color: var(--ink-2); cursor: pointer; }
.l3-tasks__back:hover { background: rgba(19, 35, 61, .06); }
.l3-card__n { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.l3-card__n b { color: #0E9F6E; }
.l3-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; }
.l3-card h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.l3-card__why { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); text-align: left; }
.l3-tasks p, .l3-track p { text-align: left; }
.l3-card__steps { margin: 0; padding-left: 22px; display: grid; gap: 5px; font-size: 14px; line-height: 1.4; }
.l3-card__steps b { font-weight: 800; }
.l3-card__warn { margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: #FFF1F1; color: #9B1C1C; font-size: 12.5px; line-height: 1.4; }
.l3-card__see { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(19, 35, 61, .045); }
.l3-card__see summary { cursor: pointer; font-size: 13.5px; font-weight: 800; }
.l3-card__see ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.l3-card__eq { display: grid; gap: 4px; margin-top: 8px; }
.l3-card__eq code { display: block; padding: 6px 9px; border-radius: 8px; background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); overflow-x: auto; white-space: nowrap; }
.l3-card__eq code.is-ionic { color: #3B4B63; font-weight: 650; }
.l3-card__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.l3-card__acts button { height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; font-weight: 800; cursor: pointer; }
.l3-card__acts button.is-main { border: 0; background: linear-gradient(135deg, #F7B84B, #E8850A); color: #1a1206; box-shadow: 0 12px 24px -14px rgba(232, 133, 10, .95); }

/* Карточка текущего опыта — слева, пока ставите опыт */
.l3-track {
    position: absolute; top: 76px; left: 12px; z-index: 6; width: 260px; max-height: calc(100% - 236px); overflow-y: auto;
    padding: 10px 12px; border-radius: 16px; background: var(--glass-2); color: var(--ink);
    box-shadow: 0 18px 40px -24px rgba(19, 35, 61, .7), inset 0 0 0 1px rgba(255, 255, 255, .7);
    transition: opacity .25s;
}
/* Камера близко, а карточку развернули — пусть не застилает опыт */
.l3.is-close .l3-track:not(.is-mini):not(:hover):not(:focus-within) { opacity: .72; }
.l3-track__fold {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
    font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: pointer;
}
.l3-track__fold svg { width: 14px; height: 14px; margin-left: auto; transform: rotate(180deg); transition: transform .2s; }
.l3-track__short { display: none; }
/* Свёрнутая плашка: «Задание 2/5 · название ▾» в одну строку */
.l3-track.is-mini { width: auto; max-width: min(250px, calc(100% - 24px)); padding: 6px 6px 6px 12px; overflow: hidden; border-radius: 13px; }
.l3-track.is-mini > :not(.l3-track__head) { display: none; }
.l3-track.is-mini .l3-track__full { display: none; }
.l3-track.is-mini .l3-track__short { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.l3-track.is-mini .l3-track__short em { overflow: hidden; text-overflow: ellipsis; font-style: normal; text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 750; color: var(--ink); }
.l3-track.is-mini .l3-track__fold svg { transform: none; }
.l3-track[hidden] { display: none; }
.l3-track.is-done { box-shadow: 0 18px 40px -24px rgba(19, 35, 61, .7), inset 0 0 0 2px #10B981; }
.l3-track__head { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2); }
.l3-track__head [data-tr="hide"] { flex: none; width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; }
.l3-track__title { display: block; margin: 2px 0 6px; font-size: 13.5px; font-weight: 850; line-height: 1.25; }
.l3-track ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: st; }
.l3-track li { position: relative; padding-left: 26px; font-size: 12.5px; line-height: 1.35; color: var(--muted); counter-increment: st; }
.l3-track li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: rgba(19, 35, 61, .08); font-size: 11px; font-weight: 850; color: var(--ink-2); }
.l3-track li.is-ok { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(19, 35, 61, .3); }
.l3-track li.is-ok::before { content: "✓"; background: #10B981; color: #fff; }
.l3-track li.is-next { color: var(--ink); }
.l3-track li.is-next::before { background: var(--accent); color: #1a1206; }
.l3-track li button { padding: 3px 8px; margin: -3px 0 0 -8px; border: 1px dashed rgba(232, 133, 10, .7); border-radius: 8px; background: #FFF6E6; font: inherit; font-weight: 750; text-align: left; color: var(--ink); cursor: pointer; }
.l3-track li button:hover { background: #FFEBC7; }
.l3-track__hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.l3-track__ok { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #E9FBF3; color: #0B5F45; font-size: 12.5px; line-height: 1.4; font-weight: 650; }
.l3-track__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.l3-track__acts button { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12.5px; font-weight: 750; cursor: pointer; }
.l3.is-cab .l3-track, .l3.is-equip .l3-track { display: none; }
@media (max-width: 760px) {
    .l3-tasks { top: 64px; left: 8px; right: 8px; bottom: 8px; width: auto; }
    /* Телефон: сверху слева под полосой вида — справа там кнопки зума */
    .l3-track { top: 56px; left: 8px; width: min(300px, calc(100% - 66px)); max-height: 44%; }
    .l3-track.is-mini { max-width: calc(100% - 66px); }
    /* телефон: подпись спрятана — счётчик значком над колбой, как у журнала */
    .l3-ibtn--tasks .l3-count.is-prog { position: absolute; top: -8px; right: -10px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
}
.l3-count[hidden] { display: none; }
@media (max-width: 900px) {
    .lab-bar__text { min-width: 0; overflow: hidden; }
}

/* Пресет «Низкое»: без размытия под панелями (backdrop-filter поверх 3D дорог) */
.l3--lite *, .l3--lite *::before, .l3--lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.l3--lite { --glass: #F4F6F9; --glass-2: #FAFBFC; }

