:root{--bg:#0b1020;--panel:#111829;--panel2:#18223a;--line:#24314d;--text:#e6ecf7;--muted:#9aa8c3;--blue:#3b82f6;--green:#22c55e;--red:#ef4444;--amber:#f59e0b}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font:14px/1.45 Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;overflow:hidden}
#app{position:fixed;inset:0}
#view{position:absolute;inset:0 0 0 380px}
#view canvas{display:block;width:100%;height:100%;touch-action:none}
#side{position:absolute;left:0;top:0;bottom:0;width:380px;background:var(--panel);border-right:1px solid var(--line);overflow-y:auto;z-index:5;padding-bottom:40px}
#side section{padding:14px 16px;border-bottom:1px solid var(--line)}
#side h3{margin:0 0 10px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.side-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--panel);z-index:2}
.brand{display:flex;gap:10px;align-items:center}.brand b{display:block;font-size:15px}.brand small{color:var(--muted);font-size:11px}
.bolt{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#2563eb,#7c3aed);font-size:18px}
.exp-list{display:grid;grid-template-columns:1fr;gap:6px}
.exp-list button{text-align:left;background:var(--panel2);border:1px solid var(--line);color:var(--text);padding:8px 10px;border-radius:9px;cursor:pointer;font:inherit;display:flex;justify-content:space-between;gap:8px}
.exp-list button.on{border-color:var(--blue);background:#1b2c52}
.exp-list button .pc{color:var(--muted);font-size:12px;white-space:nowrap}
.exp-list button .pc.full{color:var(--green)}
.exp-card h2{margin:0 0 6px;font-size:17px}
.goal{margin:0 0 8px;color:#cdd6e8}
details{background:#0e1527;border:1px solid var(--line);border-radius:9px;padding:6px 10px;margin-bottom:10px}
details summary{cursor:pointer;color:#93c5fd}
details p{margin:8px 0 2px;color:#cdd6e8}
.progress{height:6px;background:#0e1527;border-radius:6px;overflow:hidden;margin:8px 0}
#progBar{height:100%;width:0;background:linear-gradient(90deg,var(--blue),var(--green));transition:width .4s}
.steps{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:6px}
.steps li{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border-radius:9px;background:#0e1527;border:1px solid var(--line);color:var(--muted)}
.steps li .n{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#1e293b;font-size:12px;font-weight:700}
.steps li.cur{color:var(--text);border-color:#3b5bdb;background:#14204a}
.steps li.cur .n{background:var(--blue)}
.steps li.ok{color:#bbf7d0;border-color:#166534;background:#0d2a1a}
.steps li.ok .n{background:var(--green);color:#052e16}
.steps .all{justify-content:center;color:#86efac;font-weight:700}
.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.btn{border:1px solid transparent;border-radius:9px;padding:8px 12px;font:600 13px Inter,Arial;cursor:pointer;color:#fff;background:#334155}
.btn:hover{filter:brightness(1.15)}
.btn.green{background:#15803d}.btn.red{background:#b91c1c}.btn.blue{background:#1d4ed8}
.btn.small{padding:6px 10px;font-size:12px}
.btn.ghost{background:transparent;border-color:var(--line);color:var(--text)}
.btn.vr{background:linear-gradient(135deg,#2563eb,#7c3aed)}
.btn:disabled{opacity:.4;cursor:default}
.icon{background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:9px;width:36px;height:36px;cursor:pointer;font-size:16px}
#closeSide{display:none}
.ctl{display:grid;gap:8px}
.ctl-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ctl-row.col{flex-direction:column;align-items:stretch}
.ctl-row label{display:flex;justify-content:space-between}
input[type=range]{width:100%;accent-color:var(--blue)}
.toggle{width:46px;height:26px;border-radius:20px;border:1px solid var(--line);background:#1e293b;position:relative;cursor:pointer;flex:none}
.toggle::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#94a3b8;transition:.2s}
.toggle.on{background:var(--green);border-color:var(--green)}
.toggle.on::after{left:23px;background:#fff}
.seg{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.seg button{background:transparent;color:var(--muted);border:0;padding:6px 10px;cursor:pointer;font:600 12px Inter,Arial}
.seg button.on{background:var(--blue);color:#fff}
.swatches{display:flex;gap:6px;flex-wrap:wrap}
.swatches button{width:26px;height:26px;border-radius:50%;border:2px solid #0000;cursor:pointer}
.swatches button.on{border-color:#fff;box-shadow:0 0 0 2px var(--blue)}
.swatches .auto{width:auto;border-radius:13px;padding:0 10px;color:#fff;background:#334155;font:600 11px Inter,Arial}
.readings{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.rd{background:#0e1527;border:1px solid var(--line);border-radius:9px;padding:7px 9px}
.rd small{display:block;color:var(--muted);font-size:11px}
.rd b{font:700 15px ui-monospace,Menlo,Consolas,monospace;color:#fde68a}
.formulas{display:grid;gap:6px;font:13px ui-monospace,Menlo,Consolas,monospace;color:#cfe3ff}
.formulas div{background:#0e1527;border:1px solid var(--line);border-radius:9px;padding:7px 9px}
.formulas small{display:block;color:var(--muted);font-family:Inter,Arial;font-size:11px}
#chart{width:100%;height:auto;margin-top:10px;background:#0e1527;border:1px solid var(--line);border-radius:9px}
.tbl-wrap{max-height:180px;overflow:auto;margin-top:8px}
table{width:100%;border-collapse:collapse;font:12px ui-monospace,Menlo,monospace}
th,td{padding:4px 6px;border-bottom:1px solid var(--line);text-align:right}
th{color:var(--muted);position:sticky;top:0;background:var(--panel)}
.fit{color:#86efac;margin:6px 0 0}
#top{position:absolute;top:10px;left:392px;right:12px;display:flex;gap:8px;align-items:center;z-index:4;pointer-events:none}
#top>*{pointer-events:auto}
#top .spacer{flex:1;pointer-events:none}
#openSide{display:none}
.views{display:flex;gap:4px;background:rgba(17,24,41,.85);border:1px solid var(--line);border-radius:11px;padding:4px;backdrop-filter:blur(6px)}
.views button{background:transparent;border:0;color:var(--text);padding:6px 10px;border-radius:8px;cursor:pointer;font:600 12px Inter,Arial}
.views button:hover{background:#24314d}
#warn{position:absolute;top:60px;left:calc(380px + 50%);transform:translateX(-50%);z-index:4;display:grid;gap:6px;width:min(560px,calc(100vw - 420px));pointer-events:none}
#warn div{background:rgba(127,29,29,.92);border:1px solid #f87171;color:#fee2e2;border-radius:10px;padding:8px 12px;font-weight:600;box-shadow:0 8px 24px #0006}
#toast{position:absolute;bottom:64px;left:calc(380px + 50%);transform:translateX(-50%);z-index:4;background:#14532d;border:1px solid #22c55e;color:#dcfce7;padding:10px 16px;border-radius:12px;font-weight:700;opacity:0;transition:.3s;pointer-events:none}
#toast.show{opacity:1}
#hint{position:absolute;bottom:12px;left:392px;right:12px;z-index:3;color:#cbd5e1;background:rgba(17,24,41,.8);border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-size:12px;pointer-events:none}
#loading{position:absolute;inset:0;z-index:20;display:grid;place-content:center;justify-items:center;background:var(--bg);transition:opacity .5s}
#loading.hide{opacity:0;pointer-events:none}
.spin{width:38px;height:38px;border:3px solid #24314d;border-top-color:var(--blue);border-radius:50%;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
@media (max-width:900px){
  #view{left:0}
  #side{transform:translateX(-100%);transition:transform .25s;width:min(380px,92vw);box-shadow:8px 0 30px #0008}
  #side.open{transform:none}
  #closeSide,#openSide{display:block}
  #top{left:12px}
  #hint{left:12px;font-size:11px}
  #warn{left:50%;width:calc(100vw - 32px)}
  #toast{left:50%}
  .views button{padding:6px 7px}
  #btnLang{display:none}
}

#crosshair{position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #0008;z-index:6;display:none;pointer-events:none}
.walking #crosshair{display:block}
#hoverLabel{position:absolute;left:calc(380px + (100% - 380px)/2);top:calc(50% + 22px);transform:translateX(-50%);z-index:6;background:rgba(10,15,28,.85);border:1px solid #334155;color:#e2e8f0;padding:5px 11px;border-radius:9px;font-size:13px;font-weight:600;white-space:nowrap;opacity:0;transition:opacity .15s;pointer-events:none}
#hoverLabel.show{opacity:1}
.walking #hoverLabel{left:50%}
#walkHud{position:absolute;left:12px;top:12px;z-index:6;max-width:min(620px,70vw);background:rgba(10,15,28,.78);border:1px solid #334155;border-radius:12px;padding:9px 13px;display:none;pointer-events:none}
#walkHud div{font-weight:700;color:#bfdbfe}
#walkHud small{color:#94a3b8}
.walking #walkHud{display:block}
.walking #side,.walking #top,.walking #hint{display:none}
.walking #view{left:0}
.walking #warn{left:50%;top:auto;bottom:24px;width:min(560px,90vw)}
.walking #toast{left:50%}
#joy{position:absolute;left:24px;bottom:70px;width:110px;height:110px;border-radius:50%;background:rgba(15,23,42,.45);border:2px solid #ffffff40;z-index:6;display:none;touch-action:none}
#joy div{position:absolute;left:35px;top:35px;width:40px;height:40px;border-radius:50%;background:#ffffffb0}
@media (pointer:coarse){#joy{display:block}}
#start{position:absolute;inset:0;z-index:15;display:grid;place-items:center;background:radial-gradient(ellipse at center,rgba(11,16,32,.55),rgba(11,16,32,.92));padding:16px;transition:opacity .4s}
#start.hide{opacity:0;pointer-events:none}
.start-card{max-width:560px;text-align:center;background:rgba(17,24,41,.92);border:1px solid var(--line);border-radius:18px;padding:28px 26px;box-shadow:0 20px 60px #0009;display:grid;gap:10px;justify-items:center}
.start-card h1{margin:6px 0 0;font-size:22px}
.start-card p{margin:0;color:#cbd5e1}
.start-card .keys{font-size:12px;color:#94a3b8;margin-top:6px}
.bolt.big{width:56px;height:56px;font-size:28px;border-radius:14px}
.btn.big{width:100%;max-width:360px;padding:12px 16px;font-size:15px}

.btn.hq.on{background:#7c3aed;border-color:#7c3aed}

.seg.wide{display:grid;grid-template-columns:repeat(4,1fr)}
.seg.wide button{padding:6px 4px}
.samples{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.samples button{background:#1a2342;border:1px solid #2c3a63;color:var(--text);border-radius:9px;padding:8px;font:600 12px Inter,Arial;cursor:pointer;text-align:left}
.samples button:hover{border-color:#7c3aed;background:#22195a}
#legend{position:absolute;right:14px;bottom:62px;z-index:6;display:none;align-items:center;gap:8px;background:rgba(10,15,28,.8);border:1px solid #334155;border-radius:10px;padding:6px 10px;font-size:11px;color:#cbd5e1;pointer-events:none}
#legend.show{display:flex}
#legend .bar{width:120px;height:8px;border-radius:4px;background:linear-gradient(90deg,hsl(238,95%,55%),hsl(180,95%,55%),hsl(120,95%,55%),hsl(60,95%,55%),hsl(0,95%,55%))}
.walking #legend{bottom:16px}

.modal{position:absolute;inset:0;z-index:30;display:grid;place-items:center;background:rgba(5,8,18,.72);padding:16px;transition:opacity .25s}
.modal.hide{opacity:0;pointer-events:none}
.modal-card{position:relative;width:min(820px,100%);max-height:92vh;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:22px 24px;box-shadow:0 24px 70px #000a}
.modal-card h2{margin:0 0 4px}
.modal-card .close{position:absolute;right:14px;top:14px}
.muted{color:var(--muted);margin:0 0 8px}
.ctrl-svg{width:100%;height:auto;margin:6px 0 10px}
.ctrl-svg .t-h{fill:#e2e8f0;font:700 22px Inter,Arial}
.ctrl-svg .callouts line{stroke:#94a3b8;stroke-width:1.5}
.ctrl-svg .callouts text{fill:#e2e8f0;font:600 15px Inter,Arial}
.vr-list{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.vr-list li{background:#0e1527;border:1px solid var(--line);border-radius:9px;padding:8px 10px;color:#cbd5e1}
.vr-list b{color:#fde68a;margin-right:6px}
.linkbtn{background:none;border:0;color:#93c5fd;cursor:pointer;font:600 13px Inter,Arial;margin-top:4px}

.walking #hoverLabel{left:50%;top:14px;transform:translateX(-50%);font-size:15px;padding:7px 14px}
.walking #walkHud{max-width:440px}
.walking #toast{top:62px;bottom:auto}

#hint,#walkHud,#hoverLabel{display:none!important}
.wb{position:absolute;inset:0;z-index:50;display:flex;flex-direction:column;background:#fff;transition:opacity .2s}
.wb.hide{opacity:0;pointer-events:none;visibility:hidden}
.wb-bar{flex:none;height:44px;display:flex;align-items:center;gap:12px;padding:0 12px;background:#111827;color:#e5e7eb;font:600 14px Inter,Arial}
.wb-title{flex:1}
.wb-load{color:#93c5fd;font-weight:500}
.wb-close{background:#dc2626;color:#fff;border:0;border-radius:9px;padding:7px 14px;font:700 13px Inter,Arial;cursor:pointer}
.wb-close:hover{filter:brightness(1.1)}
.wb-root{flex:1;min-height:0;position:relative}
.wb-root .excalidraw{height:100%}
.quiz{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;width:100%}.quiz .btn{white-space:normal;text-align:left}.quiz .btn.wrong{border-color:var(--red);color:#fca5a5}
.steps li{flex-wrap:wrap}
.inp{flex:1;min-width:0;background:var(--panel2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:7px 10px;font:inherit;font-size:13px}
.task-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}.task-head span{font-weight:700}
.steps.tasks li{cursor:pointer}.steps.tasks li .pts{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}
.task-sum{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px}.task-sum div{background:#0e1527;border:1px solid var(--line);border-radius:9px;padding:8px}
.task-sum small{display:block;color:var(--muted);font-size:11px}.task-sum b{font-size:18px}.task-sum .g5,.task-sum .g4{color:#4ade80}.task-sum .g3{color:#fbbf24}.task-sum .g2{color:#f87171}
#settings .sheet{width:min(440px,100%);background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px 20px;box-shadow:0 24px 70px #000a}
.sh-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.sh-head b{font-size:16px}
.srow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid var(--line)}
.srow input[type=range]{flex:1;max-width:200px}.srow em{font-style:normal;color:var(--muted);min-width:34px;text-align:right}
#settings .hint{display:block;color:var(--muted);font-size:11.5px;margin:-4px 0 6px}
#loading .bar{width:220px;height:6px;border-radius:3px;background:#1e293b;overflow:hidden;margin-top:12px}#loading .bar i{display:block;height:100%;width:0;background:var(--blue);transition:width .25s}
.sel{background:var(--panel2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:6px 8px;font:inherit;font-size:13px}
.muted{color:var(--muted);font-size:12px;display:block;margin-top:6px}
.people li{align-items:center}.people .dot{width:10px;height:10px;border-radius:50%;flex:none}.people .st{margin-left:auto;font-size:12px;color:var(--muted);text-align:right}
.people .st b{color:var(--text)}.people a{color:#93c5fd;cursor:pointer;text-decoration:underline}
#fps{position:absolute;right:10px;bottom:10px;z-index:15;font:600 12px ui-monospace,monospace;color:#e2e8f0;background:rgba(10,15,28,.7);padding:4px 8px;border-radius:8px;pointer-events:none}

/* Class paused by the teacher */
#freezeBanner { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 12px; align-items: center;
  background: rgba(127, 29, 29, 0.92); color: #fff; padding: 12px 22px; border-radius: 14px; font: 600 16px/1.3 system-ui, sans-serif; box-shadow: 0 8px 30px rgba(0,0,0,.35); pointer-events: none; }
#freezeBanner[hidden] { display: none; }
#freezeBanner b { font-size: 22px; }
#netStaff .row { margin-bottom: 6px; }
#netStaff .sel { flex: 1; min-width: 0; }

/* What clicking the aimed-at control does */
#aimTip { position: absolute; left: calc(50% + 190px); top: 62px; transform: translateX(-50%); z-index: 6; pointer-events: none;
  background: rgba(10, 30, 20, 0.82); color: #bbf7d0; border: 1px solid #22c55e88; border-radius: 9px; padding: 4px 11px; font: 600 12.5px/1.3 system-ui, sans-serif; white-space: nowrap; }
@media (max-width: 900px) { #aimTip { left: 50%; } }
.walking #aimTip { left: 50%; top: 54px; }
#aimTip[hidden] { display: none; }

/* "Join this class" on the start screen when the link has ?room= */
#startJoin { border: 1px solid #3b82f688; background: #1e3a8a33; border-radius: 14px; padding: 12px 14px; margin: 4px 0 12px; }
#startJoin .join-title { margin: 0 0 8px; font-weight: 700; color: #bfdbfe; }
#startJoin .row { display: flex; gap: 6px; margin-bottom: 8px; }
#startJoin .inp { flex: 1; min-width: 0; }
#startJoin .btn { width: 100%; }

/* ---------- Professional theme: compact type, calmer surfaces (overrides above) ---------- */
:root { --side: 336px; }
html, body { font: 13px/1.45 Inter, system-ui, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: 0.005em; }
#view { inset: 0 0 0 var(--side); }
#side { width: var(--side); }
#side section { padding: 12px 14px; }
#side h3 { font-size: 10px; letter-spacing: 0.12em; margin-bottom: 8px; }
.side-head { padding: 11px 14px; }
.brand b { font-size: 13.5px; } .brand small { font-size: 10.5px; }
.bolt { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }
.exp-list { gap: 4px; }
.exp-list button { padding: 6px 9px; border-radius: 7px; font-size: 12.5px; }
.exp-list button .pc { font-size: 11px; }
.exp-card h2 { font-size: 15px; }
.goal, details p { font-size: 12.5px; }
.steps li { padding: 6px 9px; border-radius: 7px; font-size: 12.5px; gap: 8px; }
.steps li .n { width: 19px; height: 19px; font-size: 11px; }
.btn { border-radius: 7px; padding: 7px 11px; font: 600 12px Inter, system-ui, Arial, sans-serif; }
.btn.small { padding: 5px 9px; font-size: 11.5px; }
.seg button { padding: 5px 9px; font-size: 11.5px; }
.icon { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
#top { left: calc(var(--side) + 12px); }
#hint { left: calc(var(--side) + 12px); font-size: 11.5px; }
#warn { left: calc(var(--side) + 50%); width: min(520px, calc(100vw - var(--side) - 40px)); }
#warn div { font-size: 12.5px; padding: 7px 11px; border-radius: 8px; }
#toast { left: calc(var(--side) + 50%); font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 10px; }
#hoverLabel { left: calc(var(--side) + (100% - var(--side)) / 2); font-size: 12px; }
#aimTip { left: calc(50% + var(--side) / 2); font-size: 12px; }
.walking #hoverLabel { font-size: 13px; padding: 6px 12px; }
.walking #toast { font-size: 12.5px; }
/* Start screen */
.start-card { max-width: 540px; padding: 24px 26px 18px; border-radius: 14px; gap: 9px; text-align: left; justify-items: stretch; }
.start-card .bolt.big { width: 44px; height: 44px; font-size: 22px; border-radius: 11px; justify-self: center; }
.start-card h1 { font-size: 19px; text-align: center; letter-spacing: 0.01em; }
.start-card > p { text-align: center; color: #aab6cc; font-size: 12.5px; margin-bottom: 4px; }
.btn.big { max-width: none; padding: 10px 14px; font-size: 13px; justify-self: stretch; }
.howto { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.howto h4 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.howto ol { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 5px; color: #cbd5e1; font-size: 12px; }
.howto ol li::marker { color: #60a5fa; font-weight: 700; }
.kbd-row { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: #94a3b8; }
.kbd-row span { display: inline-flex; align-items: center; gap: 5px; }
.kbd-row i { font-style: normal; }
kbd { font: 600 10.5px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #e2e8f0; background: #1e293b; border: 1px solid #334155; border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; }
.linkbtn { justify-self: center; font-size: 12px; }
#startJoin .join-title { font-size: 12.5px; }
@media (max-width: 900px) {
  #view, #top, #hint { left: 0; }
  #top, #hint { left: 12px; }
  #warn, #toast { left: 50%; }
  #side { width: min(var(--side), 92vw); }
}

/* Class link: join first (name + role), the free-entry buttons come back after joining */
#start.join-only .free { display: none; }
.join-err { margin: 0 0 8px; color: #fecaca; background: #7f1d1d66; border: 1px solid #ef444488; border-radius: 8px; padding: 6px 9px; font-size: 12px; }
.join-err[hidden] { display: none; }
#netList .mini { margin-left: 6px; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 1px 6px; cursor: pointer; font-size: 11px; }
#netList .mini:hover { border-color: #ef4444; color: #fecaca; }

/* ---------- v43: tabbed panel, line icons ---------- */
.ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
.btn, .icon, .views button, .samples button, details summary, .ctl-row > span { display: inline-flex; align-items: center; gap: 6px; }
.icon { justify-content: center; padding: 0; }
.icon .ic { width: 17px; height: 17px; }
.btn { justify-content: center; }
.btn.big .ic { width: 18px; height: 18px; }
.bolt { color: #fff; }
.bolt .ic { width: 60%; height: 60%; }
#side { padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: #2b3a5c transparent; }
.tabs { position: sticky; top: 53px; z-index: 2; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tabs button { display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 10.5px/1.1 Inter, system-ui, Arial, sans-serif; cursor: pointer; }
.tabs button .ic { width: 19px; height: 19px; }
.tabs button:hover { background: #18223a; color: var(--text); }
.tabs button.on { background: #17264a; color: #93c5fd; box-shadow: inset 0 -2px 0 var(--blue); }
.pane { display: none; }
.pane.on { display: block; }
.exp-nav { display: flex; gap: 6px; align-items: flex-start; }
.exp-nav .icon { width: 28px; height: 28px; flex: none; }
.exp-list { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 4px; }
.exp-list button { position: relative; display: grid; place-items: center; height: 28px; padding: 0; border-radius: 7px; font: 700 11.5px Inter, system-ui, Arial; font-variant-numeric: tabular-nums; color: var(--muted); overflow: hidden; }
.exp-list button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--blue); }
.exp-list button.full { color: #86efac; border-color: #166534; }
.exp-list button.full::after { background: var(--green); }
.exp-list button.on { color: #fff; border-color: var(--blue); background: #1d3a7a; }
.exp-list button:hover { border-color: #3b5bdb; color: var(--text); }
#expTitle { display: flex; align-items: center; gap: 8px; }
#expTitle::before { content: attr(data-n); display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--blue); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.exp-card details { margin: 2px 0 8px; }
details summary { list-style: none; font-weight: 600; font-size: 12px; }
details summary::-webkit-details-marker { display: none; }
.steps li .n .ic { width: 12px; height: 12px; }
.steps .all { display: flex; align-items: center; gap: 8px; }
.steps .all .ic { color: #facc15; }
.samples button { justify-content: flex-start; gap: 7px; line-height: 1.25; }
.samples button .ic { color: #a78bfa; }
.ctl-row > span .ic { color: var(--muted); }
#side .row.tools { display: grid; grid-template-columns: 1fr 1fr; }
#side .row .btn { flex: 1 1 auto; }
.views button { gap: 5px; padding: 6px 9px; }
.views button b { font-weight: 600; }
.views button .ic { width: 16px; height: 16px; }
#top .btn.small { min-height: 32px; }
#top .btn .ic { width: 16px; height: 16px; }
#warn div { display: flex; gap: 8px; align-items: flex-start; }
#warn div .ic { margin-top: 1px; color: #fca5a5; }
#freezeBanner .ic { width: 22px; height: 22px; }
.people .mini { display: inline-grid; place-items: center; }
.people .mini .ic, .people a .ic { width: 13px; height: 13px; }
.people a { text-decoration: none; margin-left: 4px; }
#setClose .ic { width: 16px; height: 16px; }
@media (max-width: 900px) { .tabs { top: 53px; } .views button b { display: none; } #btnVR span, #btnWalk span { display: none; } }
.steps li { flex-wrap: nowrap; }
.steps li:has(.quiz) { flex-wrap: wrap; }
.steps li > span:nth-child(2) { flex: 1; min-width: 0; }
.readings { gap: 5px; }
.rd { padding: 6px 8px; }
.rd b { font-size: 13.5px; }

/* ---------- v44 identity: instrument-panel look (graphite, one amber accent, square edges) ---------- */
@font-face { font-family: "Lab Sans"; src: url("../vendor/excalidraw/excalidraw-assets/Assistant-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lab Sans"; src: url("../vendor/excalidraw/excalidraw-assets/Assistant-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lab Sans"; src: url("../vendor/excalidraw/excalidraw-assets/Assistant-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lab Mono"; src: url("../vendor/excalidraw/excalidraw-assets/Cascadia.woff2") format("woff2"); font-display: swap; }
:root {
  --bg: #121315; --panel: #1a1b1e; --panel2: #222327; --line: #2e3035; --line2: #3a3d43;
  --text: #e8e4dc; --muted: #8e8c87; --faint: #63625e;
  --amber: #e5a03a; --amber-d: #3a2c17; --blue: #e5a03a; --green: #7fb069; --red: #d0574b;
  --sans: "Lab Sans", "Segoe UI", system-ui, sans-serif; --mono: "Lab Mono", ui-monospace, Consolas, monospace;
  --r: 3px; --tb: 40px;
}
html, body { font: 13.5px/1.45 var(--sans); letter-spacing: 0; background: var(--bg); }
button, input, select { font-family: var(--sans); }
/* Side panel */
#side { background: var(--panel); border-right: 1px solid var(--line); box-shadow: none; }
#side section { border-bottom: 1px solid var(--line); padding: 12px 14px; }
#side h3 { font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.side-head { height: var(--tb); padding: 0 12px 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { gap: 9px; }
.bolt { width: 22px; height: 22px; border-radius: 0; background: none; color: var(--amber); border: 1.5px solid var(--amber); }
.bolt .ic { width: 14px; height: 14px; }
.brand b { font: 700 13px/1 var(--sans); color: var(--text); }
.brand small { font: 11px/1 var(--mono); color: var(--faint); letter-spacing: .04em; margin-top: 3px; }
.tabs { top: var(--tb); grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 0; padding: 0 6px; background: var(--panel); }
.tabs button { display: block; padding: 11px 6px 10px; border-radius: 0; font: 600 12px/1 var(--sans); color: var(--muted); box-shadow: none; }
.tabs button .ic { display: none; }
.tabs button:hover { background: none; color: var(--text); }
.tabs button.on { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--amber); }
/* Experiment keypad */
.exp-nav .icon { width: 26px; height: 26px; }
.exp-list { grid-template-columns: repeat(auto-fill, minmax(27px, 1fr)); gap: 3px; }
.exp-list button { height: 26px; border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line); font: 12px/1 var(--mono); color: var(--muted); }
.exp-list button::after { height: 2px; background: var(--amber); }
.exp-list button.full { color: var(--green); border-color: #3c5233; }
.exp-list button.full::after { background: var(--green); }
.exp-list button.on { background: var(--amber); border-color: var(--amber); color: #1a1408; }
.exp-list button.on::after { display: none; }
.exp-list button:hover { border-color: var(--line2); color: var(--text); }
.exp-card h2, #expTitle { font: 700 15px/1.25 var(--sans); }
#expTitle::before { min-width: 0; height: auto; padding: 0; background: none; border-radius: 0; color: var(--amber); font: 15px/1 var(--mono); content: attr(data-n) "."; }
.goal { color: #bdb8ae; font-size: 13px; }
.progress { height: 2px; border-radius: 0; background: var(--line); margin: 10px 0; }
#progBar, #taskHold { background: var(--amber); }
.steps { gap: 0; border-top: 1px solid var(--line); }
.steps li { padding: 8px 2px; border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.steps li .n { width: 20px; height: 20px; border-radius: 0; background: none; border: 1px solid var(--line2); font: 11px/1 var(--mono); color: var(--muted); }
.steps li.cur { background: none; color: var(--text); border-color: var(--line); }
.steps li.cur .n { background: none; border-color: var(--amber); color: var(--amber); }
.steps li.ok { background: none; color: #a9b69f; border-color: var(--line); }
.steps li.ok .n { background: none; border-color: var(--green); color: var(--green); }
.steps .all { color: var(--green); }
.steps .all .ic { color: var(--green); }
details { background: none; border: 0; border-radius: 0; padding: 0; margin: 10px 0 6px; }
details summary { color: var(--muted); font-weight: 600; font-size: 12.5px; }
details summary .ic { width: 14px; height: 14px; }
details[open] summary { color: var(--text); }
details p { color: #bdb8ae; border-left: 2px solid var(--line2); padding-left: 10px; }
/* Buttons */
.btn { border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line2); color: var(--text); font: 600 12.5px/1 var(--sans); padding: 8px 11px; filter: none; }
.btn:hover { filter: none; background: #2a2c31; border-color: #4a4d54; }
.btn.small { padding: 6px 9px; font-size: 12px; }
.btn.green, .btn.blue { background: var(--amber); border-color: var(--amber); color: #1a1408; }
.btn.green:hover, .btn.blue:hover { background: #f0b04f; border-color: #f0b04f; }
.btn.red { background: none; border-color: #6b3a35; color: #e48a80; }
.btn.red:hover { background: #2c1c1a; }
.btn.ghost { background: none; border-color: var(--line2); }
.btn.vr { background: var(--text); border-color: var(--text); color: #121315; }
.btn.vr:hover { background: #fff; }
.btn .ic { width: 15px; height: 15px; }
.icon { border-radius: var(--r); background: none; border: 1px solid var(--line2); color: var(--muted); }
.icon:hover { color: var(--text); border-color: #4a4d54; }
/* Controls */
.toggle { width: 44px; height: 20px; border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line2); }
.toggle::after { top: 2px; left: 2px; width: 18px; height: 14px; border-radius: 2px; background: #5a5c61; transition: .15s; }
.toggle.on { background: var(--amber-d); border-color: var(--amber); }
.toggle.on::after { left: 22px; background: var(--amber); }
.seg { border-radius: var(--r); border-color: var(--line2); }
.seg button { font: 12px/1 var(--mono); color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--amber); color: #1a1408; }
.seg.wide button { font-family: var(--sans); font-weight: 600; }
input[type=range] { accent-color: var(--amber); height: 18px; }
.ctl-row label b, #vVal, #rVal { font: 12.5px var(--mono); color: var(--amber); }
.swatches button { border-radius: 2px; width: 22px; height: 22px; }
.swatches button.on { border-color: var(--text); box-shadow: none; }
.swatches .auto { border-radius: 2px; background: var(--panel2); border: 1px solid var(--line2); font: 11px var(--mono); }
.samples { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.samples button { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 2px; font: 13px var(--sans); color: #cfcac0; }
.samples button:hover { background: none; color: var(--amber); border-color: var(--line); }
.samples button .ic { color: var(--faint); width: 14px; height: 14px; }
.samples button:hover .ic { color: var(--amber); }
/* Readouts: like an instrument's LCD rows */
.readings { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.rd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 6px 2px; }
.rd small { font-size: 12.5px; color: var(--muted); }
.rd b { font: 13px var(--mono); color: var(--amber); text-align: right; }
.formulas { gap: 0; font: 12px/1.5 var(--mono); color: #d8d3c9; border-top: 1px solid var(--line); }
.formulas div { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 7px 2px; }
.formulas small { font: 600 11.5px var(--sans); color: var(--muted); margin-bottom: 2px; }
#chart { border-radius: var(--r); background: #151618; border-color: var(--line); }
table { font: 12px var(--mono); } th { background: var(--panel); color: var(--muted); }
.fit { color: var(--green); font: 12px var(--mono); }
.inp, .sel { border-radius: var(--r); background: #151618; border-color: var(--line2); color: var(--text); font-size: 13px; }
.inp:focus, .sel:focus { outline: none; border-color: var(--amber); }
.task-sum div { border-radius: var(--r); background: #151618; }
.task-sum b { font-family: var(--mono); }
.people .dot { border-radius: 1px; }
/* Docked toolbar instead of floating pills */
#top { top: 0; left: var(--side); right: 0; height: var(--tb); padding: 0 8px; gap: 6px; background: var(--panel); border-bottom: 1px solid var(--line); pointer-events: auto; }
.views { background: none; border: 0; border-radius: 0; padding: 0; gap: 0; backdrop-filter: none; height: 100%; }
.views button { height: 100%; border-radius: 0; padding: 0 11px; color: var(--muted); font: 12px var(--mono); border-right: 1px solid var(--line); }
.views button:first-child { border-left: 1px solid var(--line); }
.views button:hover { background: var(--panel2); color: var(--text); }
.views button b { font-weight: 400; }
#top .btn.small { min-height: 28px; padding: 0 9px; }
#top .btn { height: 28px; padding: 0 11px; }
#btnLang { font: 12px var(--mono); }
#view { top: var(--tb); overflow-y: auto; }
#warn { top: calc(var(--tb) + 10px); }
#warn div { background: #2a1a17; border: 1px solid #6b3a35; border-left: 3px solid var(--red); border-radius: var(--r); color: #f0d6d1; box-shadow: none; font-weight: 600; }
#warn div .ic { color: var(--red); }
#toast { background: var(--panel); border: 1px solid var(--line2); border-left: 3px solid var(--amber); border-radius: var(--r); color: var(--text); box-shadow: 0 6px 18px #0008; }
#freezeBanner { background: #2a1a17; border: 1px solid var(--red); border-radius: var(--r); box-shadow: none; }
#aimTip { background: rgba(18, 19, 21, .88); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r); }
#legend, #fps { border-radius: var(--r); background: rgba(18, 19, 21, .85); border-color: var(--line2); }
/* Start screen: plain, left-aligned sheet */
#start { background: rgba(10, 10, 11, .78); }
.start-card { max-width: 500px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 18px 50px #000a; padding: 22px 24px 16px; gap: 8px; }
.start-card .bolt.big { justify-self: start; width: 30px; height: 30px; border-radius: 0; }
.start-card .bolt.big .ic { width: 18px; height: 18px; }
.start-card h1 { text-align: left; font: 700 20px/1.2 var(--sans); margin: 4px 0 0; }
.start-card > p { text-align: left; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.btn.big { justify-content: flex-start; padding: 11px 14px; font-size: 13.5px; }
.howto { border-top: 1px solid var(--line); }
.howto h4 { color: var(--muted); letter-spacing: .06em; }
.howto ol { color: #cfcac0; font-size: 13px; }
.howto ol li::marker { color: var(--amber); font-family: var(--mono); font-weight: 400; }
kbd { border-radius: 2px; background: var(--panel2); border-color: var(--line2); color: var(--text); font-family: var(--mono); }
.linkbtn { color: var(--amber); justify-self: start; }
#startJoin { border-radius: var(--r); background: #1f1a12; border-color: #5a4320; }
#startJoin .join-title { color: var(--amber); }
.modal { background: rgba(10, 10, 11, .78); }
.modal-card, #settings .sheet { border-radius: 4px; background: var(--panel); border-color: var(--line2); }
.vr-list li { border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--line); }
.vr-list b { color: var(--amber); font-family: var(--mono); font-weight: 400; }
#loading { background: var(--bg); }
.spin { border-color: var(--line); border-top-color: var(--amber); }
#loading .bar { border-radius: 0; height: 2px; background: var(--line); }
#loading .bar i { background: var(--amber); }
#settings .seg button.on, #setQ button.on, #setL button.on { background: var(--amber); color: #1a1408; }
@media (max-width: 900px) { #top { left: 0; } #view { top: var(--tb); } .tabs button { padding: 11px 4px 10px; font-size: 11.5px; } }
.walking #view { top: 0; }
.bolt { font: 700 10px/1 var(--mono); letter-spacing: .02em; }
.start-card .bolt.big { font-size: 12px; }
/* Experiment list: names grouped by topic */
.exp-list { display: block; max-height: 330px; overflow-y: auto; margin: -4px -6px 0; padding: 0 6px; scrollbar-width: thin; }
.exp-list .grp { font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 12px 2px 6px; }
.exp-list .grp:first-child { padding-top: 4px; }
.exp-list button { display: flex; align-items: baseline; gap: 9px; width: 100%; height: auto; padding: 6px 6px; border: 0; border-left: 2px solid transparent; border-radius: 0; background: none; color: #cfcac0; font: 13px/1.3 var(--sans); text-align: left; overflow: visible; }
.exp-list button::after { display: none; }
.exp-list button .no { flex: none; width: 18px; font: 12px var(--mono); color: var(--faint); text-align: right; }
.exp-list button .nm { flex: 1; min-width: 0; }
.exp-list button .pc { flex: none; font: 11.5px var(--mono); color: var(--faint); }
.exp-list button:hover { background: var(--panel2); color: var(--text); }
.exp-list button.full .pc, .exp-list button.full .no { color: var(--green); }
.exp-list button.full { color: #cfcac0; }
.exp-list button.on { background: var(--amber-d); border-left-color: var(--amber); color: var(--text); }
.exp-list button.on .no, .exp-list button.on .pc { color: var(--amber); }

/* WebGL fallback card & 3D preview gallery */
.webgl-fallback {
  padding: 24px;
  max-width: 860px;
  margin: 20px auto 40px;
  background: var(--panel, #0f172a);
  color: var(--text, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--line, #334155);
  font-family: system-ui, -apple-system, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.webgl-fallback-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.webgl-fallback-head h2 {
  margin: 0;
  font-size: 18px;
  color: #38bdf8;
}
.webgl-fallback-head .sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted, #94a3b8);
}
.webgl-fallback .desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 10px 0 16px;
}
.webgl-fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.webgl-fallback-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.webgl-fallback-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #1e293b;
}
.webgl-fallback-item .caption {
  padding: 8px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
}
.webgl-fallback-item .caption b {
  display: block;
  color: #38bdf8;
  font-size: 12.5px;
  margin-bottom: 2px;
}
.webgl-fallback-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #334155);
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

/* ========== v45: Entry screen remodel + VR visibility + graded lock ========== */

/* VR-only elements: hidden unless the browser confirmed a headset */
.vr-only { display: none; }
.has-vr .vr-only { display: inline-flex; }

/* Logo mark in the brand strip */
.mark { display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--amber); }
.mark .ic { width: 14px; height: 14px; }

/* Top bar: primary/ghost button variants */
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a1408; }
.btn.primary:hover { background: #f0b04f; border-color: #f0b04f; }
.btn.hq.on { background: var(--panel2); border-color: var(--line2); color: var(--text); }
.btn.hq.on:hover { border-color: #4a4d54; }

/* ---- Start / join screen ---- */
#start { background: rgba(8, 9, 11, .82); }
.start-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 820px;
  width: min(820px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 4px;
  box-shadow: 0 20px 60px #000c;
  overflow: hidden;
  text-align: left;
}
.start-main {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--line);
}
.start-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 13px/1 var(--mono);
  color: var(--amber);
  letter-spacing: .06em;
}
.start-brand .mark { width: 18px; height: 18px; }
.start-main h1 {
  font: 700 22px/1.15 var(--sans);
  color: var(--text);
  margin: 0;
}
.start-lead {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 4px;
  line-height: 1.5;
}
/* Join form fields */
.fld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.fld > span {
  font: 600 11px/1 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.fld-row { display: flex; gap: 8px; }
.start-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.start-actions.free { margin-top: 4px; }
.start-note {
  font-size: 11.5px;
  color: var(--faint);
  margin: 0;
  line-height: 1.5;
}
/* Keys panel (right column) */
.start-keys {
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #131416;
}
.start-keys h4 {
  font: 600 10.5px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
dl.keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: start;
  margin: 0;
}
dl.keys dt {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
}
dl.keys dd {
  font-size: 12.5px;
  color: #9fa8b8;
  margin: 0;
  padding-top: 2px;
}
.start-how {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* Class join: hide the free-entry buttons in join-only mode */
#start.join-only .free { display: none; }
#startJoin {
  gap: 10px;
  display: flex;
  flex-direction: column;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 0 0;
  margin: 2px 0 4px;
}
#startJoin .join-title {
  font: 600 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 2px;
}
#startJoin.hidden, #startJoin[hidden] { display: none; }

/* Mobile: stack the two-column card */
@media (max-width: 680px) {
  .start-card { grid-template-columns: 1fr; width: calc(100vw - 24px); }
  .start-main { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 18px 16px; }
  .start-keys { padding: 16px 18px 20px; }
}

/* ---- Graded session: hide auto-wire & sample buttons ---- */
.graded #btnAuto, .graded #sampleList { opacity: 0; pointer-events: none; }
.graded #btnAuto { display: none; }
/* Walking: extra bottom padding for the graded indicator not to overlap hint */

/* ---- kbd in start screen uses the same token as inline kbd ---- */
.start-keys kbd { font-size: 10px; padding: 2px 5px; }

/* ========== v46: Sidebar Remodel & Collapsible Dock ========== */

/* Desktop & Mobile collapsible sidebar */
#closeSide {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  color: var(--muted);
  background: var(--panel2);
}
#closeSide:hover { color: var(--text); border-color: var(--amber); }
#openSide {
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  color: var(--text);
  background: var(--panel2);
}
.side-closed #side {
  transform: translateX(-100%);
  pointer-events: none;
}
.side-closed #view { left: 0; }
.side-closed #top { left: 0; }
.side-closed #openSide { display: inline-grid; }
#side {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  background: #141619;
  border-right: 1px solid #262930;
}
.side-head {
  height: 44px;
  padding: 0 12px 0 14px;
  background: #111316;
  border-bottom: 1px solid #24272d;
}
.brand b { font: 700 13px/1.1 var(--sans); color: #f1efe9; }
.brand small { font: 600 10px/1 var(--mono); color: var(--amber); letter-spacing: 0.08em; }

/* Segmented navigation tabs with icons */
.tabs {
  top: 44px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 6px 8px;
  background: #111316;
  border-bottom: 1px solid #24272d;
}
.tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px 5px;
  border-radius: 4px;
  font: 600 10.5px/1 var(--sans);
  color: #8b909a;
  border: 1px solid transparent;
  box-shadow: none;
  transition: all 0.14s ease;
}
.tabs button .ic {
  display: block;
  width: 14px;
  height: 14px;
  opacity: 0.75;
}
.tabs button:hover {
  background: #1b1e23;
  color: var(--text);
}
.tabs button.on {
  background: #21242b;
  color: var(--amber);
  border-color: #353944;
  box-shadow: inset 0 -2px 0 var(--amber);
}
.tabs button.on .ic { opacity: 1; color: var(--amber); }

/* Experiment Switcher Bar (top of Tajriba pane) */
.exp-picker-sec {
  padding: 10px 12px !important;
  background: #181a1f;
  border-bottom: 1px solid #262930 !important;
}
.exp-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
}
.exp-switcher .icon.small {
  width: 30px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  font: 700 16px/1 var(--mono);
  background: #1f2229;
  border: 1px solid #30343e;
  border-radius: 4px;
  color: #b5b9c2;
  cursor: pointer;
}
.exp-switcher .icon.small:hover {
  border-color: var(--amber);
  color: var(--text);
  background: #262a33;
}
.exp-picker-btn {
  flex: 1;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #1f2229;
  border: 1px solid #30343e;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.exp-picker-btn:hover, .exp-picker-btn.open {
  border-color: var(--amber);
  background: #252830;
}
.exp-picker-btn .exp-no {
  font: 700 11.5px/1 var(--mono);
  color: #1a1408;
  background: var(--amber);
  padding: 3px 5px;
  border-radius: 3px;
  flex: none;
}
.exp-picker-btn .exp-nm {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 600 12.5px/1.2 var(--sans);
  color: #f1efe9;
}
.exp-picker-btn .exp-pc {
  font: 600 11px/1 var(--mono);
  color: var(--muted);
  flex: none;
}
.exp-picker-btn .exp-chev {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.exp-picker-btn.open .exp-chev {
  transform: rotate(180deg);
  color: var(--amber);
}

/* Collapsible Experiment Drawer */
#expList[hidden] { display: none !important; }
.exp-list {
  margin: 8px 0 0;
  padding: 6px;
  max-height: 310px;
  background: #121417;
  border: 1px solid #2a2e37;
  border-radius: 4px;
}
.exp-list .grp {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.08em;
  color: #6c727f;
  padding: 10px 6px 5px;
}
.exp-list button {
  border-radius: 3px;
  padding: 6px 8px;
  margin-bottom: 1px;
}

/* Active Experiment Card */
.exp-card {
  padding: 14px 14px 16px !important;
  background: #141619;
}
.exp-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.exp-badge {
  font: 700 10.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
}
.exp-step-count {
  font: 600 11px/1 var(--mono);
  color: var(--muted);
  background: #1e2127;
  border: 1px solid #2c3038;
  padding: 2px 6px;
  border-radius: 3px;
}
#expTitle {
  font: 700 16px/1.25 var(--sans);
  color: #f5f3ee;
  margin: 0 0 6px;
}
#expTitle::before { display: none; }
.exp-card .goal {
  font-size: 12.5px;
  line-height: 1.45;
  color: #a8adb7;
  margin: 0 0 10px;
}
.progress {
  height: 4px;
  border-radius: 2px;
  background: #23262d;
  margin: 0 0 12px;
  overflow: hidden;
}

/* Step-by-step checklist cards */
.steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 0;
  margin: 0 0 12px;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  background: #191c21;
  border: 1px solid #252930;
  border-left: 3px solid #2f343d;
  border-radius: 4px;
  color: #969ba6;
  font-size: 12.5px;
  line-height: 1.4;
}
.steps li .n {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: #131519;
  border: 1px solid #323640;
  font: 700 11px/1 var(--mono);
  color: #888d98;
  flex: none;
  margin-top: 1px;
}
.steps li.cur {
  background: #201d17;
  border-color: #463822;
  border-left: 3px solid var(--amber);
  color: #f3f0e8;
}
.steps li.cur .n {
  background: var(--amber);
  border-color: var(--amber);
  color: #1a1408;
}
.steps li.ok {
  background: #161d18;
  border-color: #253328;
  border-left: 3px solid var(--green);
  color: #b7c7b0;
}
.steps li.ok .n {
  background: #1f2e22;
  border-color: var(--green);
  color: var(--green);
}

/* Theory expandable card */
.exp-card details {
  background: #191c21;
  border: 1px solid #262a32;
  border-radius: 4px;
  padding: 8px 10px;
  margin: 0 0 12px;
}
.exp-card details summary {
  font-size: 12px;
  color: #c5c9d1;
}
.exp-card details p {
  margin: 8px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: #a3a8b2;
  border-left: 2px solid var(--amber);
}
.exp-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 2-column compact grid for Ready-Made Circuits (Samples) */
.samples-sec {
  padding: 12px 14px 16px !important;
}
.samples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-top: 0;
}
.samples button {
  background: #191c21;
  border: 1px solid #272b33;
  border-radius: 4px;
  padding: 8px 9px;
  font: 600 11.5px/1.25 var(--sans);
  color: #d0d3da;
  text-align: left;
  justify-content: flex-start;
  transition: all 0.14s ease;
}
.samples button:hover {
  background: #22262e;
  border-color: var(--amber);
  color: #fff;
}

/* 2-column LCD readout grid in Data tab */
.readings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-top: 0;
}
.rd {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  background: #191c21;
  border: 1px solid #262a32;
  border-radius: 4px;
  padding: 7px 9px;
}
.rd small { font-size: 11px; color: #8c919c; }
.rd b { font: 700 12.5px var(--mono); color: var(--amber); text-align: left; }


