/* Junkyard Magnet: a salvage yard (lifting crane / generator stand). Scene by art.js, colors from the --jm-* properties
   below (light and dark). */
html {
  --jm-sky1: #cfe3ee; --jm-sky2: #eef4f2; --jm-dusk1: #4f6390; --jm-dusk2: #e8b98d; --jm-modelink: #2a2013; --jm-heap1: #8f9ba3; --jm-heap2: #b9c4c9; --jm-fence: #7c8a92; --jm-ground1: #a59479; --jm-ground2: #7f6f58;
  --jm-pebble: #5e5241; --jm-line: #22313a; --jm-cable: #3d4a52; --jm-card: #ffffff; --jm-label: #1d2a31; --jm-glass: rgba(230, 244, 250, .85);
  --jm-field: #6a3fb5; --jm-current: #e8a10c; --jm-arrow: #245b70; --jm-smoke: #7b8389; --jm-house: #f4ead8; --jm-wire: #3a3a3a;
  --jm-win-off: #46535c; --jm-win-dim: #b9953e; --jm-win-on: #ffe06b;
  --jm-ink: #172d38; --jm-panel-bg1: #f6fafb; --jm-panel-bg2: #e7f0f3; --jm-accent: #245b70; --jm-ok: #13704a; --jm-bad: #b3261e;
  --jm-chip: #ffffff; --jm-chip-on: #d9ecf2; --jm-chip-line: #93aab4;
}
html[data-theme="dark"] {
  --jm-sky1: #1b2a35; --jm-sky2: #2a3843; --jm-dusk1: #141a2e; --jm-dusk2: #4a3a46; --jm-modelink: #f4ead8; --jm-heap1: #4d5a62; --jm-heap2: #34424b; --jm-fence: #6a7880; --jm-ground1: #4f4637; --jm-ground2: #383126;
  --jm-pebble: #2a241b; --jm-line: #0b1216; --jm-cable: #a9b4bb; --jm-card: #eef3f5; --jm-label: #e8eef1; --jm-glass: rgba(200, 225, 235, .7);
  --jm-field: #b79cff; --jm-current: #ffc23d; --jm-arrow: #8fd0e6; --jm-smoke: #9aa3a9; --jm-house: #d9cfbd; --jm-wire: #c9c9c9;
  --jm-win-off: #2a3238; --jm-win-dim: #8d7430; --jm-win-on: #ffe06b;
  --jm-ink: #e6eef1; --jm-panel-bg1: #1d2a31; --jm-panel-bg2: #17222a; --jm-accent: #7cc4dc; --jm-ok: #4fd08c; --jm-bad: #ff8a80;
  --jm-chip: #142027; --jm-chip-on: #20414e; --jm-chip-line: #4f6974;
}
.jm { position: absolute; inset: 0; display: grid; grid-template-columns: 372px minmax(0, 1fr); gap: 12px; padding: 10px; color: var(--tlg-text); font-size: 16px; }
.jm *, .jm *::before { box-sizing: border-box; }
.jm input, .jm button { font: inherit; }
.jm-controls { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 12px;
  background: linear-gradient(var(--jm-panel-bg1), var(--jm-panel-bg2)); color: var(--jm-ink); border: 3px solid var(--jm-accent); border-radius: 14px; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.jm-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; overflow: auto; }
.jm-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--jm-accent); }
.jm-step { display: grid; gap: 4px; }
.jm-step-b { display: grid; gap: 5px; }
.jm-step-h { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 17px; line-height: 1.2; }
.jm-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--jm-accent); color: #fff; font-size: 16px; font-weight: 800; }
html[data-theme="dark"] .jm-n { color: #0f2229; }
.jm-step.is-done .jm-n { background: var(--jm-ok); }
.jm-mark { margin-left: auto; font-weight: 800; white-space: nowrap; font-size: 16px; }
.jm-mark.is-ok, .jm-fmark.is-ok { color: var(--jm-ok); }
.jm-mark.is-bad, .jm-fmark.is-bad { color: var(--jm-bad); }
.jm-fmark { font-weight: 800; white-space: nowrap; }
.jm-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 8px; }
.jm-row--wide, .jm-row--stack, .jm-row--wide3 { grid-template-columns: 1fr; gap: 3px; }
.jm-row-l { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-weight: 700; line-height: 1.2; }
.jm-chips { display: grid; gap: 4px; }
.jm-chips--wide { grid-template-columns: 1fr 1fr; }
.jm-chips--wide3 { grid-template-columns: 1fr 1fr 1.6fr; }
.jm-chips--stack { grid-template-columns: 1fr; }
.jm-chip { position: relative; display: flex; align-items: center; justify-content: center; min-height: 38px; min-width: 0; padding: 3px 12px 3px 6px; border: 2px solid var(--jm-chip-line); border-radius: 10px;
  background: var(--jm-chip); color: var(--jm-ink); font-size: 16px; line-height: 1.15; text-align: center; cursor: pointer; }
