/* GENERATED by tools/build-circuit-css.mjs from circuit-game/style.css — do not edit by hand. */
/* Little Electrical Engineer — fixed 1920×1080 stage scaled to the screen. */

.ls-circuit {
  --ink: #1d2a44;
  --blue: #1e5bd8;
  --blue-dark: #163f9c;
  --sky: #eaf5ff;
  --paper: #fffaf0;
  --yellow: #ffd54f;
  --orange: #ff9800;
  --green: #2e9d4f;
  --red: #e53935;
  --font: 'Baloo Bhaijaan 2', 'Tajawal', 'Segoe UI', Tahoma, 'Arial', sans-serif;
}

.ls-circuit, .ls-circuit * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.ls-circuit {
  margin: 0; height: 100%; overflow: hidden;
  background: #0d1b3a;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  font-family: var(--font);
  color: var(--ink);
}

.ls-circuit button { font-family: inherit; color: inherit; cursor: pointer; touch-action: none; }

.ls-circuit #viewport { position: fixed; inset: 0; overflow: hidden; }
.ls-circuit #stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--sky);
}

.ls-circuit .screen { position: absolute; inset: 0; display: none; }
.ls-circuit .screen.active { display: block; }
.ls-circuit [hidden] { display: none !important; }

/* ------------------------------------------------------------------ attract */
.ls-circuit #screen-attract {
  background: radial-gradient(circle at 50% 35%, #2d6be0 0%, #173b8c 55%, #0d1b3a 100%);
  color: #fff; text-align: center;
}
.ls-circuit #screen-attract .game-name {
  margin: 0; padding-top: 60px;
  font-size: 96px; font-weight: 800;
  text-shadow: 0 6px 0 #0b2466, 0 0 40px #ffeb3b88;
}
.ls-circuit .attract-demo { position: absolute; left: 460px; top: 220px; width: 1000px; height: 560px; }
.ls-circuit .demo-wire { fill: none; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.ls-circuit .demo-flow { fill: none; stroke: #fff59d; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 2 34; opacity: 0; }
.ls-circuit .attract-demo.lit .demo-flow { opacity: 1; animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -36; } }
.ls-circuit .attract-sparky { position: absolute; left: 140px; bottom: 120px; width: 300px; height: 300px; }
.ls-circuit .touch-text {
  position: absolute; left: 0; right: 0; bottom: 70px; margin: 0;
  font-size: 72px; font-weight: 800; color: #fff59d;
  animation: breathe 1.6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.06); text-shadow: 0 0 30px #ffeb3b; } }

.ls-circuit .lang-btn {
  position: absolute; top: 28px; inset-inline-end: 130px;
  min-width: 160px; height: 72px; padding: 0 28px;
  border-radius: 36px; border: 3px solid #ffffff99;
  background: #ffffff22; color: #fff; font-size: 30px; font-weight: 700;
}
.ls-circuit .lang-btn:active { transform: scale(.94); }

/* ------------------------------------------------------------------ menu */
.ls-circuit #screen-menu { background: linear-gradient(160deg, #2a62d6, #173b8c); }
.ls-circuit .menu-title { margin: 0; padding: 60px 0 30px; text-align: center; color: #fff; font-size: 76px; font-weight: 800; }
.ls-circuit #menu-cards {
  display: grid; grid-template-columns: repeat(4, 380px); gap: 36px;
  justify-content: center;
}
.ls-circuit .level-card {
  position: relative; height: 380px; border: none; border-radius: 36px;
  background: #fff; box-shadow: 0 12px 0 #0b2466, 0 20px 40px #0006;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform .12s;
}
.ls-circuit .level-card:active { transform: translateY(8px) scale(.97); box-shadow: 0 4px 0 #0b2466; }
.ls-circuit .level-card .lc-icon { font-size: 110px; line-height: 1.1; }
.ls-circuit .level-card .lc-num { font-size: 28px; font-weight: 700; color: #5a6b8c; }
.ls-circuit .level-card .lc-name { font-size: 40px; font-weight: 800; padding: 0 16px; text-align: center; line-height: 1.15; }
.ls-circuit .level-card .lc-stars { font-size: 46px; letter-spacing: 6px; color: #d7deea; }
.ls-circuit .level-card .lc-stars .on { color: var(--yellow); text-shadow: 0 2px 0 #c77800; }
.ls-circuit .level-card.lab { background: linear-gradient(160deg, #fff8e1, #ffe082); }
.ls-circuit .level-card .lc-badge {
  position: absolute; top: -18px; inset-inline-start: -14px;
  background: var(--red); color: #fff; font-size: 30px; font-weight: 800;
  padding: 6px 22px; border-radius: 30px; transform: rotate(-6deg);
  box-shadow: 0 4px 0 #8e1b1b; animation: wobble 1.8s ease-in-out infinite;
}
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.08); } }

/* ------------------------------------------------------------------ level screen */
.ls-circuit #screen-level.active {
  display: grid;
  grid-template-columns: 240px 1680px;
  grid-template-rows: 100px 860px 120px;
  grid-template-areas: "top top" "tools board" "tools controls";
}
.ls-circuit #topbar {
  grid-area: top; position: relative;
  display: flex; align-items: center; gap: 30px;
  padding-inline: 40px 120px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  color: #fff; box-shadow: 0 4px 12px #0003; z-index: 3;
}
.ls-circuit .tb-text { flex: 1; display: flex; align-items: baseline; gap: 26px; min-width: 0; }
.ls-circuit #level-name {
  font-size: 34px; font-weight: 800; white-space: nowrap;
  background: #ffffff26; padding: 4px 22px; border-radius: 30px;
}
.ls-circuit #challenge { font-size: 38px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-circuit #challenge.bonus { color: #fff59d; animation: breathe 1.6s ease-in-out infinite; }
.ls-circuit #level-stars { font-size: 48px; letter-spacing: 4px; color: #ffffff55; white-space: nowrap; }
.ls-circuit #level-stars .on { color: var(--yellow); }
.ls-circuit #btn-finish {
  height: 72px; padding: 0 30px; border-radius: 36px; border: none;
  background: var(--green); color: #fff; font-size: 32px; font-weight: 800;
  box-shadow: 0 5px 0 #1b6b33;
}
.ls-circuit #btn-finish:active { transform: translateY(4px); box-shadow: 0 1px 0 #1b6b33; }

