/* Paliwo życia — dodatki do wspólnego systemu wyglądu (../wspolne/system.css).
   Te same znaczenia kolorów co w Odpornych: zielony = dobrze, czerwony = źle, bursztynowy = tu patrz. */
:root {
  --sun: #e9b320; --co2: #7c827a; --water: #3f95d4; --sugar: #e07b2c; --oxy: #7d5bbf; --chloro: #5d9e3a; --energy: #e89a0c; --mito: #f29a52;
}

/* --- plansza: etykieta, widok stacji, przełącznik 2D/3D -------------------------------- */
.stage { overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #fffdf6, #f2ead6); }
.stage > .stage-label { position: absolute; left: 12px; top: 12px; z-index: 4; max-width: calc(100% - 24px); }
.view { position: absolute; inset: 0; }
.view canvas.fill { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.viewtoggle { position: absolute; left: 14px; bottom: 12px; z-index: 5; display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card); box-shadow: var(--lift-sm); }
.viewtoggle button { padding: 6px 14px; border: 0; background: none; font: 700 14px var(--type); }
.viewtoggle button + button { border-left: 1.5px solid var(--ink); }
.viewtoggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.viewtoggle button:hover:not([aria-pressed="true"]) { background: var(--focus-tint); }
.stage-hint { position: absolute; right: 14px; bottom: 10px; z-index: 3; margin: 0; font: 13.5px var(--body); color: var(--ink-soft); pointer-events: none; }
.stage[data-kind="chloro"] .viewtoggle { left: auto; right: 14px; top: 12px; bottom: auto; } /* na dole są przyciski chloroplastów */
.stage[data-kind="chloro"] canvas.fill { cursor: grab; touch-action: pan-y; } /* komórkę 3D obraca się w bok, w pionie przewija stronę */
.stage[data-kind="chloro"] canvas.fill.grabbing { cursor: grabbing; }

/* --- nagłówek: przełącznik części (jak w Odpornych) --------------------------------------- */
.brand-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 6px; }
.brand-row .home { margin-bottom: 0; }
.parts { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card); box-shadow: 2px 2px 0 rgba(38, 48, 42, .14); }
.parts button { padding: 3px 12px 4px; border: 0; background: none; font: 700 12px var(--type); letter-spacing: .05em; }
.parts button + button { border-left: 1.5px solid var(--ink); }
.parts button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.parts button:hover:not([aria-pressed="true"]) { background: var(--focus-tint); }

