/* Camera Shop: the shop's optical test bench (shelves of cameras, a dark test hood with a rail, a wooden counter).
   Scene by art.js; colors from the --cs-* properties below (light and dark). The hood interior is dark in both themes. */
html {
  --cs-wall1: #eef1f3; --cs-wall2: #dfe5ea; --cs-wood1: #a77b56; --cs-wood2: #7d5a3e; --cs-line: #24323d; --cs-tag: #fff8e6; --cs-tag-ink: #3a2a1c;
  --cs-ink: #13222d; --cs-panel1: #f6f9fb; --cs-panel2: #e8eff4; --cs-accent: #1d5a7a; --cs-ok: #13704a; --cs-bad: #b3261e;
  --cs-chip: #ffffff; --cs-chip-on: #d7ebf5; --cs-chip-line: #8ea4b3;
}
html[data-theme="dark"] {
  --cs-wall1: #1c2329; --cs-wall2: #161c21; --cs-wood1: #5e4330; --cs-wood2: #3e2c1f; --cs-line: #070b0e; --cs-tag: #f3ead8; --cs-tag-ink: #2b1f14;
  --cs-ink: #e6eef3; --cs-panel1: #1d262d; --cs-panel2: #172027; --cs-accent: #7cc4e8; --cs-ok: #4fd08c; --cs-bad: #ff8a80;
  --cs-chip: #141b20; --cs-chip-on: #1f3a4a; --cs-chip-line: #4e6574;
}
.cs { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 10px; color: var(--tlg-text); font-size: 16px; }
.cs *, .cs *::before { box-sizing: border-box; }
.cs input, .cs button { font: inherit; }

/* controls */
.cs-controls { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 12px;
  background: linear-gradient(var(--cs-panel1), var(--cs-panel2)); color: var(--cs-ink); border: 3px solid var(--cs-accent); border-radius: 14px; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.cs-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cs-accent); }
.cs-step { display: grid; gap: 4px; }
.cs-step-b { display: grid; gap: 4px; }
.cs-step-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; line-height: 1.2; }
.cs-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cs-accent); color: #fff; font-size: 16px; font-weight: 800; }
html[data-theme="dark"] .cs-n { color: #0d1d27; }
.cs-step.is-done .cs-n { background: var(--cs-ok); }
.cs-mark { margin-left: auto; font-weight: 800; font-size: 16px; text-align: right; }
.cs-mark.is-ok, .cs-fmark.is-ok { color: var(--cs-ok); }
.cs-mark.is-bad, .cs-fmark.is-bad { color: var(--cs-bad); }
.cs-q { margin: 0; font-weight: 700; }
.cs-lock { margin: 0; font-size: 16px; opacity: .85; line-height: 1.25; }
.cs.is-tested .cs-lock { opacity: 1; font-weight: 700; }
.cs.is-tested .cs-lock::before { content: '🔒 '; }
.cs.is-locked .cs-lock { display: none; }

.cs-chips { display: grid; gap: 5px; }
.cs-chips--optic { grid-template-columns: 1fr 1fr; }
.cs-chips--focal { grid-template-columns: repeat(4, 1fr); }
.cs-chips--screen { grid-template-columns: 1fr 1fr; }
.cs-chip { position: relative; display: flex; align-items: center; gap: 6px; min-height: 40px; min-width: 0; padding: 3px 18px 3px 7px; border: 2px solid var(--cs-chip-line); border-radius: 10px;
  background: var(--cs-chip); color: var(--cs-ink); font-size: 16px; line-height: 1.15; text-align: left; cursor: pointer; }
.cs-chips--focal .cs-chip { justify-content: center; padding: 3px 6px; }
.cs-chip:hover:not(:disabled) { border-color: var(--cs-accent); }
.cs-chip:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.cs-chip.is-on { border-color: var(--cs-accent); background: var(--cs-chip-on); font-weight: 700; box-shadow: inset 0 0 0 1px var(--cs-accent); }
.cs-chip.is-on::after { content: ''; position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--cs-accent); }
.cs-chip:disabled { cursor: default; opacity: 1; }
.cs-chip:disabled:not(.is-on) { opacity: .6; }
.cs-chip-i { flex: none; display: grid; width: 34px; height: 34px; color: var(--cs-ink); }
.cs-icon { width: 34px; height: 34px; }
.cs-chip-m { position: absolute; right: 6px; bottom: 2px; font-weight: 800; }
.cs-chip.is-key { border-color: var(--cs-ok); box-shadow: inset 0 0 0 2px var(--cs-ok); opacity: 1; }
.cs-chip.is-key .cs-chip-m { color: var(--cs-ok); }
.cs-chip.is-wrong { border-color: var(--cs-bad); border-style: dashed; }
.cs-chip.is-wrong .cs-chip-m { color: var(--cs-bad); }

