.sign-lab { min-width: 0; --lab-ink: #2b2244; --lab-line: #b7a7c8; --lab-paper: #fffdf6; }
.lab-world { overflow: hidden; border: 1px solid #a7bea2; border-radius: 1rem; background: #e3efda; }
.lab-map { display: block; width: 100%; height: auto; }
.lab-paths { fill: none; stroke: #fff5dc; stroke-width: 24; stroke-linecap: round; stroke-linejoin: round; }
.lab-track { fill: none; stroke: var(--trail); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.lab-person-0 { --trail: #21705c; --badge: #c0e6d2; }
.lab-person-1 { --trail: #6f4aaa; --badge: #e4d3f6; }
.lab-track.lab-person-1 { stroke-width: 4; stroke-dasharray: 1.8 2; }
.lab-visitor-back { fill: var(--badge); stroke: var(--trail); stroke-width: 2.5; }
.lab-scarf { fill: var(--trail); }
.lab-spots [data-point] { cursor: pointer; }
.lab-map-hit { fill: transparent; }
.lab-dot { fill: #fff8ea; stroke: #625377; stroke-width: 2.5; }
.lab-spots [data-point]:hover .lab-dot, .lab-point-active .lab-dot { fill: #eadcfd; stroke: #5d4099; stroke-width: 4; }
.lab-visitors, .lab-sign { pointer-events: none; }
.lab-spots text, .lab-letter { fill: var(--lab-ink); font: 800 18px system-ui, sans-serif; }
.lab-spots text { pointer-events: none; }
.lab-letter { paint-order: stroke; stroke: #e3efda; stroke-width: 4px; }
.lab-legend { display: flex; gap: .5rem; align-items: center; padding: .55rem .75rem; border-top: 1px solid #a7bea2; color: #254b3e; font-size: .88rem; font-weight: 750; }
.lab-key { width: .85rem; height: .85rem; flex: none; border: 2px solid #59436f; border-radius: .24rem; background: #ffcf76; }
.lab-path-note { margin: .65rem 0 .8rem; color: #50455e; font-size: .88rem; }
.lab-label, .lab-why, .lab-record-title { margin: .65rem 0 .42rem; font-weight: 780; }
.lab-buttons, .lab-reasons { display: grid; gap: .46rem; }
.lab-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sign-lab button { min-height: 46px; min-width: 0; max-width: 100%; padding: .58rem .7rem; border: 1px solid var(--lab-line); border-radius: .66rem; background: var(--lab-paper); color: var(--lab-ink); font: inherit; font-weight: 700; text-align: start; cursor: pointer; overflow-wrap: anywhere; }
.sign-lab button:hover { background: #f1e7fb; }
.sign-lab button[aria-pressed="true"] { border-color: #5c459d; background: #e9dffa; box-shadow: inset 0 0 0 1px #5c459d; }
.sign-lab button:focus-visible { outline: 3px solid #6647b3; outline-offset: 3px; }
.lab-place { display: flex; align-items: center; gap: .45rem; }
.lab-num { display: inline-grid; width: 1.5rem; height: 1.5rem; flex: none; place-items: center; border: 1px solid #b8a0da; border-radius: .42rem; background: #f3e8ff; font-size: .86rem; }
.sign-lab .lab-run { display: block; width: 100%; margin-top: .66rem; border-color: #ae7d3b; background: #ffcc72; text-align: center; box-shadow: 0 3px 0 #a2733a; }
.sign-lab .lab-run:hover { background: #ffe0a3; }
.sign-lab .lab-run:disabled { border-color: #d4cadf; background: #eae4ef; color: #594f65; box-shadow: none; cursor: default; }
.lab-result, .lab-reason-feedback { margin: .72rem 0 0; padding: .63rem .75rem; border-inline-start: 4px solid #9172bc; border-radius: .55rem; background: #f0e7fb; }
.lab-result:empty, .lab-reason-feedback:empty { margin: 0; padding: 0; border: 0; }
.lab-result.lab-hit { border-color: #3b8d74; background: #e0f0e3; }
.lab-trials { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; font-size: .92rem; }
.lab-trials li { padding: .38rem .6rem; border-radius: .48rem; background: #f4edf9; }
.lab-nudge { margin: .45rem 0 0; color: #51465e; }
.lab-nudge:empty { margin: 0; }
.lab-explain { margin-top: .85rem; padding-top: .25rem; border-top: 1px solid #ddd1e5; }
@media (prefers-reduced-motion: no-preference) {
  .lab-track.lab-animate { animation: lab-route .65s ease-out both; }
  @keyframes lab-route { from { opacity: 0; } to { opacity: .9; } }
}
@media (max-width: 550px) {
  .lab-buttons { grid-template-columns: minmax(0, 1fr); }
}
