/* Gas Law Garage: the garage's gas test bay. Scene drawn by art.js (colors from the --gg-* properties below). */
html {
  --gg-wall: #c9ced3; --gg-wall2: #bcc2c8; --gg-wall-line: #a9b0b7; --gg-peg: #c9a46a; --gg-peg-hole: #8a6a3a; --gg-peg-edge: #8a6a3a;
  --gg-wood1: #b07a45; --gg-wood2: #7a4b22; --gg-wood-line: #4f2e12;
  --gg-steel1: #eef1f4; --gg-steel2: #b5bdc5; --gg-steel3: #7d868f; --gg-line: #2a2f35; --gg-glass: #8fb3c4; --gg-scale: #4d6573;
  --gg-ink: #1d2a36; --gg-sign: #f4d35e; --gg-board: #24352d; --gg-board-edge: #8a6a3a; --gg-log: #e9f5ee; --gg-log-k: #f4d35e;
  --gg-bal: #e63b3b; --gg-bal2: #9b1d1d; --gg-dot: #4fa3c9; --gg-dot2: #1d5a78; --gg-gas: #bfe3f2;
  --gg-hot: #ff8a3d; --gg-cold: #7cc4ff; --gg-frost: #e8f6ff; --gg-coil: #6b4a3a; --gg-coil-hot: #ff6a1a;
  --gg-push: #c0392b; --gg-active: #21576b; --gg-off: #a7adb3; --gg-tgt: #c05a00;
  --gg-tag: rgba(255,255,255,.95); --gg-warn: #9c2a17;
  --gg-panel-bg1: #f3f7f9; --gg-panel-bg2: #e3edf1; --gg-accent: #21576b; --gg-ok: #13704a; --gg-bad: #b3261e; --gg-card: #ffffff;
}
html[data-theme="dark"] {
  --gg-wall: #30363c; --gg-wall2: #2a2f35; --gg-wall-line: #22272c; --gg-peg: #7a6140; --gg-peg-hole: #3d2f1c; --gg-peg-edge: #5a4527;
  --gg-wood1: #7a5330; --gg-wood2: #4f3218; --gg-wood-line: #b88a5c;
  --gg-steel1: #9aa4ad; --gg-steel2: #6c757e; --gg-steel3: #474e55; --gg-line: #0f1215; --gg-glass: #7d9cab; --gg-scale: #b9c8d4;
  --gg-ink: #e8eef3; --gg-sign: #c9a93a; --gg-board: #18241e; --gg-board-edge: #5a4527;
  --gg-dot: #7cc9ea; --gg-dot2: #2b7096; --gg-gas: #3d6f86;
  --gg-frost: #cfe9ff; --gg-push: #ff7a6b; --gg-active: #7fc6de; --gg-off: #59626b; --gg-tgt: #ffad5c;
  --gg-tag: rgba(20,28,36,.95); --gg-warn: #ff9b8a;
  --gg-panel-bg1: #1f2a30; --gg-panel-bg2: #182227; --gg-accent: #7fc6de; --gg-ok: #4fd08c; --gg-bad: #ff8a80; --gg-card: #1f2630;
}

/* ── layout: bench (drawing + equipment) | panel (ticket, predictions, test) ── */
.gg { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 10px; padding: 8px 10px;
  color: var(--tlg-text); font-size: 16px; }
.gg input, .gg button { font: inherit; }
.gg-bench { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.gg-scene { flex: 0 1 auto; min-height: 0; display: flex; justify-content: center; }
.gg-svg { display: block; width: 100%; height: auto; max-height: 300px; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.gg-svg text { font-family: var(--tlg-font, system-ui, sans-serif); }
.gg-caption { margin: 0; min-height: 22px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--gg-ink); }
.gg-caption.is-warn { color: var(--gg-warn); }
.gg-parts { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.25fr) minmax(0, .75fr); gap: 8px; }
.gg-panel { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 10px;
  background: linear-gradient(var(--gg-panel-bg1), var(--gg-panel-bg2)); color: var(--gg-ink); border: 3px solid var(--gg-accent);
  border-radius: 14px; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.gg-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gg-accent); }

