/* LabHub: строгий светлый стиль. Один акцентный цвет, тонкие линии, без градиентов и теней. */
:root {
  --bg: #ffffff; --soft: #f6f6f4; --text: #161616; --muted: #6b6b6b; --line: #dfdfdb; --line-strong: #161616;
  --accent: #0b5cad; --ok: #1a7f4b; --warn: #9a6200; --bad: #c0271b;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
#root { display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 8px; font-weight: 650; }
h3 { font-size: 12px; margin: 22px 0 8px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.bad { color: var(--bad); font-size: 14px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.center { text-align: center; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* Шапка */
.top { flex: none; display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 52px; border-bottom: 1px solid var(--line-strong); background: var(--bg); }
.brand { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.nav { display: flex; gap: 18px; flex: 1; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.nav a { display: flex; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom-color: var(--text); }
.account { display: flex; gap: 8px; align-items: center; }
.who { color: var(--text); font-size: 14px; text-decoration: none; border-bottom: 1px dotted var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; min-height: 0; }
.main.ws { display: flex; flex-direction: column; overflow: hidden; }

/* Кнопки и поля */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; border: 1px solid var(--text); border-radius: 4px; background: var(--text); color: #fff; font: inherit; font-size: 14px; font-weight: 500;
  padding: 7px 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #333; border-color: #333; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { font-size: 13px; padding: 4px 10px; }
.btn.wide { width: 100%; padding: 10px; }
.btn.ghost { background: var(--bg); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--text); background: var(--bg); }
.btn.danger-text { color: var(--bad); }
.btn.danger-text:hover { border-color: var(--bad); }
.btn .icon { width: 14px; height: 14px; }
input[type=text], input[type=number], input[type=password], input[type=email], select, textarea { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { border-color: var(--accent); outline: 2px solid rgba(11,92,173,.2); outline-offset: 0; }
input[readonly] { background: var(--soft); color: var(--muted); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Страницы */
.page { max-width: 880px; margin: 0 auto; padding: 36px 20px 64px; }
.page.wide { max-width: 1180px; }
.page.nopad { padding-bottom: 0; }
.page.nopad + div .page { padding-top: 12px; }
.intro { max-width: 640px; margin-bottom: 28px; }
.intro h1 { font-size: 34px; }
.intro p { font-size: 17px; color: #333; }
.note { margin-top: 22px; }
.head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.head h1, .head p { margin: 0; }
.tiles { border-top: 1px solid var(--line-strong); }
.tile { display: flex; align-items: center; gap: 16px; padding: 16px 6px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tile:hover { background: var(--soft); }
.tile > div { flex: 1; min-width: 0; }
.tile h2 { margin: 0 0 2px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile .arrow { color: var(--muted); font-size: 18px; }
.tile:hover .arrow { color: var(--text); }
.tile .progress { margin-top: 6px; max-width: 360px; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bar { flex: 1; height: 4px; background: var(--line); }
.fill { height: 100%; background: var(--text); }
.panel { border: 1px solid var(--line); border-radius: 4px; padding: 18px; margin: 0 0 16px; background: var(--bg); }
.panel > h2:first-child { margin-top: 0; }
.notice:not(:empty) { border-left: 3px solid var(--accent); background: var(--soft); padding: 8px 12px; margin: 0 0 16px; font-size: 14px; }
.row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input { min-width: 200px; }
.prose { max-width: 700px; }
.prose h2 { margin-top: 26px; }
.prose li { margin-bottom: 4px; }

/* Вход и регистрация */
.auth-wrap { display: flex; justify-content: center; padding: 56px 20px; }
.auth { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth h1 { margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.field span { font-weight: 500; }
.field small { color: var(--muted); font-size: 12.5px; }
.field input { padding: 9px 10px; font-size: 15px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--text); }
.code-input { letter-spacing: .4em; font-family: var(--mono); font-size: 22px !important; text-align: center; }

/* Проекты */
.plist { border-top: 1px solid var(--line-strong); }
.prow { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.prow:hover { background: var(--soft); }
.prow b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.prow .date { width: 84px; text-align: right; }
.tag { font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.tag.open { color: var(--ok); border-color: var(--ok); }

/* Панель рабочей области */
.wsbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); background: var(--soft); flex-wrap: wrap; min-height: 44px; }
.wsbar .crumb { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.wsbar .crumb .icon { width: 18px; height: 18px; }
.wsbar .title { width: 240px; font-weight: 550; padding: 4px 8px; }
.wsbar .ptitle { font-size: 14px; }
.wsbar .status { font-size: 13px; }
.wshost { flex: 1; min-height: 0; overflow: auto; }

/* Списки заданий */
.steps { padding: 0; margin: 6px 0; list-style: none; counter-reset: st; font-size: 14px; }
.steps li { counter-increment: st; position: relative; padding: 7px 8px 7px 34px; color: var(--muted); border-left: 2px solid transparent; }
.steps li::before { content: counter(st) "."; position: absolute; left: 10px; top: 7px; font-variant-numeric: tabular-nums; }
.steps li.current { color: var(--text); font-weight: 550; border-left-color: var(--text); background: var(--soft); }
.steps li.done { color: var(--ok); }
.steps li.done::before { content: "✓"; }
.answer { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: normal; flex-wrap: wrap; }
.answer input { width: 100px; }

/* Сообщения */
.diag { border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 0 4px 4px 0; padding: 10px 12px; margin: 10px 0; font-size: 14px; background: var(--bg); }
.diag b { display: block; margin-bottom: 2px; }
.diag p { margin: 4px 0 8px; }
.diag p:last-child { margin-bottom: 0; }
.diag.error { border-left-color: var(--bad); } .diag.error b { color: var(--bad); }
.diag.warning { border-left-color: var(--warn); } .diag.warning b { color: var(--warn); }
.diag.info { border-left-color: var(--accent); }
.diag.success { border-left-color: var(--ok); } .diag.success b { color: var(--ok); }

/* Редактор схем */
.lab-layout { display: flex; height: 100%; min-height: 480px; }
.palette { width: 124px; flex: none; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); overflow-y: auto; background: var(--bg); }
.tool { border: 1px solid transparent; background: none; border-radius: 4px; padding: 6px 8px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); text-align: left; }
.tool:hover { background: var(--soft); }
.tool.comp:first-of-type, .tool:nth-child(4) { margin-top: 8px; }
.tool.active { background: var(--text); color: #fff; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewbar { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vbtn { border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.vbtn:hover { border-color: var(--text); }
.vbtn.active { background: var(--text); border-color: var(--text); color: #fff; }
.viewbar .sep { width: 8px; } .viewbar .hint { font-size: 12px; margin-left: 8px; }
.board-wrap { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.board-wrap.three { overflow: hidden; position: relative; }
.board3d { display: block; width: 100%; height: 100%; touch-action: none; }
.side { width: 340px; flex: none; padding: 16px; border-left: 1px solid var(--line); overflow-y: auto; background: var(--bg); }
.theory { margin-top: 14px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.theory summary { cursor: pointer; font-weight: 600; }
.theory p { margin: 8px 0 0; color: #333; }
.props { border: 1px solid var(--text); border-radius: 4px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.props input { width: 100px; }

.board { display: block; touch-action: none; user-select: none; }
.board.tool-wire, .board.tool-place { cursor: crosshair; }
.board.tool-erase { cursor: not-allowed; }
.grid-dot { fill: #c9c9c4; }
.wire { stroke: #161616; stroke-width: 3; stroke-linecap: round; }
.board.tool-select .wire, .board.tool-erase .wire { stroke-width: 5; }
.wire.err { stroke: #c0271b; }
.wire.sel { stroke: #0b5cad; }
.flow { stroke: #f2b100; stroke-width: 2; stroke-dasharray: 4 8; pointer-events: none; animation: flow 1s linear infinite; }
.flow.f2 { animation-duration: .5s; }
.flow.f3 { animation-duration: .2s; stroke: #ff7a1a; }
@keyframes flow { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }
.ink { stroke: #161616; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ink.body { fill: #ffffff; }
.ink.lit { fill: #ffe14d; }
.ink.burn { stroke: #c0271b; stroke-width: 3; }
.glow { fill: #ffcc33; pointer-events: none; }
.dot { fill: #161616; }
.hit { fill: transparent; stroke: none; }
.comp { cursor: grab; }
.comp.sel .hit { stroke: #0b5cad; stroke-width: 1.5; stroke-dasharray: 4 3; }
.comp.err .ink, .comp.hot .ink { stroke: #c0271b; }
.sym { font-size: 16px; font-weight: bold; text-anchor: middle; fill: #c0271b; }
.label { font-size: 13px; font-weight: 600; fill: #0b3d73; pointer-events: none; paint-order: stroke; stroke: #ffffff; stroke-width: 3px; }
.label.mid { text-anchor: middle; }
.meter { font-size: 15px; font-weight: bold; text-anchor: middle; fill: #161616; pointer-events: none; }
.preview { fill: none; stroke: #0b5cad; stroke-width: 3; stroke-dasharray: 6 4; pointer-events: none; }

/* Задания слева, работа справа */
.work { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.tasks { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.task { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 9px 6px; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); display: flex; gap: 10px; align-items: baseline; }
.task:hover { background: var(--soft); }
.task.active { background: var(--soft); font-weight: 600; }
.task .n { flex: none; width: 18px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.task.done .n { color: var(--ok); }
.task b { font-weight: inherit; }
.editor { display: block; width: 100%; min-height: 150px; font-family: var(--mono) !important; font-size: 14px !important; line-height: 1.55; padding: 12px !important; border-radius: 4px; border: 1px solid var(--line-strong) !important;
  background: #fbfbfa !important; resize: vertical; tab-size: 4; white-space: pre; overflow: auto; margin-top: 6px; }
.editor.tall { min-height: 240px; }
.console { font-family: var(--mono); font-size: 13px; background: #161616; color: #eaeaea; border-radius: 4px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; min-height: 52px; max-height: 300px; overflow: auto; margin: 0; }
.console .err { color: #ff9d94; }
.stdin { display: block; width: 100%; min-height: 60px; font-family: var(--mono) !important; resize: vertical; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.chip.ok { border-color: var(--ok); color: var(--ok); } .chip.no { border-color: var(--bad); color: var(--bad); }
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 14px; }
.example pre { margin: 4px 0 0; font-family: var(--mono); font-size: 13px; background: var(--soft); border-radius: 4px; padding: 8px 10px; white-space: pre-wrap; }
.example span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* SQL */
.schema { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.tbl { border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; min-width: 200px; }
.tbl header { padding: 6px 10px; font-weight: 600; font-family: var(--mono); font-size: 13px; color: #fff; background: var(--text); display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
.tbl header span { font-family: system-ui, sans-serif; font-weight: 400; opacity: .7; }
.tbl div { display: flex; justify-content: space-between; gap: 14px; padding: 4px 10px; font-family: var(--mono); font-size: 12.5px; border-top: 1px solid var(--line); }
.tbl div em { font-style: normal; color: var(--muted); }
.tbl div small { color: var(--accent); }
.result { overflow: auto; max-height: 380px; border: 1px solid var(--line); border-radius: 4px; margin-top: 10px; }
.result table { border-collapse: collapse; width: 100%; font-size: 13px; }
.result th { position: sticky; top: 0; background: var(--soft); text-align: left; padding: 6px 12px; font-family: var(--mono); border-bottom: 1px solid var(--line-strong); }
.result td { padding: 5px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.result tr:last-child td { border-bottom: 0; }
.result td.null { color: #999; font-style: italic; }

/* Химия */
.chem { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.bottle { border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 10px 6px 8px; cursor: pointer; text-align: center; font: inherit; color: var(--text); }
.bottle:hover { border-color: var(--text); }
.bottle.picked { border-color: var(--text); background: var(--soft); box-shadow: inset 0 0 0 1px var(--text); }
.bottle svg { width: 40px; height: 52px; display: block; margin: 0 auto 4px; }
.bottle b { display: block; font-size: 15px; font-weight: 600; }
.bottle span { display: block; font-size: 11px; color: var(--muted); line-height: 1.25; }
.bench { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.tube { width: 140px; height: 234px; flex: none; }
.bubble { fill: rgba(255,255,255,.9); stroke: rgba(100,100,100,.6); animation: rise 1.6s linear infinite; }
.bubble.b2 { animation-delay: .5s; animation-duration: 1.9s; } .bubble.b3 { animation-delay: 1s; animation-duration: 1.4s; } .bubble.b4 { animation-delay: .25s; animation-duration: 2.2s; }
@keyframes rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-120px); opacity: 0; } }
.liquid { transition: fill .8s; }
.sediment { animation: settle 1s ease-out; transform-origin: 50% 100%; transform-box: fill-box; }
@keyframes settle { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.mixinfo { flex: 1; min-width: 240px; }
.slots { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.slot { min-width: 96px; padding: 6px 12px; border-radius: 4px; border: 1px dashed #aaa; text-align: center; color: var(--muted); font-size: 15px; }
.slot.full { border-style: solid; border-color: var(--text); color: var(--text); font-weight: 600; }
.eq { font-family: var(--mono); font-size: 13.5px; background: var(--soft); border-radius: 4px; padding: 8px 10px; margin-top: 8px; }
.journal { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13px; }
.journal li { padding: 8px 0; border-top: 1px solid var(--line); }
.journal li:first-child { border-top: 0; padding-top: 0; }
.journal b { font-family: var(--mono); }

/* Управление */
.scroll { overflow-x: auto; }
table.users { width: 100%; border-collapse: collapse; font-size: 14px; }
table.users th, table.users td { border-bottom: 1px solid var(--line); padding: 10px 10px 10px 0; text-align: left; vertical-align: top; }
table.users th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom-color: var(--line-strong); }
table.users tr.off td { color: var(--muted); }
table.users .row { margin-top: 0; gap: 4px; }
.planform { display: flex; flex-direction: column; gap: 6px; }
.planform .row { flex-wrap: nowrap; }
.num { width: 64px; padding: 4px 6px !important; }
.settings { display: flex; flex-direction: column; gap: 12px; max-width: 520px; align-items: flex-start; margin-bottom: 22px; }
.settings .field { width: 100%; }
.settings h3 { margin: 6px 0 0; }
.linkbox { border: 1px solid var(--warn); border-radius: 4px; padding: 12px; margin: 12px 0 0; font-size: 14px; }
.linkbox input { width: 100%; font-family: var(--mono); font-size: 13px; margin: 8px 0; }
dialog.code { width: min(720px, 94vw); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0; }
dialog.code::backdrop { background: rgba(0,0,0,.35); }
dialog.code h2 { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
dialog.code .body { padding: 14px 18px 18px; }
dialog.code textarea { width: 100%; height: 240px; font-family: var(--mono); font-size: 13px; resize: vertical; }
dialog.code pre { background: var(--soft); border-radius: 4px; padding: 10px; font-size: 12px; white-space: pre-wrap; max-height: 240px; overflow: auto; }
dialog.code details { margin-top: 12px; font-size: 14px; }
dialog.code summary { cursor: pointer; color: var(--muted); }

@media (max-width: 900px) {
  .top { padding: 0 12px; gap: 14px; }
  .main.ws { overflow: visible; }
  .lab-layout { flex-direction: column; height: auto; }
  .palette { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .board-wrap { max-height: 70vh; } .board-wrap.three { height: 60vh; flex: none; } .viewbar .hint { display: none; }
  .side { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .work, .chem { grid-template-columns: 1fr; }
  .intro h1 { font-size: 28px; }
  .wsbar .title { width: 150px; }
  .prow .date { display: none; }
}
@media print { .top, .noprint, .wsbar { display: none; } }

/* ---------- Оформление: цвета разделов, главная, лабораторный стол ---------- */
:root { --paper: #f7f6f1; --grid: rgba(22,22,22,.07); }
.s-physics { --c: #d98a00; --tint: #fff6e0; } .s-chemistry { --c: #1a7f4b; --tint: #e9f6ee; }
.s-sql { --c: #0b5cad; --tint: #e8f1fb; } .s-python { --c: #7a3fb5; --tint: #f3ebfb; }

.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand i { width: 18px; height: 18px; border: 2px solid var(--text); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(0deg, #d98a00 0 45%, transparent 45%); }

.page.home { max-width: 1040px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: center; margin-bottom: 34px; }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.hero h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.025em; margin-bottom: 14px; font-weight: 700; }
.hero p { font-size: 17px; color: #3a3a3a; max-width: 520px; }
.hero .row { margin-top: 20px; }
.hero .btn { padding: 10px 18px; font-size: 15px; }
.heroart .art { height: 260px; border: 1px solid var(--line-strong); border-radius: 6px; }
.art { height: 150px; display: flex; align-items: center; justify-content: center; background-color: var(--tint, var(--paper));
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 18px 18px; }
.art svg { width: 82%; height: 82%; }
.a-wire { fill: none; stroke: #161616; stroke-width: 2.500; stroke-linecap: round; stroke-linejoin: round; }
.a-thin { fill: none; stroke: #161616; stroke-width: 1.200; }
.a-flow { fill: none; stroke: var(--c); stroke-width: 2.500; stroke-dasharray: 3 11; animation: flow 1.2s linear infinite; }
.a-box { fill: #fff; stroke: #161616; stroke-width: 2.500; }
.a-gap { fill: var(--tint, #fff); stroke: none; }
.a-glow { fill: var(--c); opacity: .35; animation: pulse 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.a-fill { fill: #161616; } .a-hi { fill: var(--c); opacity: .3; }
.a-liq { fill: var(--c); opacity: .55; } .a-liq.l1 { fill: #3d8fd6; } .a-liq.l3 { fill: #d9a520; } .a-sed { fill: #fff; stroke: #161616; stroke-width: 1; }
.a-bub { fill: #fff; stroke: #161616; stroke-width: 1; animation: arise 1.8s linear infinite; } .a-bub.b { animation-delay: .6s; } .a-bub.c { animation-delay: 1.1s; }
.a-code { stroke: #161616; stroke-width: 5; stroke-linecap: round; opacity: .28; } .a-code.k { stroke: var(--c); opacity: 1; }
.a-cur { fill: #161616; animation: blink 1s steps(2) infinite; }
@keyframes pulse { 50% { opacity: .15; transform: scale(1.25); } }
@keyframes arise { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-34px); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { display: block; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; color: var(--text); text-decoration: none; background: var(--bg); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--c); }
.card .art { border-bottom: 1px solid var(--line-strong); }
.cbody { padding: 14px 16px 16px; }
.cbody h2 { display: flex; justify-content: space-between; align-items: baseline; font-size: 19px; margin: 0 0 4px; }
.cbody h2 .arrow { color: var(--c); font-weight: 400; transition: transform .15s; }
.card:hover .arrow { transform: translateX(4px); }
.cbody p { margin: 0; color: var(--muted); font-size: 14px; }

.tile[class*="s-"] .icon, .prow[class*="s-"] .icon { color: var(--c); }
.tile[class*="s-"] .fill { background: var(--c); }
.wsbar[class*="s-"] { border-left: 4px solid var(--c); background: var(--tint); }
.wsbar[class*="s-"] .crumb .icon { color: var(--c); }
.auth-wrap { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 18px 18px; min-height: 100%; }
.auth { background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 28px; box-shadow: 6px 6px 0 var(--text); align-self: flex-start; }

/* Химия */
.bench { background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 18px 18px;
  border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; align-items: flex-start; }
.scene { width: 320px; max-width: 100%; height: auto; flex: none; }
.scene .cap { font-size: 13px; text-anchor: middle; font-weight: 600; fill: #161616; }
.scene .cap.off { fill: #9a9a95; font-weight: 400; }
.arrowline { fill: none; stroke: #9a9a95; stroke-width: 1.500; stroke-dasharray: 3 4; }
.pour { animation: pour .7s ease-out; transform-origin: 50% 100%; transform-box: fill-box; }
@keyframes pour { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mixinfo { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 14px; align-self: stretch; }
.shelfrow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: end; border-bottom: 3px solid #161616; padding-top: 10px; }
.kind { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.kind i { width: 10px; height: 10px; flex: none; }
.shelf { display: flex; flex-wrap: wrap; gap: 2px; }
.bottle { border: 0; border-radius: 4px 4px 0 0; width: 104px; padding: 8px 4px 6px; background: none; }
.bottle svg { transition: transform .15s; }
.bottle:hover { background: var(--soft); }
.bottle:hover svg { transform: translateY(-4px) rotate(-4deg); }
.bottle.picked { background: #161616; color: #fff; box-shadow: none; }
.bottle.picked span { color: #cfcfcf; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 32px; } .heroart { display: none; }
  .cards { grid-template-columns: 1fr; } .shelfrow { grid-template-columns: 1fr; } .kind { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Новые детали и график */
.palette { gap: 2px; }
.slider { width: 100%; margin-top: 8px; accent-color: var(--text); }
.chartbox { position: relative; margin: 6px 0 12px; }
.charttitle { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.chart { display: block; width: 100%; height: auto; touch-action: none; }
.chart .axis { stroke: #8a8a85; stroke-width: 1; }
.chart .gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .tick { font-size: 10px; fill: var(--muted); } .chart .tick.end { text-anchor: end; }
.chart .endlabel { font-size: 10px; fill: var(--text); }
.chart .cross { stroke: #8a8a85; stroke-width: 1; }
.chart .pt { stroke: #fff; stroke-width: 2; }
.tip { min-height: 18px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tip b { color: var(--text); }

/* Химия: нагрев, pH, 3D-стол */
.stagecol { display: flex; flex-direction: column; gap: 8px; flex: none; width: 320px; max-width: 100%; }
.row.tight { margin-top: 0; gap: 4px; }
.vbtn.hot { background: #c0271b; border-color: #c0271b; }
.bench3d { width: 320px; max-width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #efece4; }
.chem3d { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.flame { animation: flicker .18s ease-in-out infinite alternate; transform-origin: 50% 100%; transform-box: fill-box; }
.flame.f2 { animation-duration: .13s; }
@keyframes flicker { from { transform: scaleY(1); } to { transform: scaleY(1.14) scaleX(.94); } }
.ph { display: block; width: 100%; max-width: 280px; height: auto; margin: 6px 0; }
.phl { font-size: 9px; fill: var(--muted); } .phl.mid { text-anchor: middle; } .phl.end { text-anchor: end; }
.calc { font-size: 13px; color: #3a3a3a; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px !important; }

/* Классы */
.tag.st-submitted { color: var(--accent); border-color: var(--accent); }
.tag.st-accepted { color: var(--ok); border-color: var(--ok); }
.tag.st-returned { color: var(--warn); border-color: var(--warn); }
.comment { font-style: italic; }
.linkfield { flex: 1; min-width: 260px; font-family: var(--mono); font-size: 13px; }
.matrix td a { text-decoration: none; }
.matrix th { white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.settings.wide { max-width: 640px; }
.settings.wide textarea, .settings.wide select { width: 100%; }
.tasktext { flex: none; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 14px; white-space: pre-wrap; max-height: 120px; overflow: auto; }
.prow .grow { flex: 1; color: var(--text); text-decoration: none; }

.lang { padding: 4px 6px !important; font-size: 13px !important; border-color: var(--line) !important; background: var(--bg); }
