/* =====================================================================
   LibNext ThinkLab — Think Like a Physicist
   Shared design system. One bright "lab bench" look, deliberately single-theme.
   Layout: header / learning-cycle rail / three-zone bench (mission | stage | instruments)
   Colour carries meaning: teal = what you PREDICTED, amber = what you MEASURED.
   ===================================================================== */
:root {
  color-scheme: light;
  --paper: #f4f7fb;
  --paper-2: #eaf0f7;
  --surface: #ffffff;
  --ink: #13233a;
  --ink-2: #48586f;
  --ink-3: #7b8aa0;
  --line: #d9e1eb;
  --grid: #e8eef5;

  --accent: #e0336f;          /* LibNext magenta: primary actions */
  --accent-ink: #b8195a;
  --accent-soft: #fde7ef;
  --predict: #0e8f84;         /* predictions */
  --predict-soft: #dff4f1;
  --measure: #c97a00;         /* measurements */
  --measure-soft: #fff1d6;

  --good: #1f8a4c; --good-soft: #e1f4e8;
  --warn: #b86e00; --warn-soft: #fff0d9;
  --bad: #c93636;  --bad-soft: #fde5e5;

  --s-blue: #2f6fde; --s-pink: #e0336f; --s-amber: #d98a00;
  --s-teal: #0e8f84; --s-violet: #7056e8; --s-slate: #5b6b82;

  --f-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(19,35,58,.06), 0 6px 20px rgba(19,35,58,.07);
  --tap: 44px;
  font-size: 15px;
}
html[data-scale="big"] { font-size: 19px; --tap: 56px; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: var(--tap); padding: 0 1.05rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, transform .08s;
  touch-action: manipulation; user-select: none;
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.predict { background: var(--predict); border-color: var(--predict); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--paper-2); }
.btn.small { min-height: 36px; padding: 0 .8rem; font-size: .88rem; }
.btn .k { font-family: var(--f-mono); font-size: .75em; opacity: .7; border: 1px solid currentColor; border-radius: 4px; padding: 0 .3em; }