.ls-circuit #toolbox {
  grid-area: tools; position: relative;
  background: var(--paper);
  border-inline-end: 4px solid #f0dfb8;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
  z-index: 2;
}
.ls-circuit #toolbox.two-col { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px; padding: 14px 10px; }
.ls-circuit .tool-card {
  position: relative; background: #fff; border-radius: 22px;
  box-shadow: 0 5px 0 #e3cf9f, 0 6px 14px #0001;
  height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .1s, opacity .2s;
}
.ls-circuit #toolbox.two-col .tool-card { height: 104px; border-radius: 18px; }
.ls-circuit .tool-card.pressed { transform: scale(1.06); box-shadow: 0 2px 0 #e3cf9f, 0 0 0 5px var(--yellow); }
.ls-circuit .tool-card .tool-icon { width: 150px; height: 80px; pointer-events: none; }
.ls-circuit #toolbox.two-col .tool-icon { width: 92px; height: 56px; }
.ls-circuit .tool-card .tool-icon svg { width: 100%; height: 100%; overflow: visible; }
.ls-circuit .tool-card .tool-label { font-size: 22px; font-weight: 700; pointer-events: none; line-height: 1.1; text-align: center; }
.ls-circuit #toolbox.two-col .tool-label { font-size: 16px; }
.ls-circuit .tool-card .tool-count {
  position: absolute; top: -8px; inset-inline-end: -6px;
  min-width: 52px; height: 40px; padding: 0 8px; border-radius: 20px;
  background: var(--blue); color: #fff; font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  direction: ltr;
}
.ls-circuit #toolbox.two-col .tool-count { min-width: 40px; height: 32px; font-size: 19px; }
.ls-circuit .tool-card.empty { opacity: .38; }
.ls-circuit .tool-card.empty .tool-count { background: #9aa5b8; }
.ls-circuit .tool-card.hint-glow { animation: hintglow 1s ease-in-out infinite; }
@keyframes hintglow { 50% { box-shadow: 0 5px 0 #e3cf9f, 0 0 0 8px #ffeb3b, 0 0 30px 10px #ffeb3b; transform: scale(1.04); } }

.ls-circuit #board-wrap { grid-area: board; position: relative; background: #f4faff; overflow: hidden; }
.ls-circuit #board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.ls-circuit #controls {
  grid-area: controls; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 34px;
  background: #dcebfb; border-top: 4px solid #c5dbf3;
}
.ls-circuit .ctrl {
  width: 96px; height: 96px; border-radius: 26px; border: none;
  background: #fff; box-shadow: 0 6px 0 #a9c3e2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  transition: transform .08s;
}
.ls-circuit .ctrl:active { transform: translateY(5px); box-shadow: 0 1px 0 #a9c3e2; }
.ls-circuit .ctrl .ico { font-size: 44px; line-height: 1; }
.ls-circuit .ctrl .lbl { font-size: 17px; font-weight: 700; line-height: 1.2; }
.ls-circuit #btn-trash.hot { background: #ffcdd2; transform: scale(1.18); box-shadow: 0 0 0 6px var(--red); }

.ls-circuit #fx-board, .ls-circuit #fx-top { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; pointer-events: none; }
.ls-circuit #fx-board { z-index: 4; }

.ls-circuit #sparky {
  position: absolute; bottom: 4px; inset-inline-end: 30px;
  width: 160px; height: 160px; z-index: 6; pointer-events: none;
}
.ls-circuit #bubble {
  position: absolute; bottom: 120px; inset-inline-end: 190px; z-index: 6;
  max-width: 640px; padding: 18px 28px;
  background: #fff; border: 4px solid var(--orange); border-radius: 30px;
  font-size: 32px; font-weight: 700; line-height: 1.3;
  box-shadow: 0 8px 20px #0003; pointer-events: none;
}
.ls-circuit #bubble::after {
  content: ''; position: absolute; bottom: -22px; inset-inline-end: 24px;
  border: 14px solid transparent; border-top: 18px solid var(--orange);
}
.ls-circuit #bubble.pop { animation: bubblepop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bubblepop { from { transform: scale(.4); opacity: 0; } }

.ls-circuit #side-panel {
  position: absolute; left: 20px; top: 20px; width: 340px;
  background: #fffffff0; border-radius: 24px; padding: 14px 18px;
  box-shadow: 0 6px 18px #0002; border: 3px solid #d8e6f6;
  font-size: 22px; pointer-events: none;
}
.ls-circuit #side-panel h4 { margin: 0 0 8px; font-size: 26px; text-align: center; }
.ls-circuit #side-panel .row { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-top: 1px dashed #d3dfec; }
.ls-circuit #side-panel .row svg { width: 56px; height: 30px; flex: none; }
.ls-circuit #side-panel .row .nm { flex: 1; font-weight: 700; }
.ls-circuit #side-panel .row .res { font-weight: 800; color: #9aa5b8; }
.ls-circuit #side-panel .row .res.yes { color: var(--green); }
.ls-circuit #side-panel .row .res.no { color: var(--red); }

