.resistance-calculator{--rc-ink:#172536;--rc-accent:#0f766e;display:grid;grid-template-columns:minmax(280px,1fr) minmax(260px,.8fr);gap:1rem;color:var(--rc-ink)}
.resistance-calculator-panel{padding:clamp(1rem,2.5vw,1.5rem);border:1px solid #dbe4eb;border-radius:20px;background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.06)}
.resistance-mode{display:grid;grid-template-columns:1fr 1fr;gap:.35rem;padding:.3rem;border-radius:14px;background:#eef2f5;margin-bottom:1rem}.resistance-mode button{border:0;border-radius:10px;padding:.7rem;background:transparent;font-weight:700;color:#526171}.resistance-mode button[aria-pressed="true"]{background:#fff;color:var(--rc-accent);box-shadow:0 2px 8px rgba(15,23,42,.1)}
.resistance-row{display:grid;grid-template-columns:2.2rem minmax(5rem,1fr) 5rem 2.3rem;gap:.45rem;align-items:center;margin:.55rem 0}.resistance-row label{font-weight:750}.resistance-row input,.resistance-row select{width:100%;min-height:2.7rem;border:1px solid #cbd5e1;border-radius:10px;padding:.45rem .65rem;background:#fff;color:var(--rc-ink);caret-color:var(--rc-ink)}.resistance-row select option{background:#fff;color:var(--rc-ink)}.resistance-row button{border:0;background:transparent;color:#64748b;font-size:1.5rem}.resistance-row button:disabled{opacity:.2}
.resistance-add{width:100%;margin-top:.55rem;border:1px dashed #94a3b8;border-radius:12px;padding:.65rem;background:#f8fafc;color:#334155;font-weight:650}.resistance-voltage{display:grid;gap:.35rem;margin-top:1.1rem;font-weight:650}.resistance-voltage input{min-height:2.7rem;border:1px solid #cbd5e1;border-radius:10px;padding:.45rem .65rem;background:#fff;color:var(--rc-ink);caret-color:var(--rc-ink)}
.resistance-result-panel{display:flex;flex-direction:column;justify-content:center;background:linear-gradient(145deg,#f0fdfa,#eff6ff)}.resistance-result-label{color:#64748b;text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;font-weight:750}.resistance-result{font-size:clamp(2.2rem,6vw,4.8rem);line-height:1.05;font-weight:800;letter-spacing:-.05em;color:#0f766e;margin:.3rem 0}.resistance-result.is-error{font-size:1.1rem;letter-spacing:0;color:#b91c1c}.resistance-formula{font-size:clamp(1rem,2vw,1.35rem);font-weight:650}.resistance-details{margin-top:1rem}.resistance-details p{margin:.25rem 0}.resistance-project{margin-top:1rem;display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}.resistance-project [role="status"]{margin:0;color:#475569}
.board-resistance-calculator{position:relative;width:min(1120px,96%);margin:auto}.board-resistance-calculator .resistance-calculator-panel{box-shadow:none}.board-resistance-calculator .resistance-row input,.board-resistance-calculator .resistance-row select{font-size:1.2rem}.board-resistance-calculator .resistance-result{font-size:clamp(3rem,8vw,7rem)}
.board-resistance-calculator:not(.is-result-visible) .resistance-result-panel .resistance-result,.board-resistance-calculator:not(.is-result-visible) .resistance-result-panel .resistance-formula,.board-resistance-calculator:not(.is-result-visible) .resistance-result-panel .resistance-details{visibility:hidden}.board-resistance-calculator:not(.is-result-visible) .resistance-result-panel::after{content:'Resultado oculto';position:absolute;color:#64748b;font-size:clamp(1.1rem,2vw,1.5rem);font-weight:750}.board-resistance-calculator .resistance-result-panel{position:relative;align-items:flex-start}.board-resistance-calculator:not(.is-result-visible) .resistance-result-panel{align-items:center}.resistance-board-controls{display:flex;align-items:center;justify-content:center;gap:.35rem}.resistance-board-controls button{min-height:34px;padding:.3rem .65rem;border-color:#67e8f9;background:#164e63;color:#cffafe;font-weight:750}.resistance-board-controls button[aria-pressed=true]{background:#0f766e;color:#fff}.board-resistance-calculator:not(.is-result-visible) .resistance-color-output{visibility:hidden}.board-resistance-calculator:not(.is-result-visible) .resistance-color-result::after{content:'Resultado oculto';color:#64748b;font-size:clamp(1rem,2vw,1.35rem);font-weight:750}.resistance-color-reference{position:absolute;inset:clamp(.5rem,2vw,1.5rem);z-index:6;padding:clamp(.7rem,2vw,1.25rem);border:1px solid #94a3b8;border-radius:18px;background:#f8fafc;color:#172536;box-shadow:0 18px 45px #02061766;overflow:auto}.resistance-color-reference[hidden]{display:none!important}.resistance-color-reference h2{margin:.1rem 0 .7rem;text-align:center}.resistance-color-table{display:grid;width:min(54rem,100%);margin:auto;border:1px solid #cbd5e1;border-radius:12px;overflow:hidden}.resistance-color-table>div{display:grid;grid-template-columns:minmax(8rem,1.4fr) repeat(3,minmax(5rem,1fr));align-items:center}.resistance-color-table>div:nth-child(even){background:#eef2f5}.resistance-color-table>div.is-heading{background:#1e293b;color:#fff;font-weight:800}.resistance-color-table span{display:flex;align-items:center;gap:.45rem;min-height:2rem;padding:.28rem .55rem;border-right:1px solid #cbd5e1}.resistance-color-table span:last-child{border-right:0}.resistance-color-table i{display:inline-block;flex:none;width:1rem;height:1rem;border:1px solid #64748b;border-radius:50%;background:var(--swatch,#111827)}.resistance-color-table i[data-color=black]{--swatch:#111827}.resistance-color-table i[data-color=brown]{--swatch:#78350f}.resistance-color-table i[data-color=red]{--swatch:#dc2626}.resistance-color-table i[data-color=orange]{--swatch:#ea580c}.resistance-color-table i[data-color=yellow]{--swatch:#facc15}.resistance-color-table i[data-color=green]{--swatch:#15803d}.resistance-color-table i[data-color=blue]{--swatch:#2563eb}.resistance-color-table i[data-color=violet]{--swatch:#7e22ce}.resistance-color-table i[data-color=grey]{--swatch:#64748b}.resistance-color-table i[data-color=white]{--swatch:#fff}.resistance-color-table i[data-color=gold]{--swatch:#c69b2d}.resistance-color-table i[data-color=silver]{--swatch:#a8a8a8}
.board-resistance-calculator.has-schematic{display:grid;grid-template-columns:minmax(230px,.85fr) minmax(190px,.62fr) minmax(340px,1.5fr);align-items:stretch;gap:.65rem;width:100%;height:100%;min-height:0;overflow:hidden}.board-resistance-calculator.has-schematic>.resistance-calculator{display:contents}.board-resistance-calculator.has-schematic .resistance-calculator-panel{min-width:0;min-height:0;overflow:auto;padding:clamp(.7rem,1.4vw,1.1rem);border-radius:14px}.resistance-schematic{display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #b8c7d6;border-radius:14px;background:#e8eef5;color:#17324e;overflow:hidden}.resistance-schematic-frame{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-height:0;padding:.35rem;overflow:hidden}.resistance-schematic-frame .cad-sheet{width:100%;height:100%;max-height:100%;filter:drop-shadow(0 4px 8px #33415544)}.resistance-schematic-frame .cad-frame,.resistance-schematic-frame .cad-title-block{display:none}.resistance-schematic-frame>p{margin:auto;padding:1rem;color:#991b1b;text-align:center}.resistance-schematic-summary{display:flex;flex-wrap:wrap;justify-content:center;gap:.25rem .8rem;flex:0 0 auto;min-height:2.3rem;padding:.45rem .65rem;border-top:1px solid #b8c7d6;background:#fff;color:#334155;font-size:clamp(.72rem,.85vw,.88rem)}.resistance-schematic-summary strong{color:#0369a1}.resistance-schematic-summary span{white-space:nowrap}
.resistance-color-calculator{display:grid;grid-template-columns:minmax(18rem,.9fr) minmax(20rem,1.1fr);gap:clamp(1rem,3vw,2.5rem);align-items:center;width:min(68rem,96%);margin:auto;color:#172536}.resistance-color-panel{padding:clamp(1rem,2.5vw,1.8rem);border:1px solid #dbe4eb;border-radius:20px;background:#fff}.resistance-color-count{display:flex;gap:.6rem;margin:0 0 1rem}.resistance-color-count label{display:flex;align-items:center;gap:.35rem;padding:.45rem .7rem;border-radius:99px;background:#eef2f5;font-weight:700}.resistance-color-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.resistance-color-controls label{display:grid;gap:.25rem;font-size:.78rem;font-weight:750;color:#526171}.resistance-color-controls select{min-height:2.8rem;padding:.45rem .65rem;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#172536;font:inherit}.resistance-color-result{display:grid;place-items:center;gap:1.2rem;min-height:18rem;padding:2rem;border-radius:20px;background:linear-gradient(145deg,#f0fdfa,#eff6ff)}.resistance-body{display:flex;align-items:stretch;justify-content:center;gap:clamp(.55rem,2vw,1.2rem);width:min(28rem,90%);height:8rem;padding:0 2.5rem;border-radius:3.5rem;background:#e8d4ad;box-shadow:inset 0 0 0 2px #b79b6a}.resistance-color-band{display:block;width:clamp(.8rem,3vw,1.5rem);height:100%;background:var(--band,#111827)}.resistance-color-band[data-color=black]{--band:#111827}.resistance-color-band[data-color=brown]{--band:#78350f}.resistance-color-band[data-color=red]{--band:#dc2626}.resistance-color-band[data-color=orange]{--band:#ea580c}.resistance-color-band[data-color=yellow]{--band:#facc15}.resistance-color-band[data-color=green]{--band:#15803d}.resistance-color-band[data-color=blue]{--band:#2563eb}.resistance-color-band[data-color=violet]{--band:#7e22ce}.resistance-color-band[data-color=grey]{--band:#64748b}.resistance-color-band[data-color=white]{--band:#f8fafc}.resistance-color-band[data-color=gold]{--band:#c69b2d}.resistance-color-band[data-color=silver]{--band:#a8a8a8}.resistance-color-output{font-size:clamp(2rem,5vw,4.4rem);font-weight:850;line-height:1.05;color:#0f766e;text-align:center}.resistance-color-output.is-error{font-size:1.1rem;color:#b91c1c}
@media(max-width:760px){.resistance-color-calculator{grid-template-columns:1fr}.resistance-color-result{min-height:13rem}.resistance-body{height:5.5rem}.resistance-color-controls{grid-template-columns:1fr 1fr}.resistance-color-table{font-size:.78rem}.resistance-color-table>div{grid-template-columns:minmax(6.5rem,1.3fr) repeat(3,minmax(4.2rem,1fr))}.resistance-color-table span{padding:.22rem .35rem}}
@media(max-width:860px){.board-resistance-calculator.has-schematic{grid-template-columns:minmax(250px,1fr) minmax(210px,.8fr);overflow:auto}.board-resistance-calculator.has-schematic .resistance-schematic{grid-column:1/-1;min-height:42vh}}
@media(max-width:720px){.resistance-calculator{grid-template-columns:1fr}.resistance-calculator-panel{border-radius:16px}.resistance-result-panel{min-height:220px}.resistance-row{grid-template-columns:2rem minmax(4rem,1fr) 4.5rem 2rem}.board-resistance-calculator.has-schematic{grid-template-columns:minmax(0,1fr);height:auto;min-height:100%;overflow:visible;align-content:start}.board-resistance-calculator.has-schematic .resistance-schematic{grid-column:1;grid-row:1;min-height:clamp(220px,42vh,360px)}.board-resistance-calculator.has-schematic .resistance-calculator-panel{overflow:visible}.board-resistance-calculator.has-schematic .resistance-result-panel{min-height:150px}.board-resistance-calculator .resistance-row input,.board-resistance-calculator .resistance-row select{font-size:1rem}.resistance-board-controls{max-width:100%;overflow-x:auto;justify-content:flex-start}.resistance-board-controls button{white-space:nowrap}}

/* Editor visual de redes en pizarra: el circuito es la interfaz principal. */
.board-resistance-calculator.has-schematic{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:.45rem;width:100%;height:100%;min-height:0;overflow:hidden}
.board-resistance-calculator.has-schematic>.resistance-calculator{display:contents}
.board-resistance-calculator.has-schematic .resistance-calculator-panel:not(.resistance-result-panel){display:none;grid-row:3;max-height:38vh;padding:.75rem;overflow:auto}
.board-resistance-calculator.has-schematic.is-form-visible .resistance-calculator-panel:not(.resistance-result-panel){display:block}
.board-resistance-calculator.has-schematic .resistance-schematic{position:relative;grid-row:1;min-height:0;border-radius:12px}
.board-resistance-calculator.has-schematic .resistance-result-panel{grid-row:2;display:grid;grid-template-columns:auto auto minmax(8rem,.65fr) minmax(12rem,1.35fr);align-items:center;justify-content:stretch;gap:.3rem .8rem;min-height:0;padding:.45rem .8rem;border-radius:12px;overflow:hidden}
.board-resistance-calculator.has-schematic .resistance-result-label{font-size:.68rem;white-space:nowrap}
.board-resistance-calculator.has-schematic .resistance-result{margin:0;font-size:clamp(1.05rem,2vw,1.55rem);line-height:1.15;letter-spacing:-.02em;white-space:nowrap}
.board-resistance-calculator.has-schematic .resistance-formula{margin:0;font-size:clamp(.78rem,1.15vw,1rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.board-resistance-calculator.has-schematic .resistance-details{display:flex;align-items:center;justify-content:flex-end;gap:.25rem .7rem;min-width:0;margin:0;font-size:clamp(.7rem,.9vw,.88rem);overflow:auto}
#stage .board-resistance-calculator.has-schematic .resistance-details p{flex:none;margin:0;font-size:inherit;line-height:1.2;white-space:nowrap}
.board-resistance-calculator.has-schematic:not(.is-result-visible) .resistance-result-panel::after{font-size:.9rem}
.resistance-schematic-toolbar{display:flex;align-items:center;justify-content:center;gap:.35rem;flex:0 0 auto;padding:.35rem .5rem;border-bottom:1px solid #b8c7d6;background:#f8fafc}
.resistance-schematic-toolbar button{min-height:30px;padding:.25rem .65rem;border:1px solid #94a3b8;border-radius:8px;background:#fff;color:#26384b;font:700 .8rem Arial,sans-serif}
.resistance-visual-mode{display:flex;gap:.2rem;padding:.18rem;border-radius:9px;background:#e2e8f0}.resistance-visual-mode button{border:0;background:transparent}.resistance-visual-mode button[aria-pressed=true]{background:#0f766e;color:#fff}
.resistance-schematic-toolbar .resistance-visual-add{min-width:34px;padding:.2rem;font-size:1.2rem;line-height:1}.resistance-schematic-toolbar .resistance-visual-form[aria-pressed=true]{background:#334155;color:#fff}
.board-resistance-calculator.has-schematic:not(.is-result-visible) .resistance-result-panel{display:flex;align-items:center;justify-content:center;height:54px;min-height:54px}.board-resistance-calculator.has-schematic:not(.is-result-visible) .resistance-result-panel>*{display:none}.board-resistance-calculator.has-schematic:not(.is-result-visible) .resistance-result-panel::after{position:static}
.resistance-schematic-frame{padding:.15rem .4rem}.resistance-schematic-frame .cad-sheet{width:min(100%,760px)}.resistance-schematic-frame [data-component-kind]{cursor:pointer;outline:none}.resistance-schematic-frame [data-component-kind]:hover .cad-symbol-geometry,.resistance-schematic-frame [data-component-kind]:focus .cad-symbol-geometry{filter:drop-shadow(0 0 2px #0891b2);stroke:#0369a1}.resistance-schematic-frame [data-component-kind=switch]{cursor:pointer}
.resistance-component-dialog{width:min(22rem,calc(100vw - 2rem));padding:0;border:0;border-radius:14px;color:#172536;box-shadow:0 18px 55px #0f172a66}.resistance-component-dialog::backdrop{background:#0f172a66}.resistance-component-dialog form{display:grid;gap:.8rem;padding:1rem}.resistance-component-dialog header,.resistance-component-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.resistance-component-dialog header button{border:0;background:transparent;font-size:1.5rem}.resistance-component-dialog label{display:grid;gap:.3rem;font-weight:700}.resistance-component-dialog input,.resistance-component-dialog select{min-height:2.7rem;padding:.45rem .65rem;border:1px solid #94a3b8;border-radius:9px;background:#fff;color:#172536;font:inherit}.resistance-component-dialog footer{justify-content:flex-end}.resistance-component-dialog footer button{padding:.5rem .8rem;border:1px solid #94a3b8;border-radius:8px;background:#fff}.resistance-component-dialog [data-component-save]{background:#0f766e;color:#fff;border-color:#0f766e}
.resistance-component-menu{position:absolute;z-index:8;display:grid;width:174px;padding:.3rem;border:1px solid #94a3b8;border-radius:10px;background:#fff;box-shadow:0 12px 30px #0f172a44}.resistance-component-menu[hidden]{display:none}.resistance-component-menu button{padding:.55rem .65rem;border:0;border-radius:7px;background:#fff;color:#172536;text-align:left}.resistance-component-menu button:hover,.resistance-component-menu button:focus{background:#e2e8f0}.resistance-component-menu button:disabled{opacity:.35}
@media(max-width:760px){.board-resistance-calculator.has-schematic{height:auto;min-height:100%;overflow:visible}.board-resistance-calculator.has-schematic .resistance-schematic{min-height:clamp(240px,38vh,330px)}.board-resistance-calculator.has-schematic .resistance-result-panel{grid-template-columns:auto 1fr;gap:.25rem .55rem}.board-resistance-calculator.has-schematic .resistance-formula{display:none}.board-resistance-calculator.has-schematic .resistance-details{grid-column:1/-1;justify-content:flex-start}.resistance-schematic-toolbar{justify-content:flex-start;overflow-x:auto}.resistance-schematic-toolbar button{white-space:nowrap}}