/* --- panel: wspólne klocki ------------------------------------------------------------------- */
.note { margin: 4px 0 10px; font: 15px/1.35 var(--body); color: var(--ink-soft); }
.sub-h { margin-top: 16px; }
.log { list-style: none; margin: 6px 0 0; padding: 0; }
.log li { position: relative; padding: 6px 0 6px 18px; border-bottom: 1px dashed var(--line); font: 14.5px/1.3 var(--body); animation: rise .3s ease-out both; }
.log li::before { content: "✎"; position: absolute; left: 0; color: var(--focus); }
.log li:first-child { color: var(--ink); } .log li:not(:first-child) { color: var(--ink-soft); }
.log li.muted { color: var(--ink-soft); animation: none; }
.log li.muted::before { content: ""; }
.recap { margin-top: 14px; padding: 12px 16px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; }
.recap p { margin: 6px 0 0; font-size: 15px; line-height: 1.4; }
.fact { margin: 10px 0 0; font: 15px/1.4 var(--body); }
.fact b { color: var(--focus); }
.verdict + .recap, .verdict + .row { margin-top: 14px; }
.box ul { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.4; }
.box li + li { margin-top: 3px; }
.honest { margin-top: 10px; font-size: 13.5px; line-height: 1.35; color: var(--ink-soft); }
.chip { display: inline-block; padding: 1px 9px 2px; margin: 1px 0; border-radius: 999px; background: #fff; background: color-mix(in srgb, var(--c) 18%, #fff); border: 1.5px solid var(--c); color: var(--ink); font: 700 13px/1.35 var(--body); white-space: nowrap; }
.eqline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font: 700 15px var(--type); }
.eqline .arrow { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.eqline .arrow small { font: 700 11px var(--body); color: var(--sun); margin-bottom: -2px; }
.stepno { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 12px var(--type); }
.q { margin: 0 0 8px; font: 700 15.5px/1.3 var(--type); }

/* laboratorium: cechy do przyporządkowania (jak w Odpornych) */
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feat {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 9px 10px 9px 14px;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; font: 600 15px/1.25 var(--body);
}
.feat button { padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; font: 700 13px var(--type); }
.feat button:hover { background: var(--focus-tint); }
.feat.got { grid-template-columns: 1fr auto; border-style: dashed; }
.feat.got b { padding: 3px 10px; border-radius: 999px; color: #fff; font: 700 12px var(--type); white-space: nowrap; }
.feat.got-0 { background: #eef4d9; } .feat.got-0 b { background: var(--moss); }
.feat.got-1 { background: #f7ece0; } .feat.got-1 b { background: var(--sugar); }
.feat.shake, .opt.shake, .ord.shake, .slot.shake { animation: shake .35s; border-color: var(--bad); }
/* wąski telefon (375–460 px): cecha nad dwoma przyciskami odpowiedzi — w jednym rzędzie prawy przycisk wychodził poza kartę (przegląd iPhone, 27.10) */
@media (max-width: 460px) {
  .feat:not(.got) { grid-template-columns: 1fr 1fr; }
  .feat:not(.got) > span { grid-column: 1 / -1; }
  .feat button { min-height: 40px; }
}
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* --- laboratorium na planszy: rysunek 2D albo obracany model 3D --------------------------- */
.labview { position: absolute; inset: 0; display: grid; padding: 66px 22px 50px; }
.labview > * { grid-area: 1 / 1; min-height: 0; }
.lab2d { display: grid; place-items: center; }
.lab2d .pic { width: 100%; height: 100%; }
.lab-v { display: none; }
.lab-lbl { font-family: var(--type); font-weight: 700; }
.lab-note { font-family: var(--body); }
.labview canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; } /* w bok obraca, w pionie przewija stronę */
.labview canvas.grabbing { cursor: grabbing; }

/* --- schemat do ułożenia: karty na dole planszy, miejsca na rysunku ----------------------- */
.sc { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 62px 12px 0; }
.sc-area { position: relative; flex: 1; min-height: 0; }
.scene { position: absolute; }
.scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .ar { opacity: .2; transition: opacity .3s; }
.scene .ar.on { opacity: 1; }
.scene .ar.on .flow { stroke-dasharray: 7 9; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.spot {
  position: absolute; z-index: 2; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 0; display: grid; place-items: center;
  border: 2.5px dashed var(--focus); border-radius: 50%; background: rgba(255, 250, 240, .9); font: 700 20px var(--type); color: var(--focus);
  box-shadow: 0 0 0 0 rgba(201, 119, 43, .45); animation: ping 1.8s ease-in-out infinite;
}
.spot:hover { background: var(--focus-tint); border-style: solid; }
.sc.picking .spot { border-color: var(--ink); color: var(--ink); }
@keyframes ping { 50% { box-shadow: 0 0 0 7px rgba(201, 119, 43, 0); } }
.pill {
  position: absolute; z-index: 2; transform: translate(-50%, -50%); padding: 3px 10px 4px; white-space: nowrap; pointer-events: none;
  background: #fffaf0; background: color-mix(in srgb, var(--c) 22%, #fffaf0); border: 2px solid var(--c); border-radius: 999px; font: 700 13px var(--body);
  box-shadow: 2px 2px 0 rgba(38, 48, 42, .16); animation: snap .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes snap { from { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }
.tray { position: relative; z-index: 3; display: flex; gap: 8px; padding: 10px 8px 12px; overflow-x: auto; justify-content: center; flex-wrap: wrap; }
.sub {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; min-height: 44px;
  background: var(--card); border: 2px solid var(--c, var(--ink)); border-radius: 999px; box-shadow: var(--lift-sm);
  font: 700 14px var(--body); white-space: nowrap; transition: transform .12s, background .12s;
}
.sub .ico { width: 32px; height: 32px; flex: none; }
.sub:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 14%, #fff); }
.sub[aria-pressed="true"] { background: var(--focus-tint); background: color-mix(in srgb, var(--c) 28%, #fff); transform: translateY(-4px) rotate(-1.5deg); box-shadow: 0 0 0 4px rgba(201, 119, 43, .3), var(--lift-sm); }
.sub:disabled { opacity: .3; cursor: default; box-shadow: none; }
.eqbar {
  position: absolute; left: 50%; top: 4px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  width: max-content; max-width: calc(100% - 8px); flex-wrap: wrap; justify-content: center; /* max-content: przy left: 50% pasek dostawał tylko pół planszy i zawijał się w 3 rzędy na telefonie */
  background: var(--card); border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--lift); font: 700 20px var(--type); animation: rise .3s ease-out both;
}
.slot { min-width: 74px; min-height: 40px; padding: 4px 10px; border: 2px dashed var(--ink-soft); border-radius: 12px; background: #fff; font: 700 13.5px var(--body); color: var(--ink-soft); }
.slot.on { border-color: var(--focus); border-style: solid; background: var(--focus-tint); color: var(--ink); }
.slot.filled { border: 2px solid var(--c); border-style: solid; background: #fff; background: color-mix(in srgb, var(--c) 20%, #fff); color: var(--ink); }
.eqbar .arrow { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.eqbar .arrow .slot { min-width: 64px; min-height: 32px; font-size: 12.5px; }
.eqbar .arrow i { font-style: normal; line-height: .8; font-size: 26px; }
.sc.eqmode .scene { opacity: .55; }

/* --- doświadczenia: kroki, wybory, kolejność ----------------------------------------------- */
.exp-q { margin: 0 0 10px; padding: 10px 12px; border-left: 4px solid var(--focus); background: var(--card); border-radius: 0 10px 10px 0; font-size: 14.5px; line-height: 1.35; }
.exp-q b { font-family: var(--type); }
/* pytanie badawcze i hipoteza pod krokiem: odstęp od przycisków albo wierszy nad nimi (Piotr, 27.10 — ramka do nich przylegała) */
.exp-q.plan { margin-top: 18px; }
/* instrukcja doświadczenia (moczarka, krok „Ustaw zestawy”): nagłówek jak „Pytanie badawcze”, kroki w numerowanej liście */
.exp-q.instr ol { margin: 6px 0 0; padding-left: 22px; }
.exp-q.instr li { margin: 3px 0; }
.exp-q.instr li::marker { font-weight: 700; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; font: 14.5px/1.35 var(--body); color: var(--ink-soft); }
.steps li i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1.5px dashed var(--ink-soft); font: 700 12px var(--type); font-style: normal; }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now i { border: 2px solid var(--focus); background: var(--focus-tint); color: var(--ink); }
.steps li.done i { border: 2px solid var(--ink); background: var(--ok); color: #fff; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acts .btn { margin: 0; }
.btn-alt { padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); font: 700 14px var(--type); box-shadow: var(--lift-sm); }
.btn-alt:hover:not(:disabled) { background: var(--focus-tint); }
.btn-alt:disabled { opacity: .35; cursor: default; }
.btn-alt.on { background: var(--ink); color: var(--paper); }
.assign { display: grid; gap: 8px; margin-top: 10px; }
.assign-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; padding: 8px 10px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; }
.assign-row > b { display: grid; place-items: center; height: 34px; border-radius: 8px; background: #fff; border: 1.5px solid var(--ink); font: 700 15px var(--type); }
.assign-row .acts { margin: 0; gap: 6px; }
.assign-row .btn-alt { padding: 6px 10px; font-size: 12.5px; }
.assign-row.got { border-style: dashed; background: var(--ok-tint); }
.assign-row.shake { animation: shake .35s; border-color: var(--bad); }
.opts { display: grid; gap: 8px; }
.opt { display: block; width: 100%; padding: 10px 14px; text-align: left; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; font: 500 14.5px/1.35 var(--body); box-shadow: var(--lift-sm); }
.opt:hover:not(:disabled) { background: var(--focus-tint); }
.opt.ok { background: var(--ok-tint); border: 2px solid var(--ok); }
.opt.no { background: var(--bad-tint); border-color: var(--bad); }
.opt:disabled { cursor: default; }
.opt .why { display: block; margin-top: 4px; font-size: 13.5px; color: var(--bad); }
.ords { display: grid; gap: 7px; }
.ord { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; text-align: left; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; font: 600 14.5px var(--body); box-shadow: var(--lift-sm); }
.ord:hover:not(:disabled) { background: var(--focus-tint); }
.ord b { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px dashed var(--ink-soft); font: 700 12px var(--type); }
.ord.set { border-style: dashed; background: var(--ok-tint); cursor: default; }
.ord.set b { border: 0; background: var(--ok); color: #fff; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.counts div { padding: 8px; text-align: center; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; }
.counts b { display: block; font: 700 15px var(--type); }
.counts span { display: block; font: 700 22px var(--type); color: var(--oxy); }
.counts small { font-size: 12px; color: var(--ink-soft); }
.safety { margin-top: 10px; padding: 8px 12px; border: 1.5px dashed var(--bad); border-radius: 10px; font-size: 13.5px; line-height: 1.35; color: var(--bad); }

/* --- szklarnia ------------------------------------------------------------------------------- */
.ptabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.ptab { padding: 6px 4px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card); font: 700 12.5px/1.2 var(--type); }
.ptab small { display: block; font: 600 11px var(--body); color: var(--ink-soft); }
.ptab.on { background: var(--focus-tint); border: 2px solid var(--focus); }
.ptab.ok { background: var(--ok-tint); border-color: var(--ok); }
.ptab.ok small { color: var(--ok); }
.pcard { padding: 12px 14px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: var(--lift-sm); }
.pcard h2 { margin: 0; font: 700 21px/1.15 var(--type); }
.pcard h2 small { font: 600 14px var(--body); color: var(--ink-soft); }
.pcard > p { margin: 6px 0 0; font-size: 15px; line-height: 1.4; }
.lupa { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.lupa .pic { width: 112px; height: 84px; }
.lupa p { margin: 0; font-size: 13.5px; line-height: 1.35; color: var(--ink-soft); }
.meter-big { margin-top: 12px; }
.meter-big > span { display: flex; justify-content: space-between; font: 700 11.5px var(--type); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.meter-big > span b { font-size: 15px; color: var(--ink); letter-spacing: 0; }
.mbar { position: relative; height: 18px; margin-top: 4px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.mbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bad); transition: width .15s; }
.mbar i.good { background: var(--ok); }
.mbar em { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--ink); }
.mbar .zone { position: absolute; top: 0; bottom: 0; background: rgba(76, 107, 60, .16); }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--lift-sm); text-align: center; }
.tool .pic { width: 46px; height: 38px; }
.tool b { font: 700 12.5px/1.1 var(--type); }
.tool small { font: 11.5px/1.15 var(--body); color: var(--ink-soft); }
.tool:hover:not(:disabled) { background: var(--focus-tint); }
.tool.no { background: var(--bad-tint); border-color: var(--bad); }
.tool.no b { text-decoration: line-through; text-decoration-color: var(--bad); }
.tool:disabled { cursor: default; }
.slider { margin-top: 12px; padding: 10px 12px; background: var(--card); border: 2px solid var(--focus); border-radius: 12px; }
.slider label { display: flex; justify-content: space-between; font: 700 13px var(--type); }
.slider label b { font-size: 17px; color: var(--focus); }
.slider small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }

/* suwaki: duży uchwyt; wciśnięty — mniejszy i ciemniejszy, puszczony — odbija (app.js) */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 4px 0 0; background: none; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--focus-tint), var(--focus)); }
input[type="range"]::-moz-range-track { height: 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--focus-tint), var(--focus)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10.5px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); box-shadow: 2px 2px 0 rgba(38, 48, 42, .2); transition: transform .08s; }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); box-shadow: 2px 2px 0 rgba(38, 48, 42, .2); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(.86); background: var(--focus-tint); box-shadow: none; }
input[type="range"]:active::-moz-range-thumb { transform: scale(.86); background: var(--focus-tint); box-shadow: none; }
input[type="range"].is-released::-webkit-slider-thumb { animation: released .28s ease-out; }
input[type="range"].is-released { animation: none; }
input[type="range"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* --- nakładki na planszy: tacka z przyciskami, wskaźniki --------------------------------------- */
.ctrl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 8px 8px 10px; }
.ctrl .btn-alt { min-height: 44px; }
.ctrl .tempo { min-width: 76px; }
.ctrl .tempo[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ctrl .snack { border-color: var(--sugar); }
.ctrl .snack:hover:not(:disabled) { background: #fbe6d4; }
.arr { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; min-height: 48px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--lift-sm); font: 700 13.5px/1.1 var(--type); text-align: left; }
.arr .pic { width: 40px; height: 40px; flex: none; }
.arr small { display: block; font: 11.5px/1.15 var(--body); color: var(--ink-soft); }
.arr[aria-pressed="true"] { background: var(--chloro); color: #fff; border-color: var(--ink); }
.arr[aria-pressed="true"] small { color: rgba(255, 255, 255, .85); }
.arr:hover:not([aria-pressed="true"]) { background: var(--focus-tint); }
/* ikony ułożenia (js/art.js, Figma DS „Ikony”): kreska tuszem #26302a; na zaznaczonym przycisku (zielone tło, biały napis)
   biały rysunek i prawie przezroczyste tło komórki — wariant „Inversed On” (wygląd Naukowca dokłada swoje w naukowiec.css) */
.ai .ai-k { stroke: var(--ai-kol, #26302a); }
.ai .ai-p, .ai .ai-w { fill: var(--ai-kol, #26302a); }
.ai .ai-tlo { fill-opacity: var(--ai-tlo, .8); }
.arr[aria-pressed="true"] .ai { --ai-kol: #fff; --ai-tlo: .1; }
/* „Pełny bak”: zegary rysuje płótno; ich wartości dostaje czytnik ekranu jako ukryty tekst */
.bk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.daybar { position: absolute; left: 50%; top: 12px; z-index: 4; transform: translateX(-50%); width: min(420px, calc(100% - 250px)); pointer-events: none; }
.daybar .track { position: relative; display: flex; height: 26px; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--card); }
.daybar .seg { display: grid; place-items: center; overflow: hidden; white-space: nowrap; border-right: 1px solid rgba(38, 48, 42, .25); font: 700 10.5px var(--body); color: var(--ink); }
.daybar .seg:last-child { border-right: 0; }
.daybar .now { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--bad); border-radius: 2px; }
.daybar p { margin: 4px 0 0; text-align: center; font: 700 13px var(--type); }
.emeter { position: absolute; right: 14px; top: 64px; bottom: 76px; z-index: 4; width: 46px; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.emeter .vbar { position: relative; flex: 1; width: 22px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.emeter .vbar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--energy); transition: height .2s; }
.emeter .vbar .zone { position: absolute; left: 0; right: 0; background: rgba(76, 107, 60, .25); border-top: 1.5px dashed var(--ok); border-bottom: 1.5px dashed var(--ok); }
.emeter b { font: 700 10px var(--type); text-transform: uppercase; letter-spacing: .06em; text-align: center; color: var(--ink-soft); }
.emeter .state { font: 700 11px/1.1 var(--body); text-align: center; text-transform: none; letter-spacing: 0; }

/* --- ściąga (nakładka) ------------------------------------------------------------------------- */
.atlas { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: rgba(38, 48, 42, .45); }
.atlas-card { width: min(1000px, 100%); max-height: 100%; overflow: auto; padding: 22px 24px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: var(--lift); }
.atlas-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.atlas-col { padding: 14px 16px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; }
.atlas-col h3 { font-size: 17px; }
.atlas-col ul { list-style: none; margin: 10px 0 0; padding: 0; }
.atlas-col li { position: relative; padding: 6px 0 6px 26px; border-bottom: 1px dashed var(--line); font-size: 14.5px; line-height: 1.38; }
.atlas-col li::before { content: "○"; position: absolute; left: 4px; top: 6px; color: var(--ink-soft); font-weight: 700; }
.atlas-col li.got::before { content: "✓"; color: var(--ok); }
.atlas-col .exp { margin: 10px 0 0; font-size: 13.5px; line-height: 1.38; color: var(--ink-soft); }
.atlas-facts { margin-top: 14px; padding: 10px 16px; border: 1.5px dashed var(--ink-soft); border-radius: 12px; font-size: 14.5px; line-height: 1.4; }
.atlas-facts p { margin: 4px 0; }
/* przyciski ściągi zawsze pod ręką (Piotr, 27.10.2026): pasek przyklejony do dołu karty, treść przewija się pod nim */
.atlas-card { padding-bottom: 0; }
.atlas-card > .row:last-child { position: sticky; bottom: 0; z-index: 1; margin: 14px -24px 0; padding: 12px 24px 18px; background: var(--paper); border-top: 1.5px dashed var(--line); }
@media print {
  body { display: block; background: #fff; }
  .top, .desk { display: none; }
  .atlas { position: static; background: none; padding: 0; }
  .atlas .row { display: none; }
}

/* --- telefon i wąski tablet (na końcu pliku, żeby wygrywało z resztą) ------------------------------ */
@media (max-width: 900px) {
  .stage { height: max(360px, calc(62vw + 140px)); }
  .stage[data-kind="lab"] { height: min(150vw, 680px); }
  .stage[data-kind="scheme"] { height: min(122vw, 560px); }
  .stage[data-kind="chloro"] { height: min(132vw, 580px); }
  .stage[data-kind="bak"] { height: min(150vw, 640px); height: min(150vw, 640px, 100svh); } /* tempo i zegary widać bez przewijania, też poziomo */
  .stage-hint { display: none; }
  .labview { padding: 60px 8px 50px; }
  .sc { padding: 58px 6px 0; }
  .tray { gap: 6px; padding: 8px 4px 10px; }
  .sub { min-height: 40px; padding: 4px 10px 4px 4px; font-size: 13px; }
  .sub .ico { width: 28px; height: 28px; }
  .eqbar { font-size: 17px; padding: 8px 10px; gap: 4px; }
  .slot { min-width: 62px; font-size: 12.5px; }
  .daybar { top: 60px; width: calc(100% - 90px); left: 12px; transform: none; }
  .emeter { top: 60px; right: 8px; bottom: 120px; width: 40px; }
  .ctrl { padding: 6px 4px 8px; gap: 5px; }
  .ctrl .btn-alt { padding: 6px 10px; font-size: 13px; min-height: 42px; }
  .ctrl .tempo { min-width: 60px; }
  .arr { padding: 4px 8px 4px 4px; font-size: 12px; }
  .arr .pic { width: 32px; height: 32px; }
  .arr small { display: none; }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .atlas { padding: 10px; }
  .atlas-card { padding: 16px 14px 0; }
  .atlas-card > .row:last-child { margin-right: -14px; margin-left: -14px; padding: 10px 14px 14px; }
  .atlas-cols { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .lab-h { display: none; }
  .lab-v { display: block; }
  .stage[data-kind="bak"] { height: min(172vw, 760px); height: min(172vw, 760px, 100svh); } /* zegary stoją pod sceną */
}

/* --- tryb ciemny („Ciemny, Uczeń”, lista „Tryb”) -----------------------------------------------------------------------
   Kartki, panel i przyciski są ciemne (tokeny w ../wspolne/system.css). Rysunki gry mają ciemny tusz, więc plansza zostaje
   jasnym arkuszem: dostaje z powrotem jasne kolory, także dla kart, miejsc i wskaźników, które na niej leżą.
   Tylko strona „Ucznia” (body bez data-ui): naukowiec.html wczytuje ten sam arkusz, ale ma własny tryb ciemny. */
:root[data-tryb="ciemny"] body:not([data-ui]) .stage {
  color-scheme: light; color: #26302a;
  --paper: #f4eede; --paper-2: #e9dfc6; --card: #fffaf0; --ink: #26302a; --ink-soft: #5b6257; --line: #cdbf9c;
  --moss: #4c6b3c; --moss-tint: #dcebc9; --moss-pale: #e4f0d3; --resin: #c9772b; --resin-tint: #fdebc8; --berry: #b8322a; --berry-tint: #fbe3d6;
  --ok: #4c6b3c; --ok-tint: #e4f0d3; --bad: #b8322a; --bad-tint: #fbe3d6; --focus: #c9772b; --focus-tint: #fdebc8;
  --accent: #4c6b3c; --accent-tint: #dcebc9; --na-kolorze: #fff;
  --lift: 3px 4px 0 rgba(38, 48, 42, .16); --lift-sm: 2px 3px 0 rgba(38, 48, 42, .14);
}
:root[data-tryb="ciemny"] body:not([data-ui]) .side .pic { background: #fffaf0; border-radius: 8px; }
:root[data-tryb="ciemny"] body:not([data-ui]) :is(.feat button, .assign-row > b, .mbar) { background: var(--paper-2); }
:root[data-tryb="ciemny"] body:not([data-ui]) .feat.got-0 { background: #263121; }
:root[data-tryb="ciemny"] body:not([data-ui]) .feat.got-1 { background: #36291a; }
:root[data-tryb="ciemny"] body:not([data-ui]) .feat.got-1 b { background: var(--resin); } /* pomarańcz cukru ma przy ciemnym napisie mniej niż 7:1 */
:root[data-tryb="ciemny"] body:not([data-ui]) :is(.feat.got b, .steps li.done i, .ord.set b) { color: var(--na-kolorze); }
:root[data-tryb="ciemny"] body:not([data-ui]) .chip { background: color-mix(in srgb, var(--c) 24%, var(--card)); }
