:root {
  --bg: #0b1014;
  --text: #f4fbff;
  --muted: #9bb0be;
  --line: rgba(255, 255, 255, 0.14);
  --yellow: #ffd05a;
  --cyan: #65e5ff;
  --green: #65f0a2;
  --red: #ff5f66;
  --orange: #ff9b45;
  --steel: #5f7482;
  font-family: "Pretendard", "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(101, 229, 255, 0.14), transparent 25%),
    radial-gradient(circle at 84% 10%, rgba(255, 208, 90, 0.12), transparent 22%),
    linear-gradient(135deg, #081017 0%, #111b20 45%, #081016 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0.24));
}

.app {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

h1, h2, h3, p { margin-top: 0; }
button { font: inherit; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.mission-hud {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 18px;
}

.mission-hud h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
}

.hud-meters {
  display: flex;
  gap: 10px;
}

.meter-card {
  min-width: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.meter-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meter-card strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 24px;
}

.meter-card.danger strong { color: var(--red); }

.mission-layout {
  display: grid;
  grid-template-columns: 278px 1fr;
  gap: 18px;
}

.intel-panel {
  align-self: start;
  position: sticky;
  top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(24,35,43,0.94), rgba(13,20,25,0.94)),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255,255,255,0.03) 10px 12px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
}

.agent-chip {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 9px;
  border: 1px solid rgba(101,229,255,0.32);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(101,229,255,0.08);
  font-size: 11px;
  font-weight: 900;
}

.intel-panel h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.18;
}

.intel-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.signal-list span {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #dcebf2;
  font-size: 12px;
  font-weight: 800;
}

.bomb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bomb-card {
  position: relative;
  min-height: 408px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(180deg, rgba(24,34,42,0.96), rgba(8,13,17,0.96));
  box-shadow:
    0 28px 70px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.bomb-card:hover {
  transform: translateY(-4px);
  border-color: rgba(101,229,255,0.36);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.4),
    0 0 38px rgba(101,229,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.bomb-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,0.025) 14px 16px);
  opacity: 0.8;
}

.bomb-card.defused {
  border-color: rgba(101,240,162,0.5);
  cursor: default;
  box-shadow:
    0 28px 70px rgba(0,0,0,0.32),
    0 0 34px rgba(101,240,162,0.16),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.bomb-card.defused:hover { transform: none; }

.bomb-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bomb-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bomb-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #071014;
  background: var(--yellow);
  font-weight: 950;
}

.bomb-title h3 {
  margin-bottom: 2px;
  font-size: 20px;
}

.bomb-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-light {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.status-light::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  content: "";
}

.bomb-card.defused .status-light { color: var(--green); }

.bomb-device {
  position: relative;
  z-index: 1;
  height: 235px;
  margin: 18px auto 16px;
}

.bomb-device.card { max-width: 420px; }
.bomb-device.large { height: 300px; width: min(100%, 350px); }

.bomb-shell {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 210px;
  height: 178px;
  transform: translateX(-50%);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 46% 46% 36% 36%;
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,0.24), transparent 18%),
    radial-gradient(circle at 72% 78%, rgba(0,0,0,0.3), transparent 28%),
    linear-gradient(145deg, #303d45 0%, #11181d 64%, #090d10 100%);
  box-shadow:
    inset -22px -24px 34px rgba(0,0,0,0.42),
    inset 12px 12px 24px rgba(255,255,255,0.07),
    0 24px 42px rgba(0,0,0,0.38);
}

.bomb-device.large .bomb-shell {
  width: 230px;
  height: 190px;
  bottom: 26px;
}

.bomb-shell::before {
  position: absolute;
  left: 50%;
  top: -36px;
  width: 74px;
  height: 54px;
  transform: translateX(-50%);
  border: 13px solid #252f34;
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
  content: "";
  box-shadow: inset 0 8px 12px rgba(255,255,255,0.06);
}

.shell-highlight {
  position: absolute;
  left: 35px;
  top: 24px;
  width: 54px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.13);
  transform: rotate(-22deg);
}