/* ------------------------------------------------------------------ board svg */
.ls-circuit .grid circle { fill: #c9d8e8; }
.ls-circuit .wire-hit { fill: none; stroke: transparent; stroke-width: 40; stroke-linecap: round; pointer-events: stroke; }
.ls-circuit .wire-shadow { fill: none; stroke: #0002; stroke-width: 16; stroke-linecap: round; transform: translateY(4px); pointer-events: none; }
.ls-circuit .wire { fill: none; stroke-width: 11; stroke-linecap: round; pointer-events: none; }
.ls-circuit .wire-hl { fill: none; stroke: #ffffff70; stroke-width: 3; stroke-linecap: round; transform: translateY(-2px); pointer-events: none; }
.ls-circuit .wire-g.pressed .wire, .ls-circuit .wire-g.tapped .wire { stroke-width: 15; }
.ls-circuit .wire-g.lifted { opacity: .35; }
.ls-circuit .wire-g.live .wire-shadow { stroke: #ffeb3b55; stroke-width: 22; }
.ls-circuit .wire-draft { fill: none; stroke: #607d8b; stroke-width: 10; stroke-dasharray: 18 12; stroke-linecap: round; pointer-events: none; }
.ls-circuit .ghost-wire { fill: none; stroke: #ff9800; stroke-width: 10; stroke-dasharray: 4 18; stroke-linecap: round; pointer-events: none; animation: ghost 1s linear infinite; }
@keyframes ghost { to { stroke-dashoffset: -44; } }
.ls-circuit .hint-ring { fill: none; stroke: #ff9800; stroke-width: 8; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: ring 1s ease-out infinite; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.ls-circuit .ripple { fill: none; stroke: #1e5bd8; stroke-width: 4; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: rip .5s ease-out forwards; }
@keyframes rip { to { transform: scale(5); opacity: 0; } }
.ls-circuit .wire-marker { stroke: #fff; stroke-width: 4; pointer-events: none; }

.ls-circuit .house .h-roof { fill: #ffccbc; stroke: #d84315; stroke-width: 6; stroke-linejoin: round; opacity: .55; }
.ls-circuit .house .h-walls { fill: #fff3e0; stroke: #d7a86e; stroke-width: 6; opacity: .7; }
.ls-circuit .house .h-divider { stroke: #d7a86e; stroke-width: 5; stroke-dasharray: 14 10; opacity: .7; }
.ls-circuit .house .h-door { fill: #bcaaa4; opacity: .6; }
.ls-circuit .house .h-window { fill: #b3e5fc; stroke: #81d4fa; stroke-width: 5; opacity: .6; }
.ls-circuit .house .h-chimney { fill: #ffab91; opacity: .5; }
.ls-circuit .house .h-label { font-size: 44px; opacity: .55; text-anchor: middle; }

/* parts */
.ls-circuit .part .pop { transform-box: fill-box; transform-origin: center; transition: transform .12s; }
.ls-circuit .part.pressed .pop { transform: scale(1.07); }
.ls-circuit .part.to-trash { opacity: .45; }
.ls-circuit .part.bounce .pop { animation: bounce .38s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bounce { 0% { transform: scale(1.18, .85); } 60% { transform: scale(.95, 1.05); } }
.ls-circuit .part.wiggle .pop { animation: wiggle .42s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

.ls-circuit .lead { stroke: #8795a3; stroke-width: 8; stroke-linecap: round; }
.ls-circuit .term-outer { fill: #c7d1db; stroke: #5f6f7e; stroke-width: 4; transition: fill .1s; }
.ls-circuit .term-inner { fill: #eef2f6; stroke: #8795a3; stroke-width: 2; pointer-events: none; }
.ls-circuit .term-outer.hot { fill: #ffeb3b; stroke: #ff9800; stroke-width: 6; }
.ls-circuit .amps { font: 800 22px var(--font); fill: #1e5bd8; text-anchor: middle; direction: ltr; pointer-events: none; }

.ls-circuit .bat-body { fill: #ffb627; stroke: #7a4b00; stroke-width: 4; }
.ls-circuit .bat-neg { fill: #37404d; }
.ls-circuit .bat-shine { fill: #fff; opacity: .4; }
.ls-circuit .bat-sym { font: 900 38px Arial, sans-serif; fill: #7a4b00; text-anchor: middle; }
.ls-circuit .bat-sym.neg { fill: #fff; }
.ls-circuit .bolt { fill: #fff; opacity: .35; }
.ls-circuit .part-battery.active .bolt { animation: charge .8s ease-in-out infinite; }
@keyframes charge { 50% { opacity: 1; fill: #fffde7; } }
.ls-circuit .part-battery .shake { transform-box: fill-box; transform-origin: center; }
.ls-circuit .part-battery.hot .bat-body { fill: #ff5252; stroke: #b71c1c; }
.ls-circuit .part-battery.hot .shake { animation: shake .12s linear infinite; }
@keyframes shake { 25% { transform: translate(-3px, 1px) rotate(-2deg); } 75% { transform: translate(3px, -1px) rotate(2deg); } }

.ls-circuit .bulb { fill: #eef3f7; stroke: #6d7f91; stroke-width: 4; transition: fill .25s; }
.ls-circuit .lamp-base { fill: #9aa7b4; stroke: #5f6f7e; stroke-width: 3; }
.ls-circuit .lamp-thread { stroke: #6d7d8c; stroke-width: 3; }
.ls-circuit .shine { fill: #fff; opacity: .8; }
.ls-circuit .glow { pointer-events: none; transition: opacity .25s; }
.ls-circuit .face path { fill: none; stroke: #3e4a59; stroke-width: 3.5; stroke-linecap: round; }
.ls-circuit .face .eye { fill: #3e4a59; }
.ls-circuit .face .cheek { fill: #ff8a65; opacity: .7; }
.ls-circuit .face-on, .ls-circuit .face-burnt, .ls-circuit .crack { display: none; }
.ls-circuit .part-lamp.lit .face-on { display: inline; }
.ls-circuit .part-lamp.lit .face-off { display: none; }
.ls-circuit .part-lamp.burnt .face-off, .ls-circuit .part-lamp.burnt .face-on { display: none; }
.ls-circuit .part-lamp.burnt .face-burnt { display: inline; }
.ls-circuit .part-lamp.burnt .crack { display: inline; fill: none; stroke: #424242; stroke-width: 3; }
.ls-circuit .part-lamp.burnt .shine { opacity: .2; }

.ls-circuit .fan-pole { fill: #90a4ae; }
.ls-circuit .fan-base { fill: #4fc3f7; stroke: #0277bd; stroke-width: 4; }
.ls-circuit .blade { fill: #81d4fa; stroke: #0277bd; stroke-width: 3; }
.ls-circuit .hub { fill: #0277bd; }
.ls-circuit .part-fan.on .blade { fill: #b3e5fc; }

.ls-circuit .bell-base { fill: #a1887f; stroke: #5d4037; stroke-width: 3; }
.ls-circuit .bell-dome { fill: #ffca28; stroke: #b8860b; stroke-width: 4; }
.ls-circuit .bell-rim { fill: #ffb300; stroke: #b8860b; stroke-width: 3; }
.ls-circuit .bell-knob { fill: #b8860b; }
.ls-circuit .bell-clapper { fill: #795548; }
.ls-circuit .bell-swing { transform-box: fill-box; transform-origin: 50% 0%; }
.ls-circuit .waves path { fill: none; stroke: #ff9800; stroke-width: 4; stroke-linecap: round; opacity: 0; }
.ls-circuit .part-bell.ringing .bell-swing { animation: ringbell .18s ease-in-out infinite alternate; }
.ls-circuit .part-bell.ringing .waves path { animation: waves .36s ease-in-out infinite alternate; }
@keyframes ringbell { from { transform: rotate(-13deg); } to { transform: rotate(13deg); } }
@keyframes waves { to { opacity: 1; } }

.ls-circuit .sw-base { fill: #d7a86e; stroke: #8d5a2b; stroke-width: 4; }
.ls-circuit .sw-post, .ls-circuit .sw-contact { fill: #c7d1db; stroke: #5f6f7e; stroke-width: 3; }
.ls-circuit .sw-arm { fill: #e53935; stroke: #8e1b1b; stroke-width: 3; }
.ls-circuit .sw-knob { fill: #ff7043; stroke: #8e1b1b; stroke-width: 3; }
.ls-circuit .lever { transition: transform .12s; }
.ls-circuit .part-switch.closed .sw-contact { fill: #ffeb3b; }

.ls-circuit .probe-slot { fill: #fff; stroke: #90a4ae; stroke-width: 4; stroke-dasharray: 10 8; }
.ls-circuit .clip { fill: #c7d1db; stroke: #5f6f7e; stroke-width: 3; }
.ls-circuit .qmark { font: 900 40px Arial, sans-serif; fill: #b0bec5; text-anchor: middle; }
.ls-circuit .part-probe.has-mat .qmark { display: none; }
.ls-circuit .badge { display: none; }
.ls-circuit .part-probe.has-mat .badge { display: inline; }
.ls-circuit .badge circle { stroke: #fff; stroke-width: 4; }
.ls-circuit .badge text { font: 900 30px Arial, sans-serif; fill: #fff; text-anchor: middle; }
.ls-circuit .badge.good circle { fill: var(--green); }
.ls-circuit .badge.bad circle { fill: var(--red); }

.ls-circuit .part.locked .term-outer { stroke: #455a64; }

/* drag ghost */
.ls-circuit #drag-layer { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.ls-circuit .drag-ghost { position: absolute; left: 0; top: 0; filter: drop-shadow(0 12px 10px #0004); }
.ls-circuit .drag-ghost.ghost-part svg { width: 212px; height: 132px; overflow: visible; }
.ls-circuit .drag-ghost.ghost-mat svg { width: 130px; height: 68px; overflow: visible; }
.ls-circuit .drag-ghost.flying { transition: transform .3s ease-in, opacity .3s ease-in; }

/* ------------------------------------------------------------------ Shrara */
.ls-circuit .sparky-svg { width: 100%; height: 100%; overflow: visible; }
.ls-circuit .sp-body { fill: url(#sparkyGrad); stroke: #e65100; stroke-width: 4; stroke-linejoin: round; }
.ls-circuit .sp-aura { fill: #ffeb3b; opacity: .25; }
.ls-circuit .sp-arm path { fill: none; stroke: #e65100; stroke-width: 6; stroke-linecap: round; }
.ls-circuit .sp-arm circle { fill: #ffd54f; stroke: #e65100; stroke-width: 3; }
.ls-circuit .sp-bob { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.ls-circuit .sp-arm-r { transform-origin: 34px 12px; }
.ls-circuit .sp-arm-l { transform-origin: -34px 12px; }
.ls-circuit .waving .sp-arm-r { animation: wave .6s ease-in-out infinite alternate; }
@keyframes wave { from { transform: rotate(10deg); } to { transform: rotate(-40deg); } }
.ls-circuit .sparky-slot.flash .sparky-svg { animation: flashy .3s ease-in-out 6 alternate; }
@keyframes flashy { to { filter: drop-shadow(0 0 22px #ffeb3b) brightness(1.3); transform: scale(1.12); } }
.ls-circuit .sparky-slot.cheer .sparky-svg { animation: cheer .5s ease-in-out 2; }
@keyframes cheer { 40% { transform: translateY(-50px) rotate(-12deg); } 70% { transform: translateY(0) rotate(8deg); } }
.ls-circuit .sparky-slot.cheer .sp-arm { animation: wave .25s ease-in-out infinite alternate; }
.ls-circuit .sparky-slot.worried .sparky-svg { animation: shake .12s linear 10; }

/* ------------------------------------------------------------------ overlays */
.ls-circuit .overlay {
  position: absolute; inset: 0; z-index: 20;
  background: #0d1b3acc; display: flex; align-items: center; justify-content: center;
}
.ls-circuit .card {
  background: #fff; border-radius: 44px; padding: 44px 64px;
  box-shadow: 0 16px 0 #0b2466, 0 30px 60px #0008;
  text-align: center; animation: cardin .45s cubic-bezier(.3, 1.5, .5, 1);
}
@keyframes cardin { from { transform: scale(.5) translateY(80px); opacity: 0; } }
.ls-circuit .card h2 { margin: 0 0 8px; font-size: 72px; font-weight: 800; color: var(--blue-dark); }
.ls-circuit .big-stars { font-size: 110px; letter-spacing: 12px; color: #dde3ec; line-height: 1.1; }
.ls-circuit .big-stars span { display: inline-block; }
.ls-circuit .big-stars .on { color: var(--yellow); text-shadow: 0 5px 0 #c77800; animation: starpop .5s cubic-bezier(.3, 1.8, .5, 1) backwards; }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } }
.ls-circuit .success-card { width: 1100px; }
.ls-circuit .dyk { background: #fff8e1; border: 4px dashed #ffca28; border-radius: 30px; padding: 18px 36px; margin: 18px 0 30px; }
.ls-circuit .dyk h3 { margin: 0; font-size: 40px; color: #e65100; }
.ls-circuit .dyk p { margin: 8px 0 0; font-size: 38px; font-weight: 600; line-height: 1.4; }
.ls-circuit .card-buttons { display: flex; gap: 30px; justify-content: center; }
.ls-circuit .btn {
  min-width: 300px; height: 110px; padding: 0 44px; border-radius: 55px; border: none;
  background: #e3ebf7; font-size: 42px; font-weight: 800;
  box-shadow: 0 8px 0 #a9bad4;
}
.ls-circuit .btn.primary { background: var(--green); color: #fff; box-shadow: 0 8px 0 #1b6b33; }
.ls-circuit .btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #a9bad4; }
.ls-circuit .btn.primary:active { box-shadow: 0 2px 0 #1b6b33; }

.ls-circuit .cert-card { width: 1200px; border: 14px double #ffca28; background: linear-gradient(#fffdf5, #fff6dc); }
.ls-circuit .cert-medal { font-size: 120px; line-height: 1; }
.ls-circuit .cert-sparky { width: 180px; height: 180px; margin: 0 auto; }
.ls-circuit #cert-body { font-size: 44px; font-weight: 700; margin: 6px 0; }
.ls-circuit #cert-stars { margin-bottom: 24px; }
.ls-circuit #cert-stars bdi { color: #c77800; font-size: 90px; font-weight: 800; }

.ls-circuit .idle-card h2 { font-size: 80px; }
.ls-circuit #idle-count { font-size: 200px; font-weight: 800; color: var(--orange); line-height: 1.1; }
.ls-circuit .idle-card p { font-size: 40px; margin: 0; }

.ls-circuit .admin-card { width: 1100px; text-align: start; }
.ls-circuit .admin-card h2 { font-size: 56px; }
.ls-circuit .admin-card h3 { font-size: 32px; margin: 10px 0; }
.ls-circuit .admin-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.ls-circuit .admin-row button { width: 120px; height: 96px; font-size: 40px; border-radius: 24px; border: none; background: #e3ebf7; box-shadow: 0 6px 0 #a9bad4; }
.ls-circuit .admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ls-circuit .admin-grid button {
  height: 96px; font-size: 30px; font-weight: 700; border-radius: 24px; border: none;
  background: #e3ebf7; box-shadow: 0 6px 0 #a9bad4; display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
}
.ls-circuit .admin-grid button b { color: #fff; background: #9aa5b8; border-radius: 16px; padding: 4px 16px; }
.ls-circuit .admin-grid button.on b { background: var(--green); }
.ls-circuit #admin-rounds { font-size: 32px; font-weight: 700; margin: 20px 0; }

.ls-circuit #fx-top { z-index: 30; }

/* supervisor long-press target */
.ls-circuit #logo {
  position: absolute; top: 10px; inset-inline-end: 14px; z-index: 50;
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; background: #ffffff22;
}
.ls-circuit #logo svg { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.ls-circuit #logo .ring { fill: none; stroke: #ffeb3b; stroke-width: 6; stroke-dasharray: 226; stroke-dashoffset: 226; }
.ls-circuit #logo.holding .ring { stroke-dashoffset: 0; transition: stroke-dashoffset 3s linear; }

.ls-circuit #diag {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: #000c; color: #0f0; font: 22px/1.3 Consolas, monospace; padding: 8px 16px; border-radius: 10px;
  pointer-events: none; direction: ltr;
}

/* --- platform overrides --------------------------------------------------- */
.ls-circuit { position: relative; height: 100%; overflow: hidden; background: #0d1b3a; }
.ls-circuit #viewport { position: absolute; inset: 0; }
.ls-circuit .level-card.locked { background: linear-gradient(160deg, #eceff1, #cfd8dc); color: #546e7a; }
.ls-circuit .level-card.locked .lc-icon { filter: grayscale(.2); }
.ls-circuit .sound-btn { font-size: 30px; }
.ls-circuit:fullscreen { border-radius: 0; }
