/* Cut the Busywork */
.ghead { padding-bottom: 24px; }
.game { padding-top: 18px; }
.lvl-title { margin: 0 0 16px; font-size: 1.15rem; letter-spacing: -.01em; }
.board { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 6px 0; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.wires path { fill: none; stroke-width: 3; stroke-linecap: round; }
.wires path.ok { stroke: var(--green); }
.wires path.last { stroke: var(--pink); }

.node { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #17212C; text-align: left; font: inherit; color: var(--text); }
.node .cap { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.node .txt { font-weight: 500; line-height: 1.35; }
.start { justify-self: start; min-width: 200px; max-width: 320px; border-color: rgba(74,222,128,.6); background: #13261F; }
.start .cap { color: var(--green); }
.end { justify-self: end; min-width: 200px; max-width: 320px; padding-right: 40px; border-color: rgba(236,72,153,.5); background: #241826; }
.end .cap { color: var(--pink); }
.end .dot { position: absolute; right: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #5A2A44; }
.end.done .dot { background: var(--pink); box-shadow: 0 0 14px var(--pink); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step { cursor: pointer; min-height: 58px; justify-content: center; transition: border-color .15s, background .15s, transform .15s; }
.step:hover:not(:disabled) { border-color: rgba(91,207,230,.7); }
.step:disabled { cursor: default; }
.step .num { position: absolute; top: -9px; left: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #0E1A1F; font-family: var(--mono); font-size: .75rem; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.step.wired { border-color: var(--green); background: #14271F; }
.step.friction { border-style: dashed; border-color: rgba(247,200,115,.7); background: rgba(247,200,115,.06); color: #FBDDA6; }
.step.friction .cap { color: var(--amber); }
.step.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .step.shake { animation: none; } .step { transition: none; } }
@media (max-width: 480px) { .start, .end { min-width: 0; max-width: 85%; } .step { min-height: 64px; padding: 10px 12px; font-size: .95rem; } }
.game .overlay { inset: 0; }
