/* ============================================================ simulator toys */
.toys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1140px) { .toys { grid-template-columns: 1fr 1fr; } .toy:last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .toys { grid-template-columns: minmax(0, 1fr); } }
.toy { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.toy-h { display: flex; align-items: center; gap: 10px; }
.toy-n { width: 9px; height: 9px; border-radius: 50%; background: var(--z); flex: none; font-size: 0; overflow: hidden; }
.toy-h h3 { font-size: 18px; }
.toy-do { font-size: 13.5px; color: var(--ink-2); }
.toy-ex { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.toy-note { color: var(--ink-3); }
.stage { position: relative; flex: 1; padding: 12px; min-height: 292px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--r-s); background: var(--sunk); border: 1px solid var(--line); }
.toy-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.toy-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.toy-btns .btn { min-height: 36px; padding: 0 13px; font-size: 13.5px; }
.toy-ghost { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; }
.toy-ghost svg { width: 36px; height: auto; }
.lifted { opacity: .35; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.1); position: relative; flex: none; border: 1px solid var(--line-2); transition: background .2s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .sw { background: var(--z); border-color: var(--z); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- A */
.sa-top { display: flex; justify-content: center; }
.sa-block { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: var(--r-s); background: transparent; border: 1px solid var(--z); cursor: grab; touch-action: none; user-select: none; }
.sa-block svg { width: 30px; height: auto; }
.sa-block > span { display: flex; flex-direction: column; line-height: 1.3; }
.sa-block b { font-size: 14px; }
.sa-block small { font-size: 12px; color: var(--ink-2); }
.sa-net { border: 1px dashed var(--line-2); border-radius: 10px; padding: 7px 11px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); position: relative; overflow: hidden; }
.sa-net span { font-size: 12.5px; }
.sa-net.over { border-color: var(--z); color: var(--z-l); }
.sa-net.pulse { border-color: var(--z); color: var(--z-l); }
.sa-net.pulse::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--z) 45%, transparent), transparent); animation: sweep .9s linear infinite; }
@keyframes sweep { to { left: 100%; } }
.sa-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.sa-val { position: relative; padding: 11px; border-radius: var(--r-s); background: transparent; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; transition: border-color .2s, box-shadow .2s, background .2s; }
.sa-val b { font-size: 13.5px; }
.sa-sprite { position: relative; }
.sa-val.busy .sa-sprite { animation: jiggle .22s steps(2) infinite; }
.sa-val.busy .mlines { animation: scroll .5s linear infinite; }
@keyframes scroll { to { transform: translateY(-5px); } }
.sa-val.hot { border-color: var(--bad); background: rgba(255, 111, 142, .06); }
.sa-val.done { border-color: var(--good); }
@keyframes jiggle { 50% { transform: translate(1px, -1px); } }
.stamp { position: absolute; right: -10px; top: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--good); color: #062a1c; display: none; place-items: center; }
.sa-val.done .stamp { display: grid; animation: pop .5s cubic-bezier(.25, 1.7, .55, 1) 1 both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.sa-row { display: flex; align-items: center; gap: 6px; }
.meter { display: inline-grid; grid-template-columns: repeat(10, 6px); gap: 2px; }
.meter i { width: 6px; height: 10px; border-radius: 1px; background: rgba(255,255,255,.1); }
.meter i.on { background: var(--good); }
.meter i.warm { background: var(--z2); }
.meter i.hot { background: var(--bad); }
.sa-prog { width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.sa-prog span { display: block; height: 100%; width: 0; background: var(--z); }
.sa-st { font-size: 12px; color: var(--ink-2); font-family: var(--f-mono); }
.sa-time { position: absolute; right: 9px; top: 9px; font-size: 12px; color: var(--ink-3); }
.sa-slider { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); flex: 1 1 180px; }
.sa-slider input { flex: 1; accent-color: var(--z); min-width: 80px; }

/* ---------- B */
.stage-b { display: grid; grid-template-columns: .8fr 1.3fr .9fr; grid-template-rows: auto auto; gap: 10px; }
.sb-col { padding: 9px; border-radius: var(--r-s); background: transparent; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sb-col .label { display: flex; align-items: center; gap: 5px; }
.sb-coins { display: flex; flex-wrap: wrap; gap: 4px; min-height: 34px; }
.sb-coin { cursor: grab; touch-action: none; user-select: none; display: inline-block; border-radius: 50%; }
.sb-coin:hover svg { filter: brightness(1.15); }
.sb-coin svg { width: 30px; height: 30px; }
.sb-empty { font-family: var(--f-mono); color: var(--ink-3); font-size: 12px; }
.sb-hint { font-size: 11.5px; color: var(--ink-3); margin-top: auto; }
.sb-pool { border-color: color-mix(in srgb, var(--z) 60%, transparent); }
.sb-pool.over { outline: 2px dashed var(--z); outline-offset: 2px; }
.sb-notes { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.note { display: inline-flex; flex-direction: column; padding: 3px 7px; border-radius: 7px; background: rgba(3, 8, 18, .7); border: 1px solid var(--line-2); font-size: 11px; line-height: 1.25; }
.note code { font-size: 11px; }
.note small { font-size: 10px; color: var(--ink-3); }
.note.me { border-color: var(--eth); background: rgba(110, 180, 255, .16); }
.note.me small { color: var(--eth-2); }
.note.bob { border-color: var(--z2); background: rgba(255, 181, 71, .1); }
.note.bob small { color: var(--z2); }
.note.spent { opacity: .45; text-decoration: line-through; }
.note.fresh { animation: pop .5s cubic-bezier(.25, 1.7, .55, 1) 1 both; }
.sb-bobbox { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.sb-bobnote.hide { color: var(--ink-3); }
.sb-fresh { font-family: var(--f-mono); }
.sb-log { grid-column: 1 / -1; padding: 9px 11px; border-radius: var(--r-s); background: transparent; border: 1px solid var(--line-2); min-width: 0; }
.sb-log ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; max-height: 112px; overflow: auto; }
.sb-log li { font-family: var(--f-mono); font-size: 11.5px; line-height: 1.45; color: var(--ink-2); padding-left: 10px; border-left: 2px solid var(--line-2); overflow-wrap: anywhere; }
.sb-log li.dep { border-color: var(--eth); }
.sb-log li.tx { border-color: var(--z); }
.sb-log li.wd { border-color: var(--z2); }
.sb-log li.empty { font-family: var(--f-body); color: var(--ink-3); border: 0; padding: 0; }
.sb-who { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--z-l); }
.stage-b.observer { background: repeating-linear-gradient(45deg, rgba(3, 8, 18, .6) 0 10px, rgba(51, 225, 207, .05) 10px 20px); }
.stage-b.observer .sb-pool .note { border-color: var(--line-2); background: rgba(3, 8, 18, .7); }
@media (max-width: 480px) { .stage-b { grid-template-columns: 1fr 1fr; } .sb-pool { grid-column: 1 / -1; order: -1; } }

/* ---------- C */
.sc-row, .sc-blockrow { display: flex; flex-direction: column; gap: 6px; }
.sc-pool, .sc-block { display: flex; flex-wrap: wrap; gap: 5px; }
.tx-chip { position: relative; font-family: var(--f-mono); font-size: 12px; padding: 4px 9px; border-radius: 7px; background: rgba(255,255,255,.05); border: 1px solid var(--line-2); }
.tx-chip.you { border-color: var(--z2); background: rgba(255, 181, 71, .1); color: var(--z2-l); font-family: var(--f-body); font-weight: 700; }
.tx-chip .il { display: none; position: absolute; right: -7px; top: -9px; font-style: normal; font-family: var(--f-mono); font-size: 9px; font-weight: 700; background: var(--z); color: #04101f; padding: 0 4px; border-radius: 4px; }
.tx-chip.listed .il { display: block; }
.tx-chip.in { animation: pop .4s cubic-bezier(.25, 1.6, .55, 1) 1 both; }
.sc-mid { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; }
.sc-committee { padding: 7px 9px; border-radius: var(--r-s); background: transparent; border: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.focil-on .sc-committee { border-style: solid; border-color: var(--z); }
.sc-nodes { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-node { position: relative; opacity: .35; transition: opacity .2s, filter .2s; }
.sc-node svg.cube { width: 26px; height: auto; }
.sc-node i { display: none; position: absolute; right: -5px; top: -5px; background: var(--z); color: #04101f; width: 14px; height: 14px; border-radius: 4px; place-items: center; }
.sc-node.on { opacity: 1; }
.sc-node.on i { display: grid; }
.sc-builder { padding: 7px 9px; border-radius: var(--r-s); background: rgba(255, 111, 142, .07); border: 1px solid rgba(255, 111, 142, .5); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; max-width: 124px; }
.sc-builder .label { color: var(--bad); font-size: 12px; }
.sc-bsprite svg { width: 46px; height: auto; }
.sc-builder.busy .sc-bsprite { animation: jiggle .22s steps(2) infinite; }
.sc-block { min-height: 46px; padding: 7px; border-radius: var(--r-s); background: transparent; border: 1px solid var(--line-2); align-content: flex-start; transition: border-color .2s, box-shadow .2s; }
.sc-block.ok { border-color: var(--good); }
.sc-block.bad { border-color: var(--bad); background: var(--bad-soft); }
.sc-block.bad .tx-chip { opacity: .5; text-decoration: line-through; }
.sc-ph { font-size: 12px; color: var(--ink-3); }
.sc-verdict { font-size: 13px; font-weight: 600; min-height: 1.5em; color: var(--ink-2); }
.sc-verdict.ok { color: var(--good); }
.sc-verdict.bad { color: var(--bad); }
.sc-verdict.warn { color: var(--warn); }
