/* Coin slot wiring guide (assets/js/coinslot-guide.js), on top of guide.css */
.guide-media .wv-host{width:100%;height:100%;min-height:484px;display:flex}
.wv{position:relative;flex:1;min-height:484px;border-radius:14px;overflow:hidden;background:#EEF2F7;box-shadow:0 20px 50px rgba(0,0,0,.4)}
.wv.wv-img{background:#fff}
.wv-svg{position:absolute;inset:0;width:100%;height:100%;display:block}
.wv-tags{position:absolute;inset:0;pointer-events:none}
.wv-tag{position:absolute;left:0;top:0;padding:5px 10px;border-radius:99px;background:var(--ink,#0F2440);color:#fff;font:700 13px/1.2 Inter,system-ui,sans-serif;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.25);border:2px solid var(--coin,#F2B544);animation:wv-tag .3s ease}
@keyframes wv-tag{from{opacity:0}to{opacity:1}}

/* parts */
.cg-silk{font:700 13px Inter,Arial,sans-serif;fill:#fff;paint-order:stroke;stroke:#121416;stroke-width:4px;stroke-linejoin:round}
.cg-silkd{font:700 14px Inter,Arial,sans-serif;fill:#0F2440;paint-order:stroke;stroke:#EEF2F7;stroke-width:4px;stroke-linejoin:round}
.cg-silks{font:700 10px Inter,Arial,sans-serif;fill:#fff}
.cg-silkt{font:600 8.5px Inter,Arial,sans-serif;fill:#fff}
.cg-etch{font:600 10px Inter,Arial,sans-serif;fill:#59606a}
.cg-tiny{font:600 9px Inter,Arial,sans-serif;fill:#d9dde2}
.cg-dark{fill:#3a2a06}
.cg-print{font:500 11px Inter,Arial,sans-serif;fill:#aeb4bb}
.cg-emboss{font:800 34px Inter,Arial,sans-serif;letter-spacing:2px;fill:none;stroke:#5a5e64;stroke-width:1.3px}
.cg-uni{font:800 15px Inter,Arial,sans-serif;fill:#3b3e43}
.cg-seg{font:700 40px "Courier New",monospace;fill:#c0392b;opacity:.25;transition:opacity .4s}
.cg-seg.on{opacity:1}
.cg-seg4{font:700 52px "Courier New",monospace;fill:#ff3b30;opacity:.2;transition:opacity .4s}
.cg-seg4.on{opacity:1}
.cg-qc{font:800 9px Inter,Arial,sans-serif;fill:#fff}
.cg-ind{font:700 18px Inter,Arial,sans-serif;fill:#2d3136}
.cg-adp{font:700 15px Inter,Arial,sans-serif;fill:#9aa1a8}
.cg-psu{font:700 13px Inter,Arial,sans-serif;fill:#30353b}
.cg-relay{font:800 15px Inter,Arial,sans-serif;fill:#fff}
.cg-relay2{font:600 9px Inter,Arial,sans-serif;fill:#dce9fb}
.cg-allan{font:800 16px Georgia,serif;fill:#7a5208}
.cg-dz{font:italic 800 19px Inter,Arial,sans-serif;fill:#fff}
.cg-dzside{font:800 11px Inter,Arial,sans-serif;fill:#15244a}
.cg-ph1{font:600 12px Inter,Arial,sans-serif;fill:#cfe0f5}
.cg-ph2{font:800 18px Inter,Arial,sans-serif;fill:#fff}
.cg-ph3{font:700 17px Inter,Arial,sans-serif;fill:#fff}
.cg-phon{opacity:0;transition:opacity .4s}
.cg-phon.on{opacity:1}
.cg-led{transition:fill .3s}
.cg-led.on{fill:#ff3b30;filter:drop-shadow(0 0 6px #ff3b30)}
#buck-led.on{fill:#ff4d4d}
.cg-wave{opacity:0}
.cg-wave.on{animation:cg-wave 1s ease-in-out infinite}
@keyframes cg-wave{0%,100%{opacity:0}50%{opacity:1}}
.cg-cap{opacity:0;transform:translateY(-40px);transition:opacity .5s ease,transform .6s cubic-bezier(.3,1.4,.6,1)}
.cg-cap.on{opacity:1;transform:none}
.cg-dk{opacity:0;transform:translateY(-260px);transition:opacity .5s ease,transform 1.6s cubic-bezier(.25,.9,.3,1)}
.cg-dk.on{opacity:1;transform:none}
.cg-mount{transition:transform 1.8s cubic-bezier(.45,0,.2,1)}
.cg-mount.on{transform:translate(var(--mx),var(--my))}
.cg-stub{fill:none;stroke-width:9px;stroke-linecap:round}
.cg-stubc{fill:none;stroke-width:6px;stroke-linecap:round}

/* wires: drawn in with the dash trick, then a dashed "current" runs along them */
.cg-w path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.cg-w .o{stroke-width:10px}
.cg-w .c{stroke-width:6.5px}
.cg-w.cg-cable .o{stroke-width:13px}
.cg-w.cg-cable .c{stroke-width:9px;stroke:#26272a}
.cg-w .o,.cg-w .c{stroke-dasharray:1 1;stroke-dashoffset:1;transition:stroke-dashoffset 1.5s ease-in-out}
.cg-w.on .o,.cg-w.on .c{stroke-dashoffset:0}
.cg-w .f{stroke:#fff;stroke-width:2.6px;stroke-dasharray:6 22;opacity:0;transition:opacity .3s}
.cg-w.flow .f{opacity:.95;animation:cg-flow .9s linear infinite}
.cg-w .cg-plugs,.cg-w .cg-j{opacity:0;transition:opacity .3s 1.2s}
.cg-w.on .cg-plugs,.cg-w.on .cg-j{opacity:1}
.cg-align path{fill:none;stroke:#2F649C;stroke-width:3px;stroke-dasharray:8 8;opacity:0;transition:opacity .6s}
.cg-align.on path{opacity:1;animation:cg-flow 1s linear infinite}
@keyframes cg-flow{to{stroke-dashoffset:-28}}
.cg-glow path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.cg-glow .gl{stroke:#F2B544;stroke-width:16px;opacity:0;transition:opacity .4s}
.cg-glow .f{stroke:#fff;stroke-width:5px;stroke-dasharray:14 30;opacity:0}
.cg-glow.on .gl{opacity:.75}
.cg-glow.on .f{opacity:1;animation:cg-flowg 1s linear infinite}
@keyframes cg-flowg{to{stroke-dashoffset:-44}}
.cg-spot{fill:rgba(8,18,32,.62);pointer-events:none}
.cg-ring{fill:none;stroke:#F2B544;stroke-width:4px;transform-box:fill-box;transform-origin:center;animation:cg-ring 1.2s ease-in-out infinite}
@keyframes cg-ring{0%,100%{transform:scale(.85);opacity:1}50%{transform:scale(1.25);opacity:.55}}
.cg-instant *{transition:none!important}

/* small looping clip from the real video, tap to enlarge */
.wv-pip{position:absolute;right:10px;bottom:10px;width:30%;max-width:200px;aspect-ratio:4/3;padding:0;border:3px solid #fff;border-radius:12px;overflow:hidden;background:#000;box-shadow:0 8px 24px rgba(0,0,0,.4);cursor:zoom-in;transition:width .35s ease,max-width .35s ease}
.wv-pip video{display:block;width:100%;height:100%;object-fit:cover}
.wv-pip span{position:absolute;left:6px;top:6px;padding:2px 8px;border-radius:99px;background:rgba(15,36,64,.85);color:#fff;font:700 11px Inter,sans-serif;white-space:nowrap}
.wv-pip.big{width:calc(100% - 20px);max-width:none;cursor:zoom-out}
.wv-pip.tl{left:10px;top:10px;right:auto;bottom:auto}
.wv-pip.tr{right:10px;top:10px;bottom:auto}
.wv-pip.bl{left:10px;bottom:10px;right:auto}

/* video frames */
.gm-land{width:100%;max-width:680px;aspect-ratio:4/3;border-radius:14px;overflow:hidden;background:#000;box-shadow:0 20px 50px rgba(0,0,0,.45);border:6px solid #0B1728}
.gm-land video{display:block;width:100%;height:100%;object-fit:cover}
.gm-tab{width:100%;max-width:720px;aspect-ratio:16/10;border-radius:14px;overflow:hidden;background:#000;box-shadow:0 20px 50px rgba(0,0,0,.45);border:6px solid #0B1728}
.gm-tab video{display:block;width:100%;height:100%;object-fit:contain}
.gm-board{height:100%;max-height:500px;aspect-ratio:3/4;border-radius:16px;overflow:hidden;background:#000;box-shadow:0 20px 50px rgba(0,0,0,.45);border:6px solid #0B1728}
.gm-board img{display:block;width:100%;height:100%;object-fit:cover}

/* choose cards: three across */
.cg-paths{grid-template-columns:repeat(2,1fr);max-width:540px}
.cg-paths div{padding:16px 14px}
.cg-paths small{font-size:12.5px}
.cg-paths .cg-path{gap:6px;transition:filter .35s ease,border-color .35s ease,background-color .35s ease}

/* choose cards: each drawing plays while the voice names that setup (PathsView) */
.cg-ill{display:block;width:100%;max-width:230px;height:auto;overflow:visible}
.cg-paths.focus .cg-path:not(.on){filter:brightness(.55) saturate(.6)}
.cg-paths .cg-path.on{border-color:rgba(242,181,68,.75);background:rgba(255,255,255,.12)}
.cg-ill .coin,.cg-ill .sig,.cg-ill .flow,.cg-ill .lit,.cg-ill .pop{opacity:0}
.cg-ill .fill,.cg-ill .pop{transform-box:fill-box}
.cg-ill .fill{transform-origin:left center;transform:scaleX(.2)}
.cg-ill .pop{transform-origin:center}
.cg-path.on .coin{animation:cgi-coin 4s ease-in infinite}
.cg-path.on .sig{animation:cgi-sig 4s ease infinite}
.cg-path.on .flow{animation:cgi-sig 4s ease infinite,cgi-dash .5s linear infinite}
.cg-path.on .lit{animation:cgi-lit 4s ease infinite}
.cg-path.on .off{animation:cgi-off 4s ease infinite}
.cg-path.on .slide{animation:cgi-slide 4s ease infinite}
.cg-path.on .fill{animation:cgi-fill 4s ease infinite}
.cg-path.on .pop{animation:cgi-pop 4s ease-out infinite}
@keyframes cgi-coin{0%{opacity:0;transform:translateY(-10px)}6%{opacity:1}22%{opacity:1;transform:translateY(var(--drop,20px))}27%,100%{opacity:0;transform:translateY(var(--drop,20px))}}
@keyframes cgi-sig{0%,26%{opacity:0}34%,88%{opacity:1}96%,100%{opacity:0}}
@keyframes cgi-lit{0%,46%{opacity:0}54%,90%{opacity:1}98%,100%{opacity:0}}
@keyframes cgi-off{0%,26%{opacity:1}32%,92%{opacity:0}98%,100%{opacity:1}}
@keyframes cgi-dash{to{stroke-dashoffset:-16}}
@keyframes cgi-slide{0%{opacity:0;transform:translateX(30px)}8%{opacity:1}24%,94%{opacity:1;transform:none}100%{opacity:0;transform:translateX(30px)}}
@keyframes cgi-fill{0%,46%{transform:scaleX(.2)}88%,94%{transform:scaleX(.9)}100%{transform:scaleX(.2)}}
@keyframes cgi-pop{0%,22%{opacity:0;transform:scale(.4)}27%{opacity:1}40%,100%{opacity:0;transform:scale(1.5)}}

/* firmware folder example */
.cg-files{width:100%;max-width:520px;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.35);font:14px Inter,sans-serif;color:var(--ink,#0F2440)}
.cg-files-bar{padding:10px 14px;background:#EEF1F5;border-bottom:1px solid var(--line,#E2E7EE);font-size:13px;color:var(--ink-3,#5B6B80)}
.cg-files h4{margin:14px 16px 6px;font-size:16px}
.cg-files ul{list-style:none;margin:0;padding:4px 10px 10px}
.cg-files li{display:flex;align-items:center;gap:8px;padding:9px 8px;border-radius:8px;opacity:0;animation:g-in .4s ease forwards;word-break:break-all}
.cg-files li svg{flex:none;color:var(--ink-3,#5B6B80)}
.cg-files li.pick{background:#FFF6E0;outline:2px solid var(--coin,#F2B544);font-weight:700}
.cg-files li em{margin-left:auto;flex:none;font-style:normal;font-size:12px;font-weight:700;color:#8a5a00}
.cg-files small{display:block;padding:0 16px 14px;font-size:12px;color:var(--ink-3,#5B6B80)}

.guide.is-max .guide-media .wv-host,.guide.is-max .wv{min-height:0}
.guide.is-max .gm-land,.guide.is-max .gm-tab{width:auto;height:100%;max-width:100%;max-height:calc(100vh - 120px);max-height:calc(100dvh - 120px)}
.guide.is-max .gm-board{height:100%;max-height:none}
.guide.is-max .wv-pip{max-width:320px}
.guide.is-max .wv-pip.big{max-width:none}

@media (max-width:860px){
  .guide-media .wv-host,.wv{min-height:0;height:420px}
  .guide.is-max .guide-media .wv-host,.guide.is-max .wv{height:auto}
  .gm-board{height:420px}
}
@media (max-width:480px){
  .guide-media .wv-host,.wv{height:360px}
  .wv-tag{font-size:11.5px;padding:4px 8px}
  .wv-pip{width:40%}
  .wv-pip span{font-size:9.5px;padding:2px 6px;left:4px;top:4px}
  .cg-paths{grid-template-columns:repeat(2,1fr);gap:10px}
  .cg-paths div{padding:12px 9px}
  .cg-paths strong{font-size:14px}
  .cg-paths small{font-size:11.5px;line-height:1.4}
  .gm-board{height:380px}
}
@media (prefers-reduced-motion:reduce){
  .cg-w .o,.cg-w .c,.cg-cap,.cg-dk,.cg-mount,.cg-align path{transition:none}
  .cg-w.flow .f,.cg-glow.on .f,.cg-ring,.cg-wave.on{animation:none}
  .cg-path.on .cg-ill *{animation:none}
  .cg-ill .lit,.cg-ill .sig,.cg-ill .flow{opacity:1}
  .cg-ill .off{opacity:0}
  .cg-ill .fill{transform:scaleX(.9)}
}