.danger-plate {
  position: absolute;
  left: 50%;
  top: 54px;
  width: 142px;
  transform: translateX(-50%);
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #071014;
  background: linear-gradient(135deg, #ffd05a, #fff1a7);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.bomb-device.large .danger-plate {
  top: 58px;
  width: 160px;
  font-size: 14px;
}

.mini-timer {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 88px;
  transform: translateX(-50%);
  padding: 7px;
  border: 2px solid #111;
  border-radius: 7px;
  background: #0a201d;
  color: #78ffb3;
  font-family: Consolas, monospace;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 0 14px rgba(101,240,162,0.18);
}

.bomb-device.large .mini-timer {
  bottom: 32px;
  width: 96px;
  font-size: 21px;
}

.fuse-cable {
  position: absolute;
  left: calc(50% + 72px);
  top: 22px;
  width: 70px;
  height: 58px;
  border-top: 7px solid var(--orange);
  border-right: 7px solid var(--orange);
  border-radius: 0 42px 0 0;
}

.bomb-device.large .fuse-cable {
  left: calc(50% + 76px);
  top: 22px;
  width: 66px;
  height: 56px;
}

.spark {
  position: absolute;
  left: calc(50% + 133px);
  top: 10px;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(45deg, transparent 42%, #fff2a0 42% 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #ff6f4e 42% 58%, transparent 58%);
  filter: drop-shadow(0 0 8px #ffb347);
  animation: spark 720ms steps(2) infinite;
}

.bomb-device.large .spark {
  left: calc(50% + 132px);
  width: 22px;
  height: 22px;
}

.wire-dock {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: grid;
  gap: 8px;
  width: 280px;
  transform: translateX(-50%);
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  background: rgba(0,0,0,0.24);
}

.bomb-device.large .wire-dock {
  bottom: 0;
  width: min(100%, 390px);
  gap: 12px;
}

.wire {
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.22);
}

.wire.red { background: linear-gradient(90deg, #f14254, #ff8790); }
.wire.blue { background: linear-gradient(90deg, #2a9dff, #7fe5ff); }
.wire.yellow { background: linear-gradient(90deg, #ffc53b, #fff29a); }

.theme-detail {
  position: absolute;
  left: 50%;
  top: 99px;
  display: grid;
  min-width: 74px;
  min-height: 42px;
  place-items: center;
  transform: translateX(-50%);
  color: #dff9ff;
}

.bomb-device.large .theme-detail { top: 103px; transform: translateX(-50%) scale(1.05); }
.theme-detail strong { font-size: 13px; font-weight: 950; }

.coin {
  position: absolute;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe070, #bd7d22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.coin-a { left: 2px; top: 0; }
.coin-b { right: 4px; bottom: 2px; }

.chain-link {
  position: absolute;
  width: 36px;
  height: 20px;
  border: 5px solid #9ed9ff;
  border-radius: 999px;
  transform: rotate(-25deg);
}

.chain-link.second {
  transform: translateX(23px) rotate(25deg);
  border-color: #ffd05a;
}

.chart-line {
  position: absolute;
  width: 86px;
  height: 42px;
  border-left: 2px solid rgba(255,255,255,0.38);
  border-bottom: 2px solid rgba(255,255,255,0.38);
}

.chart-line::before {
  position: absolute;
  left: 6px;
  bottom: 8px;
  width: 70px;
  height: 30px;
  background: linear-gradient(135deg, transparent 44%, #65f0a2 45% 55%, transparent 56%);
  content: "";
}

.dice-face {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #10161a;
  background: #f5fbff;
  font-size: 26px;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(0,0,0,0.26);
}

.popup-ad {
  padding: 8px 12px;
  border: 2px solid #ff5f66;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(135deg, #e52638, #7024a8);
  font-size: 13px;
  font-weight: 950;
  box-shadow: 8px 8px 0 rgba(255,255,255,0.12);
}

.money .bomb-shell { background: radial-gradient(circle at 35% 18%, rgba(255,255,255,0.24), transparent 18%), linear-gradient(145deg, #324236, #101713 66%, #090d0b); }
.referral .bomb-shell { background: radial-gradient(circle at 35% 18%, rgba(255,255,255,0.22), transparent 18%), linear-gradient(145deg, #263846, #0b1117 66%, #080b0f); }
.profit .bomb-shell { background: radial-gradient(circle at 35% 18%, rgba(255,255,255,0.22), transparent 18%), linear-gradient(145deg, #2e403f, #0b1514 66%, #080d0d); }
.luck .bomb-shell { background: radial-gradient(circle at 35% 18%, rgba(255,255,255,0.22), transparent 18%), linear-gradient(145deg, #40364b, #120e17 66%, #0a080d); }
.ad .bomb-shell { background: radial-gradient(circle at 35% 18%, rgba(255,255,255,0.22), transparent 18%), linear-gradient(145deg, #453034, #170c0e 66%, #0d0809); }

.bomb-card.defused .bomb-device,
.bomb-device.defused {
  filter: saturate(0.6);
}

.bomb-card.defused .spark,
.bomb-device.defused .spark {
  display: none;
}

.bomb-card.defused .wire,
.bomb-device.defused .wire {
  opacity: 0.3;
  transform: translateX(12px);
}

.bomb-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bomb-card-footer p {
  margin-bottom: 0;
  color: #d8e6eb;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.open-defusal {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #071014;
  background: linear-gradient(135deg, var(--yellow), #fff0a1);
  font-weight: 950;
  cursor: pointer;
}

.open-defusal:disabled {
  color: #102016;
  background: linear-gradient(135deg, #65f0a2, #c2ffd9);
  cursor: default;
}

.briefing-modal,
.defusal-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(101,229,255,0.16), transparent 30%),
    rgba(3, 7, 10, 0.88);
  backdrop-filter: blur(14px);
}

.briefing-modal.hidden { display: none; }

.modal-panel,
.defusal-panel {
  position: relative;
  width: min(620px, 100%);
  padding: 34px;
  border: 1px solid rgba(101,229,255,0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(26,42,52,0.98), rgba(10,16,20,0.98));
  box-shadow: 0 28px 90px rgba(0,0,0,0.62), 0 0 70px rgba(101,229,255,0.13);
  overflow: hidden;
}

.modal-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(101,229,255,0.04) 8px 10px);
  pointer-events: none;
}

.modal-badge {
  position: relative;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #071014;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 950;
}

.modal-panel h1 {
  position: relative;
  margin-bottom: 12px;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.02;
}

.modal-panel p {
  position: relative;
  color: #dbeaf0;
  font-size: 18px;
  line-height: 1.75;
}

.primary-button,
.secondary-button {
  position: relative;
  border: 0;
  border-radius: 8px;
  color: #071014;
  background: linear-gradient(135deg, var(--yellow), #ffec9e);
  box-shadow: 0 12px 28px rgba(255,208,90,0.2);
  font-weight: 950;
  cursor: pointer;
}

.primary-button {
  min-height: 54px;
  padding: 0 22px;
  font-size: 18px;
}

.secondary-button {
  justify-self: start;
  min-height: 48px;
  padding: 0 18px;
}

.defusal-modal {
  z-index: 25;
  display: none;
}

.defusal-modal.visible { display: grid; }

.defusal-panel {
  width: min(1040px, 100%);
  padding: 20px;
}

.defusal-panel::before {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(101,229,255,0.035) 9px 11px),
    linear-gradient(90deg, rgba(255,95,102,0.07), transparent 32%, rgba(101,240,162,0.07));
  content: "";
  pointer-events: none;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,0.08);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
}

.defusal-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-right: 48px;
}

.defusal-head h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
}

.defusal-timer {
  padding: 10px 14px;
  border: 2px solid rgba(101,240,162,0.38);
  border-radius: 8px;
  color: #78ffb3;
  background: #081715;
  font-family: Consolas, monospace;
  font-size: 28px;
  font-weight: 950;
  box-shadow: inset 0 0 18px rgba(101,240,162,0.18);
}

.defusal-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
  align-items: start;
  gap: 20px;
  margin-top: 12px;
}

.large-bomb {
  min-height: 312px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.09), transparent 42%),
    rgba(0,0,0,0.22);
}

.quiz-console {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)),
    rgba(0,0,0,0.2);
}

.console-label {
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  color: #071014;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 950;
}

.quiz-console h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.38;
}

.wire-choices {
  display: grid;
  gap: 8px;
}

.wire-choice {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  text-align: left;
  font-weight: 850;
  line-height: 1.45;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.wire-choice:hover,
.wire-choice:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(101,229,255,0.5);
  outline: none;
}

.choice-wire {
  height: 13px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.24);
}

.wire-choice.red .choice-wire { background: linear-gradient(90deg, #f14254, #ff8790); }
.wire-choice.blue .choice-wire { background: linear-gradient(90deg, #2a9dff, #7fe5ff); }
.wire-choice.yellow .choice-wire { background: linear-gradient(90deg, #ffc53b, #fff29a); }

.wire-choice.selected {
  border-color: rgba(101,229,255,0.68);
  background: rgba(101,229,255,0.1);
}

.wire-choice.correct {
  border-color: rgba(101,240,162,0.75);
  background: rgba(101,240,162,0.14);
}

.wire-choice.wrong {
  border-color: rgba(255,95,102,0.78);
  background: rgba(255,95,102,0.14);
  animation: shake 260ms ease;
}

.defusal-feedback {
  min-height: 40px;
  margin: 10px 0 10px;
  color: #d9f6ff;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.6;
}

.defuse-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #071014;
  background: linear-gradient(135deg, #65f0a2, #d5ffe5);
  box-shadow: 0 12px 28px rgba(101,240,162,0.18);
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
}

.defuse-button:disabled {
  color: #b5c0c5;
  background: rgba(255,255,255,0.1);
  box-shadow: none;
  cursor: not-allowed;
}

.completion-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(101,240,162,0.22), transparent 31%),
    linear-gradient(145deg, #071015, #10221b 58%, #071015);
}

.completion-screen.visible { display: grid; }

.completion-glow {
  position: absolute;
  width: 70vmin;
  height: 70vmin;
  border: 1px solid rgba(101,240,162,0.24);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(101,240,162,0.14), inset 0 0 80px rgba(101,240,162,0.08);
  animation: pulse 2.8s ease-in-out infinite;
}

.completion-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  align-items: center;
  gap: 20px;
  width: min(920px, 100%);
  min-height: 520px;
  padding: 34px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04)),
    rgba(9,17,20,0.94);
  box-shadow: 0 30px 110px rgba(0,0,0,0.55);
  overflow: hidden;
}

.completion-card::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(101,240,162,0.18);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.complete-copy {
  position: relative;
  z-index: 1;
}

.complete-copy h2 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.96;
}

.lead {
  color: var(--green);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 950;
  line-height: 1.35;
}

.complete-copy p:not(.eyebrow):not(.lead) {
  color: #dcecf0;
  font-size: 20px;
  font-weight: 780;
  line-height: 1.65;
}

.mascot {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  justify-self: center;
  filter: drop-shadow(0 24px 42px rgba(0,0,0,0.52));
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes spark {
  0%, 100% { opacity: 0.7; transform: rotate(0deg) scale(0.86); }
  50% { opacity: 1; transform: rotate(20deg) scale(1.14); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.68; }
  50% { transform: scale(1.05); opacity: 1; }
}

@media (max-width: 980px) {
  .mission-hud,
  .mission-layout,
  .completion-card,
  .defusal-body {
    grid-template-columns: 1fr;
  }

  .mission-hud { display: grid; }
  .hud-meters { width: 100%; }
  .meter-card { flex: 1; }
  .intel-panel { position: relative; top: auto; }
  .bomb-grid { grid-template-columns: 1fr; }
  .completion-card { text-align: center; }
  .secondary-button { justify-self: center; }
  .large-bomb { min-height: 285px; }
  .bomb-device.large { height: 275px; }
}

@media (max-width: 560px) {
  .app {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .bomb-card { min-height: auto; padding: 14px; }
  .bomb-card-footer { align-items: stretch; flex-direction: column; }
  .open-defusal { width: 100%; }
  .modal-panel,
  .completion-card,
  .defusal-panel { padding: 22px; }
  .defusal-head { display: grid; padding-right: 44px; }
  .defusal-timer { width: fit-content; font-size: 23px; }
  .wire-choice { grid-template-columns: 56px 1fr; }
  .large-bomb { min-height: 245px; }
  .bomb-device.large { height: 235px; width: min(100%, 285px); }
  .bomb-device.large .bomb-shell {
    width: 190px;
    height: 156px;
  }
  .bomb-device.large .danger-plate {
    top: 45px;
    width: 136px;
    font-size: 12px;
  }
  .bomb-device.large .theme-detail { top: 82px; transform: translateX(-50%) scale(0.9); }
  .bomb-device.large .mini-timer {
    bottom: 25px;
    width: 82px;
    font-size: 18px;
  }
  .bomb-device.large .wire-dock {
    width: min(100%, 260px);
    gap: 7px;
    padding: 9px;
  }
  .defusal-panel {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
  .complete-copy p:not(.eyebrow):not(.lead) { font-size: 16px; }
}