/* ticket */
.gg-ticket { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; margin: 0; padding: 6px 8px; font-size: 16px; line-height: 1.25;
  background: var(--gg-card); border: 2px dashed var(--tlg-border, #c9cfd6); border-radius: 10px; }
.gg-ticket dt { font-weight: 800; }
.gg-ticket dd { margin: 0; }

/* cards */
.gg-card { display: grid; gap: 4px; align-content: start; padding: 6px 8px; background: var(--gg-card); color: var(--gg-ink);
  border: 2px solid var(--tlg-border, #c9cfd6); border-radius: 12px; min-width: 0; }
.gg-step { padding: 0; background: none; border: 0; }
.gg-card-h { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 17px; line-height: 1.15; }
.gg-card-b { display: grid; gap: 5px; }
.gg-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gg-accent);
  color: #fff; font-size: 16px; font-weight: 800; }
html[data-theme="dark"] .gg-n { color: #10242c; }
.gg-card.is-done .gg-n { background: var(--gg-ok); }
.gg-group { display: grid; gap: 2px; min-width: 0; }
.gg-group-l { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: 16px; font-weight: 700; line-height: 1.2; }
.gg-fixed-note { margin: 0; font-size: 16px; font-style: italic; opacity: .8; }

/* tiles (radio groups) */
.gg-tiles-w { display: grid; gap: 3px; }
.gg-tiles { display: grid; gap: 5px; }
.gg-tiles--act { grid-template-columns: 1fr 1fr; }
.gg-tiles--dial { grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); }
.gg-tiles--dial.is-k { grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); }
.gg-tiles--fix { grid-template-columns: 1fr 1fr; }
.gg-tiles--dir { grid-template-columns: 1fr 1fr 1fr; }
.gg-tile { position: relative; display: block; cursor: pointer; min-width: 0; }
.gg-tile-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.gg-tile-b { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 2px 5px;
  border: 2px solid #9fb2bc; border-radius: 9px; background: var(--gg-card); color: var(--gg-ink); line-height: 1.1; text-align: center; }
.gg-tile-b b { font-size: 16px; }
.gg-tile-b i { font-style: normal; }
.gg-tiles--act .gg-tile-b { justify-content: flex-start; text-align: left; min-height: 48px; padding: 3px 6px; }
.gg-tiles--act .gg-tile-b span { display: grid; }
.gg-tiles--act .gg-tile-b small { font-size: 16px; opacity: .8; line-height: 1.1; }
.gg-tiles--act .gg-tile-b i { font-size: 16px; width: 20px; text-align: center; flex: none; }
.gg-tiles--dial .gg-tile-b { padding: 2px 2px; font-variant-numeric: tabular-nums; }
.gg-tile-in:checked + .gg-tile-b { border-color: var(--gg-accent); background: var(--gg-accent); color: #fff; box-shadow: 0 2px 6px rgba(33,87,107,.35); }
html[data-theme="dark"] .gg-tile-in:checked + .gg-tile-b { color: #10242c; }
.gg-tile-in:focus-visible + .gg-tile-b { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.gg-tile-in:disabled, .gg-tile-in:disabled + .gg-tile-b { cursor: default; }
.is-sealed .gg-panel .gg-tile-b, .is-locked .gg-tile-b { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(33,87,107,.08) 6px 12px); }

/* number fields */
.gg-num { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 2px 8px; }
.gg-num-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.gg-num input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 17px; min-height: 40px; padding: 4px 8px; border: 2px solid #8ba5b0;
  border-radius: 8px; background: #fff; color: #1f2a30; }
html[data-theme="dark"] .gg-num input { background: #141c21; color: #eef4f7; border-color: #5d7e8b; }
.gg-num input:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.gg-num input:disabled { opacity: 1; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(33,87,107,.09) 6px 12px), #eef3f5; color: #1f2a30; }
html[data-theme="dark"] .gg-num input:disabled { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(127,198,222,.1) 6px 12px), #18232a; color: #eef4f7; }
.gg-unit { font-weight: 700; white-space: nowrap; }
.gg-mark { font-weight: 800; font-size: 16px; }
.gg-mark.is-ok { color: var(--gg-ok); }
.gg-mark.is-bad { color: var(--gg-bad); }
.gg-seal { margin: 0; font-size: 16px; font-weight: 700; color: var(--gg-accent); }

/* test */
.gg-run { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; flex: none; margin-top: auto; padding: 6px 12px;
  border: 0; border-radius: 10px; background: var(--gg-accent); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 0 rgba(0,0,0,.25); }
html[data-theme="dark"] .gg-run { color: #10242c; }
.gg-run:hover:not(:disabled) { filter: brightness(1.08); }
.gg-run:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 3px; }
.gg-run:disabled { opacity: .55; cursor: default; box-shadow: none; }
.gg-run.is-done, html[data-theme="dark"] .gg-run.is-done { background: transparent; color: var(--gg-accent); border: 2px solid var(--gg-accent); opacity: 1; font-size: 16px; font-weight: 700; }

/* ── the bay drawing ── */
.gg-sign-t { font-size: 17px; font-weight: 900; fill: #2b2f33; letter-spacing: .06em; }
.gg-sign-s { font-size: 16px; font-weight: 700; fill: #2b2f33; }
.gg-line { fill: none; stroke: var(--gg-off); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 9; }
.gg-line--gauge { stroke: var(--gg-steel3); stroke-dasharray: none; stroke-width: 5; }
.is-press .gg-line--press, .is-gas .gg-line--gas { stroke: var(--gg-active); stroke-dasharray: none; }
.gg-led { fill: #6b747c; }
.is-press .gg-led { fill: #3fd47a; }
.gg-gauge-t { font-size: 16px; font-weight: 800; fill: #2b2f33; }
.gg-gauge--dev .gg-gauge-t { font-size: 16px; }
.gg-gauge .gg-needle { transition: none; }
.gg-tgt { stroke: var(--gg-tgt); stroke-width: 4; stroke-dasharray: 3 2; fill: none; }
.gg-tgt-head { fill: var(--gg-tgt); }
.gg-thermo-fill { fill: #e2552d; }
.gg-thermo-bulb { fill: #e2552d; }
.gg-tint { fill-opacity: 0; }
.gg-coil-w { fill: none; stroke: var(--gg-coil); stroke-width: 4; stroke-linejoin: round; }
.gg-coil-glow { opacity: calc(var(--gg-heat, 0) * 1); }
.gg-coil-w { stroke: color-mix(in srgb, var(--gg-coil-hot) calc(var(--gg-heat, 0) * 100%), var(--gg-coil)); }
.gg-frost { opacity: var(--gg-chill, 0); }
.gg-gas { fill: var(--gg-gas); fill-opacity: .55; }
.gg-gas--ring { fill: none; stroke: var(--gg-gas); stroke-opacity: .35; }
.gg-gas--win { fill: var(--gg-gas); fill-opacity: .75; stroke: rgba(0,0,0,.35); stroke-width: 1.5; }
.gg-dev--balloon .gg-gas--skin { fill: url(#gg-g-bal); fill-opacity: .8; }
.gg-dev--weather .gg-gas--skin { fill: url(#gg-g-wea); fill-opacity: .85; }
.gg-ghost-l { fill: none; stroke: var(--gg-ink); stroke-width: 2.5; stroke-dasharray: 7 5; opacity: .75; }
.gg-ghost-t { font-size: 16px; font-weight: 800; fill: var(--gg-ink); paint-order: stroke; stroke: var(--gg-wall); stroke-width: 4px; }
.is-revealed .gg-model { display: none; }
.gg-push path { stroke: var(--gg-push); fill: none; stroke-linecap: round; }
.gg-model { font-size: 16px; font-weight: 700; fill: #f3e6d4; letter-spacing: .02em; }
.gg-log-h { font-size: 16px; font-weight: 900; fill: var(--gg-log-k); letter-spacing: .1em; }
.gg-log-k { font-size: 16px; font-weight: 900; fill: var(--gg-log-k); letter-spacing: .06em; }
.gg-log-t { font-size: 16px; font-weight: 700; fill: var(--gg-log); font-family: ui-monospace, Menlo, Consolas, monospace !important; }
.gg-log-s { font-size: 16px; font-style: italic; fill: var(--gg-log); opacity: .8; }
.gg-warn rect { fill: var(--gg-tag); stroke: var(--gg-warn); stroke-width: 2; }
.gg-warn text { font-size: 16px; font-weight: 700; fill: var(--gg-ink); }
.gg-warn .gg-warn-h { font-weight: 900; fill: var(--gg-warn); }
.gg-law rect { fill: var(--gg-tag); stroke: var(--gg-accent); stroke-width: 2; }
.gg-law text { font-size: 18px; font-weight: 800; fill: var(--gg-ink); }
.gg-law.is-pop { animation: gg-fade .5s ease-out both; }
@keyframes gg-fade { from { opacity: 0; } to { opacity: 1; } }
.gg-g-dev.is-cheer { animation: gg-hop .45s ease-in-out 2; transform-box: fill-box; transform-origin: center bottom; }
@keyframes gg-hop { 50% { transform: translateY(-5px); } }
.gg-ex { display: block; width: 100%; max-width: 520px; }
.gg-ex-h { font-size: 16px; font-weight: 800; fill: var(--gg-ink); }
.gg-ex-t { font-size: 16px; font-weight: 700; fill: var(--gg-ink); }

@media (max-width: 900px) {
  .gg { position: static; grid-template-columns: 1fr; }
  .gg-panel { overflow: visible; }
  .gg-svg { max-height: none; }
}
@media (max-width: 600px) {
  .gg-parts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .gg *, .gg *::before { animation: none !important; transition: none !important; }
}