.jm-chips--stack .jm-chip { justify-content: flex-start; text-align: left; min-height: 36px; padding-left: 10px; }
.jm-chip:hover:not(:disabled) { border-color: var(--jm-accent); }
.jm-chip:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.jm-chip.is-on { border-color: var(--jm-accent); background: var(--jm-chip-on); font-weight: 800; box-shadow: inset 0 0 0 1px var(--jm-accent); }
.jm-chip.is-on::before { content: ''; position: absolute; left: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--jm-accent); }
.jm-chip-m { position: absolute; right: 4px; bottom: 2px; font-weight: 800; }
.jm-chip.is-key { border-color: var(--jm-ok); box-shadow: inset 0 0 0 2px var(--jm-ok); }
.jm-chip.is-key .jm-chip-m { color: var(--jm-ok); }
.jm-chip.is-wrong { border-color: var(--jm-bad); border-style: dashed; }
.jm-chip.is-wrong .jm-chip-m { color: var(--jm-bad); }
.jm-chip:disabled { cursor: default; opacity: 1; }
.jm-chip:disabled:not(.is-on) { opacity: .7; }
.jm-num { display: flex; align-items: center; gap: 6px; }
.jm-num input { flex: 1 1 auto; min-width: 0; font-size: 17px; min-height: 38px; padding: 3px 8px; border: 2px solid var(--jm-chip-line); border-radius: 8px; background: #fff; color: #1f2a30; }
html[data-theme="dark"] .jm-num input { background: #10191e; color: #eef3f5; }
.jm-num input:disabled { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(36,91,112,.1) 6px 12px), #eef2f3; }
html[data-theme="dark"] .jm-num input:disabled { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(124,196,220,.1) 6px 12px), #1a252b; }
.jm-num input:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.jm-unit { flex: none; min-width: 30px; font-weight: 700; }
.jm-runbar { display: grid; gap: 4px; margin-top: 4px; }
.jm-run { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 12px; border: 3px solid var(--jm-line); background: var(--jm-accent); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
html[data-theme="dark"] .jm-run { color: #0f2229; }
.jm-run:disabled { opacity: .5; cursor: default; }
.jm-run:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.jm-locknote { margin: 0; font-size: 16px; line-height: 1.3; min-height: 1.3em; }
.jm-ticket { flex: none; margin: 0; padding: 6px 12px; border: 2px dashed var(--jm-accent); border-radius: 12px; background: var(--jm-panel-bg1); color: var(--jm-ink); line-height: 1.4; }
.jm-scene { flex: none; border-radius: 12px; overflow: hidden; border: 2px solid var(--jm-line); background: var(--jm-panel-bg2); }
.jm-svgbox:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: -3px; }
.jm-svgbox { overflow-x: auto; }
.jm-svg { display: block; width: 100%; height: auto; }
.jm-t { font-family: var(--tlg-font, sans-serif); font-size: 16px; font-weight: 600; fill: var(--jm-label); }
.jm-inset .jm-t, .jm-induced .jm-t, .jm-blabel, .jm-thermo .jm-temp, .jm-watch .jm-t, .jm-pole .jm-t { fill: #1d2a31; }
.jm-t--b { font-weight: 800; }
.jm .jm-t--ink { fill: #3b2a12; }
.jm .jm-t--white { fill: #ffffff; }
.jm .jm-watch .jm-watchlabel { fill: var(--jm-label); }
.jm-t--s { font-size: 16px; }
.jm-t--xl { font-size: 26px; font-weight: 900; }
.jm-hnum { fill: #1d2a31; font-weight: 800; }
.jm-model { font-style: italic; fill: var(--jm-modelink); }
.jm-readout { padding: 6px 12px; color: var(--jm-ink); border-top: 2px solid var(--jm-line); min-height: 58px; }
.jm-readout p { margin: 0; line-height: 1.35; }
.jm-status { font-weight: 800; }
.jm-status.is-ok { color: var(--jm-ok); }
.jm-status.is-bad { color: var(--jm-bad); }
.jm-about { flex: none; padding: 4px 10px; border: 1px solid var(--tlg-border, #c9d3d8); border-radius: 8px; color: var(--tlg-text); }
.jm-about summary { cursor: pointer; min-height: 32px; font-weight: 700; display: flex; align-items: center; }
.jm-about p { margin: 4px 0; line-height: 1.45; }
.jm-ex { border-collapse: collapse; font-size: 16px; }
.jm-ex caption { text-align: left; font-weight: 700; margin-bottom: 4px; }
.jm-ex th, .jm-ex td { padding: 3px 8px; border-bottom: 1px solid var(--tlg-border, #c9d3d8); text-align: left; }
@media (max-width: 900px) {
  .jm { position: static; grid-template-columns: 1fr; }
  .jm-controls, .jm-right { overflow: visible; }
  .jm-svg { min-width: 640px; }
}
@media (prefers-reduced-motion: reduce) { .jm *, .jm *::before { animation: none !important; transition: none !important; } }
