.shutdown-btn {
  padding: .3rem .75rem; font-family: "Orbitron", sans-serif; font-size: .68rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: #ff6b5c; background: rgba(60, 6, 6, .55); border: 1px solid rgba(255, 70, 50, .65);
  border-radius: 2px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.shutdown-btn:hover { color: #fff; background: #b3121b; box-shadow: 0 0 14px rgba(255, 40, 30, .6); }
.shutdown-btn:focus-visible { outline: 2px solid #ff6b5c; outline-offset: 2px; }

.sd-confirm .rename-eyebrow { color: #ff6b5c; }
.sd-confirm .rename-card { border-color: rgba(255, 70, 50, .6); }

.sd-alarm {
  --red: #ff1f1f;
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden;
  color: #fff; background: radial-gradient(ellipse at center, rgba(120, 0, 0, .55), rgba(8, 0, 0, .94) 70%);
  pointer-events: auto; animation: sd-arrive .35s steps(3) both, sd-shake .5s .35s 2 both;
}
.sd-alarm.leaving { animation: sd-collapse .5s cubic-bezier(.7, 0, .9, .4) both; }
.sd-flash { position: absolute; inset: 0; background: var(--red); mix-blend-mode: screen; opacity: 0; animation: sd-flash 1s steps(2) infinite; }
.sd-scan {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .55) 0 2px, transparent 2px 4px);
}
.sd-band {
  position: absolute; left: -10%; right: -10%; height: 46px; display: flex; align-items: center; overflow: hidden;
  background: repeating-linear-gradient(-45deg, #120000 0 22px, var(--red) 22px 44px);
  box-shadow: 0 0 30px rgba(255, 20, 20, .7);
}
.sd-band::after {
  content: attr(data-band);
  white-space: nowrap; padding: .15rem 0; font-family: "Orbitron", sans-serif; font-weight: 700; font-size: .95rem;
  letter-spacing: .4em; color: #fff; background: rgba(10, 0, 0, .85); animation: sd-ticker 4s linear infinite;
}
.sd-band.top { top: 12%; transform: rotate(-2deg); animation: sd-band-in .4s .1s cubic-bezier(.2, .9, .2, 1) both; }
.sd-band.bottom { bottom: 12%; transform: rotate(-2deg); animation: sd-band-in-reverse .4s .2s cubic-bezier(.2, .9, .2, 1) both; }
.sd-band.bottom::after { animation-direction: reverse; }
.sd-core {
  position: relative; display: grid; justify-items: center; gap: .35rem; padding: 1.6rem 2.4rem; text-align: center;
  max-width: min(88vw, 64rem);
  border-top: 3px solid var(--red); border-bottom: 3px solid var(--red); background: rgba(10, 0, 0, .78);
  box-shadow: 0 0 60px rgba(255, 0, 0, .45), inset 0 0 40px rgba(255, 0, 0, .25);
  animation: sd-slam .45s .15s cubic-bezier(.2, 1.6, .4, 1) both;
}
.sd-eyebrow { font-family: "Orbitron", sans-serif; font-size: .72rem; letter-spacing: .45em; color: #ff8a80; }
.sd-title {
  position: relative; font-family: "Orbitron", sans-serif; font-weight: 700; font-size: clamp(3rem, 12vw, 8rem);
  line-height: 1; letter-spacing: .12em; color: var(--red); text-shadow: 0 0 24px rgba(255, 0, 0, .9), 0 0 4px #fff;
  animation: sd-throb .5s steps(2) infinite;
}
.sd-title::before, .sd-title::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.sd-title::before { color: #00e5ff; mix-blend-mode: screen; opacity: .55; animation: sd-glitch-a 1.1s steps(1) infinite; }
.sd-title::after { color: #fff; mix-blend-mode: screen; opacity: .35; animation: sd-glitch-b .8s steps(1) infinite; }
.sd-sub { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: clamp(1.1rem, 3.5vw, 1.9rem); letter-spacing: .32em; }
.sd-detail { max-width: 34rem; font-size: 1.05rem; color: #ffc9c4; }

.sd-frame {
  position: fixed; inset: 0; z-index: 190; pointer-events: none;
  border: 3px solid rgba(255, 31, 31, .85); animation: sd-frame 1s ease-in-out infinite;
}
.sd-pill {
  display: inline-flex; align-items: center; gap: .55rem; padding: .28rem .7rem; white-space: nowrap;
  font-family: "Orbitron", sans-serif; font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: #fff; border: 1px solid #ff3b30; border-radius: 2px;
  background: repeating-linear-gradient(-45deg, rgba(120, 0, 0, .9) 0 8px, rgba(70, 0, 0, .9) 8px 16px);
  box-shadow: 0 0 16px rgba(255, 30, 30, .55); animation: sd-pill 1s ease-in-out infinite;
}
.sd-pill strong { min-width: 3.2ch; font-size: 1rem; letter-spacing: .05em; text-align: right; font-variant-numeric: tabular-nums; }
.sd-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; animation: sd-blink .5s steps(2) infinite; }
.sd-pill.done { animation: none; background: #2a0606; }

@keyframes sd-arrive { 0% { opacity: 0; } 34% { opacity: 1; } 67% { opacity: .3; } 100% { opacity: 1; } }
@keyframes sd-shake { 0%, 100% { transform: none; } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(3px, 4px); } }
@keyframes sd-collapse { 0% { clip-path: inset(0 0 0 0); } 60% { clip-path: inset(48% 0 48% 0); opacity: 1; } 100% { clip-path: inset(50% 50% 50% 50%); opacity: 0; } }
@keyframes sd-flash { 0% { opacity: .22; } 50% { opacity: 0; } }
@keyframes sd-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sd-band-in { from { transform: translateX(-110%) rotate(-2deg); } to { transform: rotate(-2deg); } }
@keyframes sd-band-in-reverse { from { transform: translateX(110%) rotate(-2deg); } to { transform: rotate(-2deg); } }
@keyframes sd-slam { 0% { transform: scale(2.6); opacity: 0; filter: blur(8px); } 100% { transform: scale(1); opacity: 1; filter: none; } }
@keyframes sd-throb { 50% { color: #fff; text-shadow: 0 0 40px #ff0000, 0 0 8px #fff; } }
@keyframes sd-glitch-a { 0%, 100% { transform: translate(0); clip-path: inset(0 0 0 0); } 20% { transform: translate(-4px, 2px); clip-path: inset(10% 0 60% 0); } 40% { transform: translate(3px, -1px); clip-path: inset(55% 0 20% 0); } 60% { transform: translate(-2px, 0); clip-path: inset(30% 0 40% 0); } }
@keyframes sd-glitch-b { 0%, 100% { transform: translate(0); clip-path: inset(0 0 100% 0); } 30% { transform: translate(5px, 0); clip-path: inset(70% 0 5% 0); } 70% { transform: translate(-5px, 1px); clip-path: inset(5% 0 80% 0); } }
@keyframes sd-frame { 0%, 100% { box-shadow: inset 0 0 24px rgba(255, 0, 0, .55); border-color: rgba(255, 31, 31, .85); } 50% { box-shadow: inset 0 0 6px rgba(255, 0, 0, .25); border-color: rgba(255, 31, 31, .35); } }
@keyframes sd-pill { 50% { box-shadow: 0 0 4px rgba(255, 30, 30, .3); } }
@keyframes sd-blink { 50% { opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  .sd-alarm, .sd-alarm.leaving, .sd-core, .sd-band.top, .sd-band.bottom { animation: none; }
  .sd-flash, .sd-title, .sd-title::before, .sd-title::after, .sd-band::after, .sd-frame, .sd-pill, .sd-dot { animation: none; }
  .sd-alarm.leaving { opacity: 0; transition: opacity .3s; }
}
@media (max-width: 640px) {
  .sd-core { padding: 1.1rem 1rem; }
  .sd-band { height: 34px; }
  .sd-pill span:not(.sd-dot) { display: none; }
}
.tk-pill { padding: .2rem .55rem; font: inherit; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--muted); background: rgba(4, 8, 18, .7); border: 1px solid var(--panel-edge); border-radius: 3px; cursor: pointer; white-space: nowrap; }
.tk-pill[hidden] { display: none; }
.tk-pill.good { color: #6cf0b0; border-color: rgba(108, 240, 176, .5); }
.tk-pill.warn { color: #ffc857; border-color: rgba(255, 200, 87, .6); }
.tk-pill.bad { color: #ff5d5d; border-color: rgba(255, 93, 93, .7); }
.tk-chart { position: fixed; top: 3.6rem; right: 1rem; z-index: 60; width: min(340px, calc(100vw - 2rem)); padding: .6rem .7rem; background: rgba(7, 11, 24, .97); border: 1px solid var(--panel-edge); border-top: 3px solid var(--accent); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.tk-chart[hidden] { display: none; }
.tk-chart svg { display: block; width: 100%; height: 90px; background: rgba(4, 8, 18, .6); }
.tk-chart polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tk-head, .tk-foot { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin: .2rem 0; }
.sd-confirm .rename-card { width: min(600px, 100%); }
.sd-confirm .rename-actions .wp-btn { white-space: nowrap; }
.sd-alarm.sd-attack { --red: #ff8a1f; background: radial-gradient(ellipse at center, rgba(130, 60, 0, .55), rgba(10, 4, 0, .94) 70%); }
.sd-attack .sd-band { background: repeating-linear-gradient(-45deg, #140800 0 22px, var(--red) 22px 44px); box-shadow: 0 0 30px rgba(255, 130, 20, .7); }
.sd-attack .sd-band::after { background: rgba(14, 6, 0, .85); }
.sd-attack .sd-core { background: rgba(14, 6, 0, .78); box-shadow: 0 0 60px rgba(255, 120, 0, .45), inset 0 0 40px rgba(255, 120, 0, .25); }
.sd-attack .sd-title { font-size: clamp(2.2rem, 8vw, 5.5rem); text-shadow: 0 0 24px rgba(255, 120, 0, .9), 0 0 4px #fff; }
.sd-attack .sd-eyebrow { color: #ffc080; }
.sd-attack .sd-detail { color: #ffe0bf; }