.cs-slider { display: grid; gap: 2px; }
.cs-slider-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.cs-slider-v { font-weight: 800; color: var(--cs-accent); white-space: nowrap; font-size: 18px; }
.cs-slider input { width: 100%; min-height: 30px; margin: 0; accent-color: var(--cs-accent); cursor: pointer; }
.cs-slider input:disabled { cursor: default; }
.cs-slider input:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.cs-ticks { display: flex; justify-content: space-between; font-size: 16px; opacity: .85; margin-top: -2px; }

.cs-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-num { display: grid; gap: 1px; min-width: 0; }
.cs-num-l { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-weight: 700; line-height: 1.2; }
.cs-fmark { font-weight: 800; }
.cs-num-row { display: flex; align-items: center; gap: 5px; }
.cs-num input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 17px; min-height: 40px; padding: 3px 8px; border: 2px solid var(--cs-chip-line); border-radius: 8px; background: #fff; color: #1f2a30; }
html[data-theme="dark"] .cs-num input { background: #0f1519; color: #eef3f6; }
.cs-num input:disabled { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(29,90,122,.1) 6px 12px), #eef2f5; }
html[data-theme="dark"] .cs-num input:disabled { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(124,196,232,.1) 6px 12px), #1a2228; }
.cs-num input:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.cs-unit { flex: none; font-weight: 700; }

/* right: ticket, bench, readout */
.cs-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; overflow: auto; }
.cs-ticket { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 12px; border: 2px dashed var(--cs-accent); border-radius: 12px;
  background: var(--cs-tag); color: var(--cs-tag-ink); }
.cs-ticket-k { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.cs-pill { padding: 1px 10px; border-radius: 999px; background: #1d5a7a; color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.cs-pill--size { text-transform: none; letter-spacing: 0; font-weight: 600; background: #2b3a44; }
.cs-ticket-r { opacity: .85; }
.cs-scene { flex: none; border-radius: 12px; overflow-x: auto; overflow-y: hidden; border: 2px solid var(--cs-line); background: #0f1a24; }
.cs-scene:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.cs-svg { display: block; width: 100%; height: auto; }
.cs-scene .cs-svg { min-width: 680px; }
.cs-lbl, .cs-tick, .cs-fl, .cs-cap { font-family: var(--tlg-font, system-ui, sans-serif); font-size: 16px; font-weight: 700; fill: #eef5fa;
  paint-order: stroke; stroke: #0b131b; stroke-width: 4px; stroke-linejoin: round; }
.cs-lbl--big { font-size: 20px; }
.cs-fl { fill: #bcd9ec; }
.cs-tick { fill: #dfe7ee; font-weight: 600; }
.cs-cap { fill: #fff6c8; stroke: none; }
.cs-tagtext { font-family: var(--tlg-font, system-ui, sans-serif); font-size: 16px; font-weight: 700; fill: var(--cs-tag-ink); }
.cs-pulse { fill: #fff6c8; filter: drop-shadow(0 0 4px #ffd84a); }
.cs-svg.is-tested .cs-rays path { stroke-width: 3; }
.cs-svg.is-revealed .cs-img { filter: drop-shadow(0 0 6px #ffcf9a); }
.cs-bar { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: var(--cs-panel2); color: var(--cs-ink); }
.cs-run { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 4px 16px; border-radius: 12px; border: 3px solid var(--cs-line); background: var(--cs-accent); color: #fff;
  font-size: 17px; font-weight: 800; cursor: pointer; }
.cs-run::before { content: '📷'; }
html[data-theme="dark"] .cs-run { color: #0d1d27; }
.cs-run:disabled { opacity: .45; cursor: default; }
.cs-run:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.cs-observation { margin: 0; line-height: 1.35; }
.cs.is-tested .cs-observation { font-weight: 700; }
.cs-legend { flex: none; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 16px; color: var(--tlg-text); }
.cs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cs-sw { display: inline-block; width: 26px; height: 0; border-top: 3px solid #d9a800; }
.cs-sw--ext { border-top: 3px dashed #d9792e; }
.cs-sw--obj { border-top: 5px solid #2fae5e; width: 16px; }
.cs-sw--img { border-top: 5px solid #e8693a; width: 16px; }
.cs-about { flex: none; padding: 2px 10px; border: 1px solid var(--tlg-border); border-radius: 8px; }
.cs-about summary { cursor: pointer; min-height: 32px; font-weight: 700; display: flex; align-items: center; }
.cs-about p { margin: 4px 0; line-height: 1.4; }
@media (max-width: 900px) {
  .cs { position: static; grid-template-columns: 1fr; }
  .cs-controls, .cs-right { overflow: visible; }
  .cs-right { order: -1; }
  .cs-bar { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .cs *, .cs *::before { animation: none !important; transition: none !important; } }
.cs-svg--ex { max-width: 620px; border-radius: 10px; }
