/* Simulador "Botonera y sello" (publicación 117). Prefijo pbs- */
.pbs { background: var(--card, #fff); color: #0b1f33; border: 1px solid var(--line, #cfdae6); border-radius: 8px; padding: 16px; margin: 26px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 16px; line-height: 1.5; }
  .pbs [hidden] { display: none !important; }
.pbs * { box-sizing: border-box; }
.pbs-head { display: flex; flex-direction: column; gap: 2px; }
.pbs-head strong { font-size: 1.1rem; color: #0b1f33; }
.pbs-head span { color: #4a5d70; font-size: .92rem; line-height: 1.5; }
.pbs-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pbs-lab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: #0b1f33; min-width: 0; }
.pbs select { font: inherit; font-size: .9rem; min-height: 40px; max-width: 100%; padding: 6px 8px; border: 1px solid #7d8fa2; border-radius: 4px; background: #fff; color: #0b1f33; }
.pbs button, .pbs .pbs-b { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 14px; border-radius: 4px; border: 1px solid #0b1f33; background: #0b1f33; color: #fff; cursor: pointer; min-height: 40px; }
.pbs button.ghost { background: #fff; color: #0b1f33; }
.pbs button.on { background: #b42318; border-color: #b42318; color: #fff; }
.pbs button:disabled { opacity: .45; cursor: not-allowed; }
.pbs button:focus-visible, .pbs select:focus-visible, .pbs input:focus-visible, .pbs summary:focus-visible { outline: 3px solid #e0731a; outline-offset: 2px; }
.pbs svg g[tabindex]:focus-visible { outline: none; }
.pbs svg g[tabindex]:focus-visible > circle:first-child, .pbs svg g[tabindex]:focus-visible > rect:first-child { stroke: #e0731a; stroke-width: 4; }
.pbs-demo { border: 2px solid #2a6fb0; background: #eef5fc; color: #0b1f33; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pbs-demo-t { font-size: .92rem; line-height: 1.55; }
.pbs-demo-b { display: flex; flex-wrap: wrap; gap: 8px; }
.pbs-now { border: 1px solid #cfdae6; border-left: 6px solid #2a6fb0; background: #f3f8fd; color: #0b1f33; border-radius: 6px; padding: 10px 14px; }
.pbs-now-t { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: #2a6fb0; margin-bottom: 2px; }
.pbs-now p { margin: 3px 0; font-size: .95rem; line-height: 1.55; color: #0b1f33; }
.pbs-now-ev { font-weight: 600; }
.pbs-alert { border: 2px solid #b42318; background: #fdecec; color: #721c24; border-radius: 6px; padding: 10px 14px; font-size: .93rem; line-height: 1.55; }
.pbs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .pbs-grid { grid-template-columns: minmax(0, 1fr); } }
.pbs-card { border: 1px solid #e1e8ef; border-radius: 6px; background: #fff; color: #0b1f33; padding: 10px; min-width: 0; }
.pbs-ct { font-size: .9rem; font-weight: 700; color: #0b1f33; margin-bottom: 6px; }
.pbs svg { display: block; width: 100%; height: auto; max-width: 100%; font-family: inherit; }
.pbs-ctl { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pbs-fs { border: 1px solid #cfdae6; border-radius: 4px; margin: 0; padding: 6px 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; color: #0b1f33; }
.pbs-fs legend { font-size: .8rem; font-weight: 700; padding: 0 4px; color: #0b1f33; }
.pbs-fs label, .pbs-chk, .pbs-mm-mode label { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: #0b1f33; min-height: 32px; }
.pbs input[type=radio], .pbs input[type=checkbox] { width: 18px; height: 18px; accent-color: #0b1f33; }
.pbs-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pbs-btns button { font-size: .85rem; }
/* esquema */
.pbs .pbs-w { stroke: #9aa8b6; stroke-width: 3; }
.pbs .pbs-w.live { stroke: #2a6fb0; stroke-width: 3; }
.pbs .pbs-w.flow { stroke: #e0731a; stroke-width: 5; stroke-dasharray: 9 7; animation: pbs-dash .7s linear infinite; }
@keyframes pbs-dash { to { stroke-dashoffset: -16; } }
.pbs .pbs-c { stroke: #1c2833; stroke-width: 3; stroke-linecap: round; }
.pbs .pbs-opened .pbs-blade { stroke: #1c2833; }
.pbs .pbs-dot { fill: #1c2833; }
.pbs .pbs-act { stroke: #46566a; stroke-width: 2; stroke-dasharray: 3 3; }
.pbs .pbs-head2 { stroke: #1c2833; stroke-width: 4; stroke-linecap: round; }
.pbs .pbs-dirty .pbs-c, .pbs .pbs-dirty .pbs-dot { stroke: #b42318; fill: #b42318; }
.pbs .pbs-dirty .pbs-dot { stroke: none; }
.pbs .pbs-fuse { fill: #fff; stroke: #1c2833; stroke-width: 2.5; }
.pbs .pbs-fuse.pbs-bad { stroke: #b42318; fill: #fdecec; }
.pbs .pbs-fuseln { stroke: #1c2833; stroke-width: 2; }
.pbs .pbs-coil { fill: #fff; stroke: #1c2833; stroke-width: 3; }
.pbs .pbs-coil.on { fill: #ffe0b8; stroke: #e0731a; }
.pbs .pbs-coil.weak { fill: #fdecec; stroke: #b42318; }
.pbs .pbs-link { stroke: #6b7a89; stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.pbs .pbs-link.on { stroke: #e0731a; stroke-width: 3; }
.pbs .pbs-tpc { fill: #46566a; stroke: #fff; stroke-width: 1.5; }
.pbs .pbs-tp { cursor: pointer; }
.pbs .pbs-tp.red .pbs-tpc { fill: #b42318; stroke: #0b1f33; stroke-width: 2.5; }
.pbs .pbs-tp.blk .pbs-tpc { fill: #0b1f33; stroke: #fff; stroke-width: 2.5; }
.pbs .pbs-tp.red.blk .pbs-tpc { fill: #b42318; stroke: #0b1f33; }
.pbs-glow-g { filter: drop-shadow(0 0 6px #2ee06a); }
.pbs-glow-a { filter: drop-shadow(0 0 6px #ffb020); }
.pbs .pbs-hl { animation: pbs-pulse 1.1s ease-in-out infinite; outline: 3px solid #e0731a; outline-offset: 3px; border-radius: 6px; }
.pbs svg .pbs-hl { outline: none; filter: drop-shadow(0 0 7px #e0731a) drop-shadow(0 0 3px #e0731a); }
@keyframes pbs-pulse { 50% { opacity: .6; } }
.pbs-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: #4a5d70; }
.pbs-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pbs-legend i { display: inline-block; width: 22px; height: 0; border-top: 4px solid; }
.pbs-legend i.a { border-color: #9aa8b6; } .pbs-legend i.b { border-color: #2a6fb0; } .pbs-legend i.c { border-color: #e0731a; border-top-width: 5px; border-top-style: dashed; }
.pbs-legend i.d { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #46566a; } .pbs-legend i.e { border-color: #6b7a89; border-top-style: dotted; }
/* contactos */
.pbs-ctl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 14px; }
.pbs-ctl-list li { font-size: .86rem; line-height: 1.45; padding: 5px 0; border-bottom: 1px solid #eef2f6; color: #0b1f33; }
.pbs-chip { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: 2px 7px; border-radius: 10px; margin-right: 6px; vertical-align: 1px; }
.pbs-chip.on { background: #d6f0df; color: #14532d; border: 1px solid #1a7f4b; }
.pbs-chip.off { background: #eef2f6; color: #3a4a5c; border: 1px solid #9aa8b6; }
.pbs-why { color: #3a4a5c; }
/* avanzadas */
.pbs-adv { border: 1px solid #cfdae6; border-radius: 6px; background: #fff; color: #0b1f33; }
.pbs-adv summary { cursor: pointer; padding: 10px 12px; font-weight: 700; font-size: .92rem; min-height: 44px; display: flex; align-items: center; }
.pbs-advb { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.pbs-mm { border: 1px solid #cfdae6; border-radius: 6px; padding: 10px; background: #f7f9fb; display: flex; flex-direction: column; gap: 8px; }
.pbs-mm-mode { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pbs-mm-sel { display: flex; flex-direction: column; gap: 6px; }
.pbs-lcd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.9rem; font-weight: 700; background: #cfe3b5; color: #1c2a12; border: 3px solid #33475b; border-radius: 6px; padding: 6px 14px; text-align: right; letter-spacing: .04em; }
.pbs-lcd-n { margin: 0; font-size: .86rem; line-height: 1.5; color: #0b1f33; }
.pbs-small { margin: 0; font-size: .78rem; color: #4a5d70; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .pbs *, .pbs .pbs-hl { animation: none !important; transition: none !important; } }
