.wr-wrap { position: relative; max-width: 560px; margin: 0 auto; width: 100%; }
.wr-device {
  position: relative; border-radius: 22px; padding: 18px 14px 20px; border: 3px solid #161920;
  background: linear-gradient(160deg, #464b59 0%, #2c303c 55%, #22252f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1), 0 12px 30px rgba(0, 0, 0, .28);
  transition: box-shadow .3s, filter .6s;
}
.wr-screw { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c9ced8, #5b6170); }
.wr-screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 2px; background: #3b404c; transform: rotate(35deg); }
.wr-screw.s1 { left: 8px; top: 8px; } .wr-screw.s2 { right: 8px; top: 8px; }
.wr-screw.s3 { left: 8px; bottom: 8px; } .wr-screw.s4 { right: 8px; bottom: 8px; }
.wr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 12px 14px; }
.wr-leds { display: flex; gap: 6px; flex: none; }
.wr-led { width: 11px; height: 11px; border-radius: 50%; background: #4a1c19; }
.wr-led.on { background: #ff4d3a; box-shadow: 0 0 8px #ff4d3a; animation: wr-led 1s steps(2) infinite; }
.wr-led.ok { background: #3ee08f; box-shadow: 0 0 8px #3ee08f; animation: none; }
@keyframes wr-led { 50% { opacity: .35; } }
.wr-display {
  flex: 1; min-width: 0; max-width: 190px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 2px solid #000;
  background: #0b0d10; color: #ff4d3a; font-family: ui-monospace, Consolas, "Courier New", monospace; font-weight: 800;
  font-size: 19px; letter-spacing: .06em; text-shadow: 0 0 8px rgba(255, 77, 58, .75); white-space: nowrap; overflow: hidden;
}
.wr-display.is-wait { color: #ffd66b; text-shadow: 0 0 8px rgba(255, 214, 107, .7); }
.wr-display.is-safe { color: #3ee08f; text-shadow: 0 0 8px rgba(62, 224, 143, .75); }
.wr-display.is-alarm { animation: wr-blink .3s steps(2) infinite; }
@keyframes wr-blink { 50% { opacity: .25; } }
.wr-label { flex: none; color: #ffd66b; font-weight: 900; font-size: 12px; border: 2px solid #ffd66b; padding: 1px 6px; border-radius: 6px; }
.wr-board-wrap { display: grid; grid-template-columns: 16px minmax(0, 1fr) 16px; }
.wr-term { background: linear-gradient(90deg, #7d838f, #d3d7df 50%, #7d838f); border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.wr-board { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; background: #171a22; border-radius: 4px; }
.wr-wire {
  position: relative; display: flex; align-items: stretch; width: 100%; height: 46px; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: pointer; border-radius: 8px; -webkit-tap-highlight-color: transparent;
}
.wr-wire:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.wr-wire:hover:not(:disabled) .wr-line { stroke-width: 11; }
.wr-wire.is-locked { pointer-events: none; }
.wr-wire:disabled { cursor: default; }
.wr-half { position: relative; display: block; flex: 1 1 0; min-width: 0; height: 100%; transition: transform .55s cubic-bezier(.3, 1.6, .5, 1), opacity .5s; }
.wr-l { transform-origin: 0% 50%; }
.wr-r { transform-origin: 100% 50%; }
.wr-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wr-line { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-width .15s; }
.wr-shine { fill: none; stroke: rgba(255, 255, 255, .38); stroke-width: 2.5; stroke-linecap: round; transform: translateY(-2px); }
.wr-tip { position: absolute; width: 9px; height: 6px; transform: translateY(-50%); background: #d88a4a; border-radius: 2px; opacity: 0; transition: opacity .2s .1s; }
.wr-l .wr-tip { right: -3px; }
.wr-r .wr-tip { left: -3px; }
.wr-wire.is-cut .wr-l { transform: rotate(7deg) translateX(-6px); opacity: .8; }
.wr-wire.is-cut .wr-r { transform: rotate(-7deg) translateX(6px); opacity: .8; }
.wr-wire.is-cut .wr-tip { opacity: 1; }
.wr-snip {
  position: absolute; left: 50%; top: 50%; font-size: 28px; line-height: 1; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%);
}
.wr-wire.is-cut .wr-snip { animation: wr-snip .7s ease-out forwards; }
@keyframes wr-snip {
  0% { transform: translate(-50%, -50%) scale(.4) rotate(-35deg); opacity: 1; }
  45% { transform: translate(-50%, -50%) scale(1.35) rotate(15deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1) rotate(0deg); opacity: 0; }
}
.wr-device.is-alarm { animation: wr-alarm .3s steps(2) infinite; }
@keyframes wr-alarm { 50% { box-shadow: 0 0 0 4px #ff4d3a, 0 0 34px rgba(255, 77, 58, .7); } }
.wr-device.is-exploded { filter: grayscale(.7) brightness(.55) contrast(1.1); }
.wr-device.is-defused { box-shadow: 0 0 0 4px #3ee08f, 0 0 34px rgba(62, 224, 143, .45); }
.wr-msg { margin: 0; min-height: 1.6em; font-weight: 800; font-size: 17px; }
.wr-odds { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wr-odds .tag { font-size: 13.5px; padding: 4px 11px; }
.wr-tag-hero { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.wr-after .btn { min-width: 0; }
.wr-flash {
  position: fixed; inset: 0; z-index: 1400; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #fff3c4 30%, #ffb020 60%, rgba(255, 90, 54, .6) 100%);
  animation: wr-flash .85s ease-out forwards;
}
@keyframes wr-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.wr-part {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 5;
  transform: translate(-50%, -50%); animation: wr-part 1.1s cubic-bezier(.1, .75, .3, 1) forwards;
}
@keyframes wr-part { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; } }
@media (max-width: 400px) {
  .wr-device { padding: 16px 8px 18px; }
  .wr-top { margin: 0 8px 12px; }
  .wr-display { font-size: 16px; }
}