/* ---------- app frame ---------- */
.lab {
  height: 100%; display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.topbar {
  display: flex; align-items: center; gap: .75rem;
  padding-block: .55rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: conic-gradient(from 200deg, var(--accent), #ff9f43, #2f6fde, var(--predict), var(--accent));
  display: grid; place-items: center;
}
.brand-mark::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text small { font-size: .7rem; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.brand-text strong { font-family: var(--f-display); font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.score-chip {
  display: flex; align-items: center; gap: .5rem; padding: .25rem .75rem; border-radius: 999px;
  background: var(--paper-2); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.score-chip .num { font-size: 1rem; }
.mode-switch { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.mode-switch button {
  border: 0; background: transparent; border-radius: 999px; padding: .35rem .85rem; min-height: 36px;
  font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--ink-2);
}
.mode-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- learning cycle rail ---------- */
.cycle {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; position: relative;
  padding-block: .45rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.cycle::-webkit-scrollbar { display: none; }
.cycle-step {
  flex: 1 0 auto; display: flex; align-items: center; gap: .4rem; justify-content: center;
  padding: .3rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--ink-3);
  background: var(--paper); white-space: nowrap; transition: background .25s, color .25s;
}
.cycle-step i { font-style: normal; font-family: var(--f-mono); font-size: .72rem; opacity: .8; }
.cycle-step.done { color: var(--ink-2); background: var(--paper-2); }
.cycle-step.done i::before { content: "✓ "; }
.cycle-step.now { background: var(--ink); color: #fff; }

/* ---------- bench ---------- */
.bench {
  min-height: 0; display: grid; gap: 12px;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(320px, 370px);
  padding-block: 12px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px));
}
.panel {
  min-height: 0; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden;
}
.panel-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
.panel-tabs button {
  flex: 1; border: 0; background: transparent; padding: .45rem .5rem; border-radius: 10px; min-height: 38px;
  font-weight: 600; font-size: .88rem; color: var(--ink-2); cursor: pointer;
}
.panel-tabs button[aria-selected="true"] { background: var(--paper-2); color: var(--ink); }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- stage ---------- */
.stage-wrap { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.stage {
  position: relative; flex: 1; min-height: 320px; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(#bfe0ff, #eaf5ff); border: 1px solid var(--line);
  touch-action: none;
}
.stage canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud {
  position: absolute; top: 10px; left: 10px; display: grid; grid-template-columns: repeat(2, auto); gap: 6px;
  pointer-events: none; max-width: calc(100% - 20px);
}
.meter {
  background: rgba(255,255,255,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 10px; padding: .3rem .6rem; min-width: 7.2rem; box-shadow: 0 1px 3px rgba(19,35,58,.12);
}
.meter .label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: block; }
.meter .value { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.meter .value small { font-size: .72em; color: var(--ink-2); font-weight: 500; margin-left: .2em; }
.meter.alert .value { color: var(--bad); }
.stage-badge {
  position: absolute; top: 10px; right: 10px; padding: .3rem .7rem; border-radius: 999px;
  background: rgba(255,255,255,.9); font-size: .78rem; font-weight: 700; color: var(--ink-2);
  box-shadow: 0 1px 3px rgba(19,35,58,.12); max-width: 50%;
}
.stage-overlay {
  position: absolute; inset: auto 10px 10px 10px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  pointer-events: none;
}
.stage-overlay > * { pointer-events: auto; }
.stage-msg {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: rgba(255,255,255,.95); border-radius: var(--r-md); padding: 1rem 1.25rem; text-align: center;
  box-shadow: var(--shadow); max-width: min(420px, 90%);
}
.stage-msg h3 { font-size: 1.35rem; margin-bottom: .25rem; }
.stage-msg.center { top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.runbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px;
}
.runbar .spacer { flex: 1; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button {
  border: 0; background: var(--surface); min-height: 36px; padding: 0 .7rem; cursor: pointer; font-weight: 600;
  font-size: .85rem; color: var(--ink-2);
}
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.thruster-pad { display: flex; gap: 10px; }
.thruster-pad .btn { min-height: 56px; min-width: 120px; font-size: 1rem; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.thruster-pad .btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- mission card ---------- */
.mission-head { display: flex; flex-direction: column; gap: .35rem; }
.mission-head h2 { font-size: 1.45rem; }
.mission-nav { display: flex; gap: 5px; flex-wrap: wrap; }
.mission-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--f-mono); font-weight: 600; font-size: .82rem; cursor: pointer; color: var(--ink-2);
}
.mission-dot.current { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.mission-dot.complete { background: var(--good); border-color: var(--good); color: #fff; }
.mission-dot:disabled { opacity: .4; cursor: not-allowed; }
.block { display: flex; flex-direction: column; gap: .5rem; }
.block h3 { font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.tag { font-family: var(--f-body); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 999px; }
.tag.observe { background: var(--paper-2); color: var(--ink-2); }
.tag.predict { background: var(--predict-soft); color: var(--predict); }
.tag.measure { background: var(--measure-soft); color: var(--measure); }
.tag.explain { background: var(--accent-soft); color: var(--accent-ink); }
.prose { color: var(--ink-2); font-size: .95rem; }
.prose strong { color: var(--ink); }
.goal { background: var(--paper); border-radius: var(--r-md); padding: .65rem .8rem; font-size: .92rem; }
.goal b { color: var(--ink); }

.predict-box { border: 2px dashed var(--predict); border-radius: var(--r-md); padding: .8rem; background: var(--predict-soft); display: flex; flex-direction: column; gap: .6rem; }
.predict-box.locked { border-style: solid; }
.predict-box .q { font-weight: 600; }
.predict-input { display: flex; align-items: center; gap: .5rem; }
.predict-input input[type="number"] {
  width: 7.5rem; min-height: var(--tap); border-radius: 10px; border: 1.5px solid var(--predict); padding: 0 .6rem;
  font-family: var(--f-mono); font-size: 1.05rem; background: var(--surface);
}
.choice-list { display: flex; flex-direction: column; gap: 6px; }
.choice {
  display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .7rem; min-height: var(--tap);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left;
  font-size: .93rem;
}
.choice input { margin-top: .25rem; accent-color: var(--predict); }
.choice.selected { border-color: var(--predict); }
.choice.correct { border-color: var(--good); background: var(--good-soft); }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.reason { width: 100%; min-height: 64px; border-radius: 10px; border: 1.5px solid var(--line); padding: .5rem .6rem; background: var(--surface); resize: vertical; font-size: .92rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare > div { border-radius: var(--r-md); padding: .55rem .7rem; }
.compare .p { background: var(--predict-soft); }
.compare .m { background: var(--measure-soft); }
.compare .label { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.compare .p .label { color: var(--predict); }
.compare .m .label { color: var(--measure); }
.compare .num { font-size: 1.25rem; font-weight: 600; display: block; }

.feedback { border-radius: var(--r-md); padding: .7rem .85rem; font-size: .93rem; display: flex; flex-direction: column; gap: .35rem; }
.feedback.good { background: var(--good-soft); }
.feedback.warn { background: var(--warn-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback.info { background: var(--paper); }
.feedback strong { font-family: var(--f-display); font-size: 1.05rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.checklist li { display: flex; gap: .5rem; align-items: baseline; }
.checklist li::before { content: "○"; font-weight: 700; color: var(--ink-3); width: 1em; flex: none; }
.checklist li.ok::before { content: "✓"; color: var(--good); }
.checklist li.no::before { content: "✕"; color: var(--bad); }
.law {
  border-left: 4px solid var(--measure); background: var(--measure-soft); padding: .6rem .8rem; border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: .93rem;
}
.law .eyebrow { color: var(--measure); }
.simnote { font-size: .8rem; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: .6rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- controls ---------- */
.ctl-group { display: flex; flex-direction: column; gap: 12px; }
.ctl { display: flex; flex-direction: column; gap: 4px; }
.ctl-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.ctl label, .ctl .lbl { font-weight: 600; font-size: .9rem; }
.ctl output { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .92rem; font-weight: 600; }
.ctl .help { font-size: .78rem; color: var(--ink-3); }
.ctl.locked { opacity: .55; }
.ctl.locked .lbl::after, .ctl.locked .ctl-top label::after { content: " · fixed"; font-weight: 500; color: var(--ink-3); font-size: .8em; }
input[type="range"] { width: 100%; height: var(--tap); accent-color: var(--accent); margin: 0; cursor: pointer; }
input[type="range"]:disabled { cursor: not-allowed; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: var(--tap); cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { cursor: not-allowed; }
.options { display: flex; flex-wrap: wrap; gap: 6px; }
.options button {
  flex: 1 1 auto; min-height: 40px; padding: 0 .75rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
  font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--ink-2);
}
.options button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.options button:disabled { cursor: not-allowed; }

/* ---------- graphs ---------- */
.graph-card { display: flex; flex-direction: column; gap: 6px; }
.graph-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.graph-tabs button {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: .2rem .65rem; min-height: 32px;
  font-size: .8rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.graph-tabs button[aria-selected="true"] { border-color: var(--ink); color: var(--ink); }
.graph-canvas { width: 100%; height: 220px; display: block; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--grid); touch-action: pan-y; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .78rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }
.energy-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; height: 130px; padding: 6px 4px 0; border-bottom: 1.5px solid var(--line); }
.energy-bars .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.energy-bars .fill { width: 70%; border-radius: 6px 6px 0 0; transition: height .08s linear; min-height: 1px; }
.energy-bars .cap { font-family: var(--f-mono); font-size: .72rem; }
.energy-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; font-size: .75rem; font-weight: 600; color: var(--ink-2); }

/* ---------- notebook ---------- */
.nb-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.nb-table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.nb-table th, .nb-table td { padding: .4rem .55rem; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.nb-table th { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); position: sticky; top: 0; }
.nb-table td.num { text-align: right; }
.nb-table td .p { color: var(--predict); font-weight: 600; }
.nb-table td .m { color: var(--measure); font-weight: 600; }
.empty { color: var(--ink-3); font-size: .9rem; padding: .75rem; text-align: center; }

/* ---------- teacher ---------- */
.teacher h3 { font-size: 1.05rem; margin-top: .25rem; }
.teacher ul, .teacher ol { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; color: var(--ink-2); }
.teacher .meta { display: flex; gap: .5rem; flex-wrap: wrap; }
.teacher .meta span { background: var(--paper-2); border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; font-weight: 600; }
.myth { border: 1px solid var(--line); border-radius: var(--r-md); padding: .6rem .75rem; display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
.myth .m1 { color: var(--bad); font-weight: 600; }
.myth .m2 { color: var(--good); font-weight: 600; }
.answer-key { background: var(--paper); border-radius: var(--r-md); padding: .6rem .75rem; font-size: .9rem; }
details summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }

/* ---------- toast ---------- */
.toast-zone { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 12px; font-size: .9rem; box-shadow: var(--shadow); animation: toastIn .25s ease-out; text-align: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .lab { height: auto; min-height: 100%; }
  .bench { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stage stage" "mission tools"; }
  .stage-wrap { grid-area: stage; }
  .bench > .mission-panel { grid-area: mission; }
  .bench > .tools-panel { grid-area: tools; }
  .stage { min-height: 56vh; }
  .panel { overflow: visible; }
  .panel-body { overflow: visible; }
}
@media (max-width: 760px) {
  :root { font-size: 15px; }
  .bench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "mission" "tools"; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .stage { min-height: 62vh; }
  .hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meter { min-width: 0; padding: .2rem .45rem; }
  .meter .value { font-size: .9rem; }
  .meter.secondary { display: none; }
  .stage-badge { display: none; }
  .brand-text small { display: none; }
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topbar .brand { flex: 1 1 100%; }
  .topbar .spacer { display: none; }
  .big-btn { display: none; }
  .score-chip { margin-right: auto; }
  .score-chip { font-size: .8rem; }
  .thruster-pad .btn { min-width: 0; flex: 1; }
  .thruster-pad { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.app-root { height: 100%; }
.editor-canvas { height: 190px; touch-action: none; cursor: grab; }
.editor-canvas:active { cursor: grabbing; }

.range-row { display: flex; align-items: center; gap: 6px; }
.range-row input[type="range"] { flex: 1; min-width: 0; }
.nudge { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 1.1rem; cursor: pointer; color: var(--ink); line-height: 1; }
.nudge:hover:not(:disabled) { border-color: var(--ink-3); }
.nudge:disabled { opacity: .45; cursor: not-allowed; }
html[data-scale="big"] .nudge { width: 48px; height: 48px; }
.bridge-canvas { height: 230px; touch-action: none; cursor: crosshair; }
.bridge-status { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; }
.bridge-status span { background: var(--paper); border-radius: 999px; padding: .15rem .6rem; font-weight: 600; color: var(--ink-2); }
.bridge-status span.bad { background: var(--bad-soft); color: var(--bad); }
.bridge-status span.ok { background: var(--good-soft); color: var(--good); }
.spectro-wrap { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 96px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(19,35,58,.25); }
.spectro { width: 100%; height: 100%; display: block; }
@media (max-width: 760px) { .spectro-wrap { height: 84px; } }
