body.stage2-ui-active {
  --eq-frame-width: 1920px;
  --eq-frame-height: 1080px;
  --eq-shell-gap: clamp(18px, calc(var(--eq-frame-width) * 0.018), 28px);
  --eq-home-pill-width: 68px;
  --eq-inventory-width: 68px;
  --eq-inventory-height: 0px;
  --eq-inventory-bottom: clamp(216px, calc(var(--eq-frame-height) * 0.22), 252px);
  --dialogue-hud-bottom: 28px;
  background: #030912;
}

body.stage2-ui-active #viewport,
body.stage2-ui-active #game-root,
body.stage2-ui-active #scene-root,
body.stage2-ui-active .game-frame {
  background: #030912;
}

.stage2-screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  color: #eef8ff;
  background: #030912;
}

.stage2-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 12, 22, 0.08) 0%, rgba(5, 11, 20, 0.22) 100%),
    url("../assets/images/s2.png") center / cover no-repeat;
  filter: saturate(1.02) brightness(1.02);
}

.stage2-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 196, 120, 0.18), transparent 38%),
    linear-gradient(90deg, rgba(6, 12, 22, 0.18) 0%, transparent 14%, transparent 86%, rgba(6, 12, 22, 0.18) 100%);
  opacity: 0.75;
  pointer-events: none;
}

.stage2-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 8, 14, 0.12) 100%);
  pointer-events: none;
}

.stage2-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.03) 42%, rgba(0, 0, 0, 0.12)),
    radial-gradient(circle at 50% 54%, transparent 0 34%, rgba(0, 0, 0, 0.08) 82%);
  pointer-events: none;
}

.stage2-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 0 var(--eq-shell-gap);
  pointer-events: none;
}

.stage2-mission {
  max-width: 560px;
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(237, 249, 255, 0.96);
  background: rgba(5, 16, 30, 0.76);
  border: 1px solid rgba(127, 220, 255, 0.28);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage2-hud {
  max-width: calc(100% - 620px);
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  background: rgba(5, 16, 30, 0.78);
  border: 1px solid rgba(128, 226, 255, 0.28);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
  pointer-events: auto;
  overflow: hidden;
}

.stage2-hud span {
  min-width: 0;
  padding: 0 7px;
  color: rgba(231, 249, 255, 0.94);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.stage2-hud span + span {
  border-left: 1px solid rgba(142, 226, 255, 0.22);
}

.stage2-home-btn {
  min-width: var(--eq-home-pill-width);
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, #4f8fff, #2f63e8);
  box-shadow: 0 12px 24px rgba(18, 65, 160, 0.34);
  font-size: 15px;
  font-weight: 950;
  pointer-events: auto;
  cursor: pointer;
}

.stage2-toolbox {
  position: absolute;
  left: 36px;
  top: 50%;
  z-index: 42;
  width: var(--eq-inventory-width);
  padding: 7px 6px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(54, 38, 24, 0.94), rgba(23, 16, 12, 0.98));
  border: 1px solid rgba(255, 220, 128, 0.18);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26), inset 0 0 18px rgba(255, 190, 80, 0.06);
}

.stage2-tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: rgba(239, 250, 255, 0.68);
  background: linear-gradient(180deg, rgba(28, 38, 55, 0.96), rgba(11, 17, 28, 0.98));
  border: 1px solid rgba(141, 213, 255, 0.16);
  font-size: 12px;
  font-weight: 950;
}

.stage2-tool-icon.active {
  color: #ffffff;
  border-color: rgba(126, 230, 255, 0.82);
  box-shadow: 0 0 22px rgba(75, 216, 255, 0.42);
}

.stage2-tool-icon.locked {
  color: rgba(255, 255, 255, 0.35);
  filter: saturate(0.4);
}

.stage2-play-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 86px 100px 190px;
  pointer-events: none;
}

.stage2-center-panel {
  position: relative;
  z-index: 3;
  width: min(620px, calc(100% - 80px));
  padding: 44px 48px;
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(89, 220, 255, 0.12), transparent 52%),
    rgba(5, 18, 31, 0.9);
  border: 1px solid rgba(114, 226, 255, 0.48);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.48), inset 0 0 40px rgba(62, 174, 255, 0.08);
  pointer-events: auto;
}

.stage2-center-panel span {
  display: block;
  color: #7feaff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.stage2-stage-title {
  display: block;
  margin-bottom: 14px;
  color: rgba(233, 249, 255, 0.86);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.stage2-center-panel h2 {
  margin: 12px 0 12px;
  color: #ffffff;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 20px rgba(91, 220, 255, 0.5);
}

.stage2-center-panel p {
  margin: 0 0 26px;
  color: rgba(231, 247, 255, 0.84);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.55;
}

.stage2-primary-btn,
.stage2-retry-panel button {
  min-width: 190px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #5de4ff, #2576ef);
  box-shadow: 0 12px 26px rgba(0, 83, 190, 0.36), 0 0 22px rgba(81, 220, 255, 0.3);
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}

.stage2-fixed-actions {
  /* 위치·정렬: ui.css support dock 공통 규칙 */
  flex-direction: row;
  pointer-events: auto;
}

.stage2-fixed-actions button {
  width: 92px;
  height: 46px;
  border-radius: 16px;
  color: #eafaff;
  background: linear-gradient(180deg, rgba(13, 36, 61, 0.9), rgba(5, 19, 36, 0.94));
  border: 1px solid rgba(115, 226, 255, 0.5);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24), 0 0 16px rgba(72, 210, 255, 0.18);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.stage2-security-gate {
  position: absolute;
  left: 50%;
  top: 135px;
  z-index: 1;
  width: 260px;
  height: 180px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border-radius: 7px;
  border: 1px solid rgba(255, 90, 120, 0.38);
  color: rgba(255, 235, 240, 0.92);
  background: linear-gradient(90deg, rgba(35, 8, 16, 0.9), rgba(12, 20, 34, 0.96));
  box-shadow: 0 0 34px rgba(255, 57, 94, 0.18);
  font-size: 24px;
  font-weight: 950;
}

.stage2-security-gate.open {
  border-color: rgba(96, 240, 255, 0.72);
  color: #eaffff;
  background: linear-gradient(90deg, transparent 0 32%, rgba(83, 226, 255, 0.38) 33% 38%, rgba(7, 20, 32, 0.96) 39% 100%);
  box-shadow: 0 0 44px rgba(84, 226, 255, 0.34);
}

.stage2-arcade-arena {
  position: relative;
  width: min(1050px, calc(100% - 240px));
  height: min(740px, calc(100% - 70px));
  min-height: 610px;
  margin-top: 56px;
  border-radius: 8px;
  overflow: visible;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(5, 17, 31, 0.86), rgba(3, 10, 20, 0.9)),
    radial-gradient(circle at 50% 0%, rgba(82, 213, 255, 0.14), transparent 46%);
  border: 1px solid rgba(113, 222, 255, 0.5);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.48), inset 0 0 42px rgba(46, 155, 255, 0.08);
}

.stage2-drone-arena {
  display: grid;
  grid-template-rows: minmax(470px, 1fr) 90px auto;
  gap: 14px;
  padding: 88px 18px 142px;
}

.stage2-drone-board {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border-radius: 8px;
}

.corridor-drone-hudline {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  z-index: 18;
}

.corridor-drone-hudline .stage2-data-target b,
.corridor-drone-hudline .stage2-data-target b span {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.stage2-entity-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.corridor-stage-screen > .stage2-entity-layer.stage2-missile-layer--screen,
.corridor-stage-screen > #stage2-missile-layer {
  position: absolute;
  inset: 0;
  z-index: 47;
  pointer-events: none;
  overflow: visible;
}

.stage2-defense-line {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 96px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(112, 235, 255, 0.78), transparent);
  box-shadow: 0 0 18px rgba(112, 235, 255, 0.52);
}

.stage2-turret {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 8;
  width: 170px;
  height: 230px;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

.stage2-turret.charging {
  filter: brightness(0.88);
}

.stage2-turret.charging::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 168px;
  height: 168px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(135, 244, 255, 0.45);
  animation: stage2-charge-pulse 0.4s ease;
  pointer-events: none;
}

.stage2-drone-guide {
  position: absolute;
  left: 50%;
  bottom: 106px;
  z-index: 9;
  padding: 8px 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  color: rgba(236, 250, 255, 0.92);
  background: rgba(6, 20, 35, 0.84);
  border: 1px solid rgba(128, 227, 255, 0.38);
  font-size: 13px;
  font-weight: 950;
}

.stage2-drone-guide.hidden {
  display: none;
}

.stage2-aim-reticle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 7;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  pointer-events: none;
  border: 2px solid rgba(169, 249, 255, 0.86);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(95, 232, 255, 0.62);
  will-change: transform;
}

.stage2-aim-reticle::before,
.stage2-aim-reticle::after {
  content: "";
  position: absolute;
  background: rgba(169, 249, 255, 0.86);
}

.stage2-aim-reticle::before {
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 2px;
  transform: translateX(-50%);
}

.stage2-aim-reticle::after {
  left: -8px;
  right: -8px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.stage2-drone-control-panel {
  position: relative;
  z-index: 32;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 72px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgba(4, 13, 24, 0.62);
  border: 1px solid rgba(112, 220, 255, 0.24);
}

.stage2-control-caption {
  color: rgba(228, 248, 255, 0.72);
  font-size: 12px;
  font-weight: 950;
}

.stage2-missile-slots {
  display: flex;
  gap: 14px;
}

.stage2-missile-slots button {
  width: 144px;
  height: 78px;
  padding: 6px 8px 8px;
  border-radius: 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
  gap: 6px;
  color: #e8f9ff;
  background: #0a1f33;
  border: 1px solid #4ec8ef;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  font-weight: 950;
  cursor: pointer;
}

.stage2-missile-slots button.active {
  color: #ffffff;
  background: linear-gradient(180deg, #65e9ff, #2879f2);
  border-color: #d3ffff;
  box-shadow: 0 0 26px rgba(83, 220, 255, 0.52);
}

.stage2-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 3px 10px;
  border-radius: 6px;
  color: #9ef0ff;
  background: #143a52;
  border: 1px solid #3aa8d0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.stage2-missile-slots button.active .stage2-keycap {
  color: #0a2a4a;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.95);
}

.stage2-missile-slots strong {
  color: inherit;
  font-size: 27px;
  line-height: 1;
}

.stage2-low-energy #stage2-power,
.stage2-low-time #stage2-drone-time {
  color: #ff7c8f;
  animation: stage2-warning-blink 0.6s ease-in-out infinite;
}

.stage2-drone,
.stage2-missile,
.stage2-float-effect {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.stage2-drone {
  width: 122px;
  min-height: 104px;
  margin-left: -61px;
  margin-top: -52px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: #eaffff;
  background:
    radial-gradient(circle at 50% 20%, rgba(130, 245, 255, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(28, 83, 125, 0.96), rgba(5, 22, 42, 0.98));
  border: 1px solid rgba(132, 232, 255, 0.72);
  box-shadow: 0 0 28px rgba(78, 218, 255, 0.38), inset 0 0 22px rgba(166, 244, 255, 0.08);
}

.stage2-drone-eye {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 42px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #7cf7ff;
  box-shadow: 0 0 14px rgba(124, 247, 255, 0.86);
}

.stage2-drone.hit {
  filter: brightness(1.35);
}

.stage2-drone.wrong {
  border-color: rgba(255, 74, 100, 0.95);
  animation: stage2-shudder 0.22s linear;
}

.stage2-drone.explode {
  animation: stage2-explode 0.32s ease forwards;
}

.stage2-drone-fraction {
  --fraction-line-gap: 0.14em;
  --fraction-line-width: 1.15em;
  --fraction-line-height: 3px;
  margin-top: 18px;
  display: inline-grid;
  justify-items: center;
  color: #f8feff;
  font-size: 28px;
  font-weight: 950;
}

.stage2-drone-fraction .fraction-numerator,
.stage2-drone-fraction .fraction-denominator {
  display: block;
  line-height: 1;
}

.stage2-drone-fraction .fraction-line {
  display: block;
  width: var(--fraction-line-width);
  height: var(--fraction-line-height);
  margin: var(--fraction-line-gap) 0;
  border-radius: 999px;
  background: currentColor;
}

.stage2-missile {
  width: 46px;
  height: 30px;
  margin-left: -23px;
  margin-top: -15px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04233d;
  background: linear-gradient(180deg, #f2ffff, #5ee8ff);
  box-shadow: 0 0 22px rgba(98, 232, 255, 0.78);
  font-size: 14px;
  font-weight: 950;
}

.stage2-float-effect {
  z-index: 20;
  min-width: 80px;
  margin-left: 0;
  padding: 7px 10px;
  border-radius: 999px;
  text-align: center;
  color: #ffffff;
  background: rgba(5, 18, 31, 0.92);
  border: 1px solid rgba(124, 230, 255, 0.6);
  box-shadow: 0 0 20px rgba(92, 226, 255, 0.38);
  font-size: 16px;
  font-weight: 950;
  transform: translate(-50%, -50%);
  animation: stage2-float 0.76s ease forwards;
}

.stage2-float-effect.bad {
  border-color: rgba(255, 87, 112, 0.8);
  color: #ffdce3;
  box-shadow: 0 0 20px rgba(255, 67, 99, 0.38);
}

.stage2-float-effect.critical {
  min-width: 150px;
  color: #fff6c8;
  border-color: rgba(255, 225, 104, 0.9);
  box-shadow: 0 0 30px rgba(255, 214, 82, 0.52);
  font-size: 24px;
}

.stage2-control-tip {
  position: absolute;
  left: 50%;
  bottom: 124px;
  transform: translateX(-50%);
  color: rgba(230, 248, 255, 0.72);
  font-size: 14px;
  font-weight: 850;
}

.stage2-data-arena,
.stage2-track-arena {
  position: relative;
  width: min(1500px, calc(100% - 40px));
  min-height: 760px;
  padding: 22px 28px 26px;
  display: grid;
  gap: 16px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(4, 19, 35, 0.94), rgba(2, 9, 19, 0.96)),
    repeating-linear-gradient(90deg, rgba(112, 230, 255, 0.06) 0 1px, transparent 1px 78px);
  border: 1px solid rgba(116, 232, 255, 0.34);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), inset 0 0 38px rgba(74, 211, 255, 0.08);
  pointer-events: auto;
}

.stage2-data-hudline,
.stage2-track-hudline {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 14px;
}

.stage2-data-meter,
.stage2-track-meter,
.stage2-data-target,
.stage2-track-target {
  min-height: 72px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  color: #effdff;
  background: rgba(3, 17, 31, 0.86);
  border: 1px solid rgba(115, 225, 255, 0.28);
  border-radius: 8px;
}

.stage2-data-target,
.stage2-track-target {
  grid-template-columns: auto 1fr;
}

.stage2-data-meter strong,
.stage2-track-meter strong,
.stage2-data-target span,
.stage2-track-target span {
  color: #9ff3ff;
  font-size: 14px;
  font-weight: 950;
}

.stage2-data-meter span,
.stage2-track-meter span {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.stage2-data-meter i,
.stage2-track-meter i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45f4ff, #64ffc4);
  box-shadow: 0 0 18px rgba(92, 239, 255, 0.58);
}

.stage2-data-meter.energy i,
.stage2-track-meter.energy i {
  background: linear-gradient(90deg, #ffe66d, #5cffc9);
}

.stage2-data-meter b,
.stage2-track-meter b,
.stage2-data-target b,
.stage2-track-target b {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.stage2-data-target strong,
.stage2-track-target strong {
  grid-column: 1 / -1;
  color: #b9fff0;
  font-size: 17px;
  font-weight: 950;
}

.stage2-data-goals,
.stage2-track-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stage2-data-goal,
.stage2-track-status {
  min-height: 82px;
  padding: 13px 16px;
  display: grid;
  gap: 7px;
  align-content: center;
  color: #effdff;
  background: rgba(5, 22, 39, 0.86);
  border: 1px solid rgba(113, 229, 255, 0.24);
  border-radius: 8px;
}

.stage2-data-goal span,
.stage2-track-status span {
  color: #9ff3ff;
  font-size: 17px;
  font-weight: 950;
}

.stage2-data-goal strong,
.stage2-track-status strong {
  color: #d9fbff;
  font-size: 15px;
  font-weight: 950;
}

.stage2-data-goal.complete,
.stage2-track-status.complete {
  border-color: rgba(108, 255, 183, 0.86);
  background: rgba(6, 42, 38, 0.82);
  box-shadow: 0 0 26px rgba(93, 255, 199, 0.18);
}

.stage2-data-play {
  display: grid;
  grid-template-columns: minmax(500px, 620px) 1fr;
  gap: 18px;
  align-items: stretch;
}

.stage2-data-grid {
  position: relative;
  min-height: 560px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(80, 255, 220, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(6, 31, 48, 0.92), rgba(2, 10, 20, 0.96));
  border: 1px solid rgba(116, 232, 255, 0.28);
  border-radius: 8px;
  box-shadow: inset 0 0 30px rgba(89, 237, 255, 0.08);
}

.stage2-data-cell {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(133, 228, 255, 0.12);
}

.stage2-data-block {
  z-index: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: #06121d;
  border-radius: 8px;
  border: 2px solid rgba(163, 255, 247, 0.86);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24), 0 0 22px rgba(91, 239, 255, 0.32);
  transition: transform 0.16s ease, filter 0.16s ease;
  font-weight: 950;
}

.stage2-data-block.fraction {
  background: linear-gradient(180deg, #f9ffff, #84f4ff);
}

.stage2-data-block.multiplier {
  background: linear-gradient(180deg, #fff7c8, #89ffd0);
  font-size: 42px;
}

.stage2-data-block.result {
  color: #fff8d6;
  background: linear-gradient(180deg, rgba(35, 88, 92, 0.98), rgba(10, 35, 42, 0.98));
  border-color: rgba(255, 226, 99, 0.9);
  box-shadow: 0 0 34px rgba(255, 218, 77, 0.34), inset 0 0 18px rgba(98, 255, 207, 0.14);
}

.stage2-data-block.wall {
  color: rgba(239, 252, 255, 0.42);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 8px, rgba(0, 0, 0, 0.16) 8px 16px), rgba(15, 25, 36, 0.96);
  border-color: rgba(180, 204, 220, 0.2);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.42);
}

.stage2-data-block > span {
  color: inherit;
  font-size: 13px;
  font-weight: 950;
}

.stage2-data-fraction,
.stage2-track-fraction {
  font-size: 34px;
}

.stage2-data-side-panel {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 18px;
  background: rgba(4, 16, 30, 0.84);
  border: 1px solid rgba(123, 228, 255, 0.24);
  border-radius: 8px;
}

.stage2-data-side-panel h3 {
  margin: 0;
  color: #9ff3ff;
  font-size: 24px;
  font-weight: 950;
}

.stage2-data-side-panel p {
  margin: 0;
  color: rgba(231, 249, 255, 0.78);
  font-size: 16px;
  font-weight: 850;
}

.stage2-data-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stage2-data-controls button,
.stage2-track-switch,
.stage2-track-toggle {
  min-height: 54px;
  color: #06121d;
  background: linear-gradient(180deg, #ffffff, #8bf2ff);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.stage2-data-feedback,
.stage2-track-feedback {
  min-height: 56px;
  padding: 13px 18px;
  display: grid;
  place-items: center;
  color: rgba(239, 252, 255, 0.94);
  background: rgba(4, 16, 30, 0.84);
  border: 1px solid rgba(123, 228, 255, 0.26);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.stage2-data-feedback.good,
.stage2-track-feedback.good {
  color: #aeffd9;
  border-color: rgba(111, 255, 190, 0.54);
}

.stage2-data-feedback.bad,
.stage2-track-feedback.bad {
  color: #ffd0d0;
  border-color: rgba(255, 118, 128, 0.58);
}

.stage2-data-arena.complete .stage2-data-block.result {
  animation: stage2-data-master-pulse 0.62s ease-in-out infinite alternate;
}

.stage2-track-board {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(21, 45, 67, 0.42), rgba(4, 12, 24, 0.94)),
    repeating-linear-gradient(90deg, rgba(116, 232, 255, 0.08) 0 2px, transparent 2px 86px);
  border: 1px solid rgba(116, 232, 255, 0.28);
  border-radius: 8px;
}

.stage2-track-rail {
  position: absolute;
  inset: 0;
}

.stage2-track-rail-main,
.stage2-track-rail-branch {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: #6ef8ff;
  box-shadow: 0 0 22px rgba(110, 248, 255, 0.58);
}

.stage2-track-rail-main {
  left: 70px;
  right: 250px;
  top: 333px;
}

.stage2-track-rail-branch {
  right: 160px;
  width: 330px;
  transform-origin: left center;
}

.stage2-track-rail-branch.b1 { top: 252px; transform: rotate(-24deg); }
.stage2-track-rail-branch.b2 { top: 306px; transform: rotate(-8deg); }
.stage2-track-rail-branch.b3 { top: 360px; transform: rotate(8deg); }
.stage2-track-rail-branch.b4 { top: 414px; transform: rotate(24deg); }

.stage2-track-cart {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 136px;
  height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #06121d;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8feff, #64eaff);
  border: 2px solid rgba(18, 76, 104, 0.72);
  box-shadow: 0 0 28px rgba(91, 239, 255, 0.44);
  font-size: 12px;
  font-weight: 950;
  will-change: transform;
}

.stage2-track-cart b {
  font-size: 12px;
}

.stage2-track-switch-panel {
  position: absolute;
  right: 28px;
  top: 88px;
  z-index: 8;
  width: 150px;
  display: grid;
  gap: 10px;
}

.stage2-track-switch.active {
  color: #06121d;
  background: linear-gradient(180deg, #fff6b2, #5cffc9);
  box-shadow: 0 0 28px rgba(103, 255, 202, 0.42);
}

.stage2-track-toggle {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 9;
  min-width: 240px;
  transform: translateX(-50%);
}

.stage2-track-door {
  position: absolute;
  right: 24px;
  top: 170px;
  z-index: 5;
  width: 120px;
  height: 170px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(231, 249, 255, 0.92);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 28px),
    linear-gradient(180deg, rgba(40, 55, 70, 0.9), rgba(12, 20, 32, 0.98));
  border: 2px solid rgba(151, 219, 255, 0.28);
  border-radius: 8px;
}

.stage2-track-door span {
  z-index: 2;
  font-size: 15px;
  font-weight: 950;
  writing-mode: vertical-rl;
}

.stage2-track-door i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, rgba(97, 245, 255, 0.2), rgba(80, 255, 190, 0.7));
  transition: height 0.2s ease;
}

.stage2-track-door.open {
  animation: stage2-door-open 0.62s ease both;
}

.stage2-data-arena.shock,
.stage2-track-arena.shock {
  animation: stage2-electric-shock 0.22s linear 2;
}

.stage2-data-arena.warning .stage2-data-meter b,
.stage2-track-arena.warning .stage2-track-meter b {
  color: #ffdf7d;
  animation: stage2-warning-blink 0.44s ease-in-out infinite;
}
  .stage2-retry-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 50;
  width: min(460px, calc(100% - 80px));
  padding: 30px;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 14px;
  justify-items: center;
  border-radius: 8px;
  background: rgba(6, 18, 32, 0.94);
  border: 1px solid rgba(255, 98, 122, 0.45);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.46), 0 0 28px rgba(255, 72, 104, 0.18);
}

.stage2-retry-panel h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
}

.stage2-clear-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.stage2-shake {
  animation: stage2-screen-shake 0.26s linear;
}

@keyframes stage2-float {
  0% { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.94); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 36px)) scale(1.05); }
}

@keyframes stage2-shudder {
  0%, 100% { margin-left: -61px; }
  25% { margin-left: -69px; }
  50% { margin-left: -53px; }
  75% { margin-left: -65px; }
}

@keyframes stage2-explode {
  to { opacity: 0; filter: brightness(2); }
}

@keyframes stage2-screen-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-8px, 0); }
  50% { transform: translate(7px, 0); }
  75% { transform: translate(-4px, 0); }
}

@keyframes stage2-energy-flow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}

@keyframes stage2-charge-pulse {
  from { transform: scale(0.85); opacity: 0.95; }
  to { transform: scale(1.18); opacity: 0; }
}

@keyframes stage2-data-master-pulse {
  from { filter: brightness(1); transform: scale(1); }
  to { filter: brightness(1.25); transform: scale(1.04); }
}

@keyframes stage2-warning-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

@keyframes stage2-electric-shock {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  25% { transform: translateX(-5px); filter: brightness(1.8); }
  50% { transform: translateX(4px); filter: brightness(0.78); }
  75% { transform: translateX(-3px); filter: brightness(1.55); }
}

@keyframes stage2-door-open {
  0% { transform: translateX(0); }
  40% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

@media (max-aspect-ratio: 16 / 9) {
  .stage2-arcade-arena {
    width: min(980px, calc(100% - 190px));
  }

  .stage2-hud span {
    padding: 0 6px;
    font-size: 11px;
  }
}

/* =========================
   STAGE 2 CORRIDOR RENEWAL
========================= */

.corridor-stage-screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  color: #f4fbff;
}

.corridor-bg {
  background:
    linear-gradient(90deg, rgba(7, 13, 21, 0.2), rgba(18, 34, 46, 0.08) 42%, rgba(9, 15, 22, 0.22)),
    linear-gradient(180deg, rgba(8, 14, 22, 0.04) 0%, rgba(5, 10, 18, 0.18) 100%),
    url("../assets/images/s2.png") center / cover no-repeat;
  filter: saturate(1.04) brightness(1.04);
}

.corridor-bg::before {
  background:
    radial-gradient(circle at 80% 22%, rgba(255, 190, 110, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(182, 225, 255, 0.05), transparent 24%);
}

.corridor-bg::after {
  background: linear-gradient(180deg, transparent 0 78%, rgba(8, 12, 18, 0.14) 78% 100%);
}

.corridor-topbar {
  background: rgba(6, 14, 23, 0.92);
  border-bottom: 1px solid rgba(103, 209, 255, 0.24);
}

.corridor-mission {
  color: #eaf8ff;
  letter-spacing: 0;
}

.corridor-hud span {
  color: #dff5ff;
}

.corridor-hud b {
  color: #7de2ff;
}

.corridor-home-btn,
.corridor-fixed-actions button,
.corridor-puzzle-actions button,
.stage2-primary-btn {
  letter-spacing: 0;
}

.corridor-inventory {
  position: absolute;
  right: 20px;
  top: 96px;
  z-index: 132;
  width: 168px;
  padding: 12px;
  border-radius: 8px 0 0 8px;
  background: rgba(7, 16, 27, 0.86);
  border: 1px solid rgba(122, 218, 255, 0.22);
  border-right: none;
  box-shadow: -14px 18px 34px rgba(0, 0, 0, 0.26);
}

.corridor-inventory h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #ccefff;
  text-align: center;
}

.corridor-inventory ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.corridor-inventory-slot {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  border: 1px dashed rgba(218, 238, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(231, 246, 255, 0.72);
}

.corridor-inventory-slot.filled {
  justify-content: flex-start;
  border-style: solid;
  border-color: rgba(113, 213, 255, 0.36);
  background: rgba(65, 128, 172, 0.18);
  color: #f3fbff;
}

.corridor-inventory-slot span {
  min-width: 38px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(125, 226, 255, 0.14);
  color: #9eeaff;
  font-size: 12px;
  font-weight: 900;
}

.corridor-play-layer {
  padding: 108px 76px calc(28px + var(--dialogue-hud-height, 86px) + 20px) 76px;
  box-sizing: border-box;
  pointer-events: auto;
}

.corridor-intro-panel,
.corridor-clear-panel {
  background: rgba(9, 20, 32, 0.78);
  border: 1px solid rgba(128, 221, 255, 0.24);
}

.corridor-intro-panel h2,
.corridor-clear-panel h2 {
  color: #ffffff;
}

.corridor-intro-panel p,
.corridor-clear-panel p {
  color: #d6e8f2;
}

.corridor-puzzle {
  position: relative;
  width: min(1240px, 100%);
  min-height: 750px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.corridor-puzzle-card {
  position: relative;
  z-index: 2;
  width: min(800px, 100%);
  padding: 30px;
  border-radius: 8px;
  background: rgba(8, 18, 29, 0.9);
  border: 1px solid rgba(121, 214, 255, 0.28);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: auto;
}

.corridor-drone-card {
  width: min(920px, 100%);
}

.corridor-drone-board {
  min-height: 330px;
  margin: 20px 0 16px;
  background:
    radial-gradient(circle at 50% 34%, rgba(91, 226, 255, 0.14), transparent 36%),
    rgba(4, 13, 24, 0.6);
  border: 1px solid rgba(112, 220, 255, 0.24);
}

.corridor-drone-static {
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
}

.corridor-drone-progress {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 8px;
  color: #cdefff;
  background: rgba(4, 13, 24, 0.78);
  border: 1px solid rgba(112, 220, 255, 0.24);
  font-weight: 900;
}

.corridor-drone-controls {
  min-height: 132px;
}

.corridor-divisor-slots {
  flex-wrap: wrap;
  justify-content: center;
}

.corridor-step-label {
  margin: 0 0 8px;
  color: #7de2ff;
  font-weight: 900;
  font-size: 15px;
}

.corridor-puzzle-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.corridor-puzzle-card p {
  color: #d8e9f2;
  font-size: 18px;
  line-height: 1.55;
}

.corridor-school-hall {
  position: absolute;
  inset: 30px 0 auto 0;
  height: 120px;
  display: flex;
  justify-content: space-around;
  opacity: 0.85;
}

.ceiling-light {
  width: 170px;
  height: 18px;
  border-radius: 6px;
  background: rgba(246, 188, 72, 0.22);
  box-shadow: 0 0 26px rgba(246, 188, 72, 0.16);
}

.ceiling-light.on {
  background: #91e8ff;
  box-shadow: 0 0 34px rgba(125, 226, 255, 0.76);
}

.corridor-puzzle-actions,
.breaker-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.corridor-puzzle-actions {
  justify-content: center;
  margin-top: 24px;
}

.corridor-feedback {
  min-height: 26px;
  margin: 18px 0 0;
  color: #ffe08a;
  font-weight: 800;
}

.corridor-feedback.good {
  color: #8df7c6;
}

.corridor-feedback.bad {
  color: #ff9b9b;
}

.common-catch-game {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-rows: auto minmax(540px, 1fr);
  gap: 12px;
  width: min(1120px, 74vw);
  min-height: 690px;
  margin: 18px auto 0;
  color: #eaffff;
}

.common-catch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 22px;
  border: 2px solid rgba(105, 221, 255, 0.42);
  border-radius: 8px;
  background: rgba(3, 14, 28, 0.82);
  box-shadow: 0 0 26px rgba(64, 190, 255, 0.18), inset 0 0 28px rgba(105, 221, 255, 0.06);
}

.common-catch-header h2 {
  margin: 2px 0 5px;
  color: #ffffff;
  font-size: 31px;
  line-height: 1;
}

.common-catch-header p {
  margin: 0;
  color: rgba(220, 247, 255, 0.84);
  font-size: 17px;
  font-weight: 900;
}

.common-catch-header .common-catch-controls {
  margin-top: 6px;
  color: rgba(143, 255, 220, 0.86);
  font-size: 14px;
}

body.stage2-ui-active:has(#dialogue-panel:not(.hidden)) .common-catch-controls,
body.stage2-ui-active:has(#dialogue-panel:not(.hidden)) .common-catch-toast,
body.stage2-ui-active:has(#dialogue-panel:not(.hidden)) .common-catch-equation {
  opacity: 0;
}

.common-catch-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.common-catch-actions .hidden {
  display: none;
}

.common-catch-arena {
  position: relative;
  overflow: hidden;
  min-height: 510px;
  border: 2px solid rgba(105, 221, 255, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 105%, rgba(124, 88, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(3, 16, 30, 0.96), rgba(2, 8, 17, 0.98));
  box-shadow: inset 0 0 44px rgba(36, 159, 255, 0.12), 0 22px 42px rgba(0, 0, 0, 0.34);
}

.common-catch-corridor-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 24%, rgba(92, 212, 255, 0.08) 24.2% 24.6%, transparent 25% 49%, rgba(92, 212, 255, 0.07) 49.2% 49.6%, transparent 50% 74%, rgba(92, 212, 255, 0.08) 74.2% 74.6%, transparent 75%),
    linear-gradient(180deg, transparent 0 18%, rgba(136, 109, 255, 0.1) 18.2% 18.6%, transparent 19% 42%, rgba(136, 109, 255, 0.08) 42.2% 42.5%, transparent 43%);
  opacity: 0.72;
}

.common-catch-chip-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.common-chip {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 48px;
  margin-left: -32px;
  margin-top: -24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  border: 1px solid rgba(223, 255, 255, 0.78);
  font-size: 24px;
  font-weight: 1000;
  box-shadow: 0 0 22px rgba(93, 226, 255, 0.5);
  will-change: transform;
}

.common-chip.multiply {
  background: linear-gradient(180deg, rgba(88, 236, 255, 0.98), rgba(43, 109, 240, 0.96));
}

.common-chip.divide {
  background: linear-gradient(180deg, rgba(183, 112, 255, 0.98), rgba(77, 38, 179, 0.96));
}

.common-cart {
  position: absolute;
  left: 0;
  bottom: 28px;
  width: 168px;
  height: 112px;
  margin-left: -84px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 2px solid rgba(117, 227, 255, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 16%, rgba(108, 255, 220, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(21, 75, 111, 0.96), rgba(5, 20, 42, 0.98));
  box-shadow: 0 0 24px rgba(72, 202, 255, 0.22), inset 0 0 18px rgba(174, 252, 255, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.common-cart::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5ee8ff, #9d7cff, #60ffc8);
  box-shadow: 0 0 16px rgba(95, 232, 255, 0.68);
}

.common-cart.dragging {
  border-color: rgba(143, 255, 220, 0.98);
  box-shadow: 0 0 34px rgba(94, 255, 207, 0.72), inset 0 0 24px rgba(143, 255, 220, 0.16);
  cursor: grabbing;
  animation: common-cart-glow 0.82s ease-in-out infinite alternate;
}

.common-cart.ready {
  border-color: rgba(143, 255, 220, 0.88);
  background:
    radial-gradient(circle at 50% 16%, rgba(108, 255, 220, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(18, 102, 88, 0.96), rgba(5, 35, 42, 0.98));
}

.common-cart.ready::before {
  content: attr(data-target);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  color: #062e28;
  background: #8df7c6;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 0 14px rgba(141, 247, 198, 0.65);
}

.common-cart span {
  color: rgba(219, 249, 255, 0.76);
  font-size: 14px;
  font-weight: 1000;
}

.common-cart strong {
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(95, 232, 255, 0.64);
}

.common-stacked-fraction {
  display: inline-grid;
  justify-items: center;
  align-items: center;
  min-width: 76px;
  line-height: 0.92;
}

.common-stacked-fraction span {
  color: #ffffff;
  font-size: 38px;
  font-weight: 1000;
}

.common-stacked-fraction i {
  width: 100%;
  height: 3px;
  margin: 4px 0;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.common-catch-bridge {
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: 90px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(116, 255, 215, 0.95), rgba(121, 151, 255, 0.95), transparent);
  opacity: 0;
  transform: scaleX(0.3);
  box-shadow: 0 0 28px rgba(116, 255, 215, 0.75);
  transition: opacity 0.28s ease, transform 0.42s ease;
}

.common-catch-bridge.active {
  opacity: 1;
  transform: scaleX(1);
}

.common-catch-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(233, 255, 255, 0.8), rgba(117, 235, 255, 0.3) 28%, transparent 62%);
}

.common-catch-flash.active {
  animation: common-success-flash 0.9s ease-out;
}

.common-catch-toast {
  position: absolute;
  left: 50%;
  top: 18px;
  max-width: min(820px, calc(100% - 48px));
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(3, 14, 28, 0.78);
  border: 1px solid rgba(105, 221, 255, 0.24);
  color: #ffe08a;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 5;
}

.common-catch-toast:not(:empty) {
  opacity: 1;
}

.common-catch-toast.good {
  color: #8df7c6;
}

.common-catch-toast.bad {
  color: #ff9b9b;
}

.common-catch-equation {
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  min-height: 24px;
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 1000;
  text-shadow: 0 0 16px rgba(96, 255, 200, 0.42);
  pointer-events: none;
  z-index: 5;
}

body.s24-fixed-viewport-active .corridor-play-layer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 108px 0 calc(28px + var(--dialogue-hud-height, 86px) + 20px) 0;
  box-sizing: border-box;
}

body.s24-fixed-viewport-active .common-catch-game {
  width: 1120px;
  min-width: 1120px;
  max-width: 1120px;
  min-height: 690px;
  margin: 18px auto 0;
  grid-template-rows: auto 540px;
}

body.s24-fixed-viewport-active .common-catch-arena {
  width: 1120px;
  min-width: 1120px;
  min-height: 540px;
  height: 540px;
}

@keyframes common-cart-glow {
  from {
    filter: brightness(1);
  }

  to {
    filter: brightness(1.18);
  }
}

@keyframes common-success-flash {
  0% {
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.corridor-fire-door {
  position: absolute;
  right: 12px;
  top: 190px;
  width: 210px;
  height: 420px;
  border-radius: 8px;
  background: linear-gradient(90deg, #212b31, #35434a);
  border: 4px solid #111a20;
  box-shadow: inset 22px 0 0 rgba(255, 255, 255, 0.04), 0 24px 42px rgba(0, 0, 0, 0.35);
}

.corridor-fire-door span {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  min-width: 116px;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(8, 14, 19, 0.86);
  border: 1px solid rgba(255, 98, 98, 0.45);
  color: #ffb0b0;
  text-align: center;
  font-weight: 900;
}

.corridor-fire-door.half-open span {
  border-color: rgba(125, 226, 255, 0.55);
  color: #aeeeff;
}

.corridor-fire-door.open {
  transform: translateX(86px) skewY(-2deg);
  filter: brightness(1.18);
}

.corridor-fire-door.open span {
  border-color: rgba(141, 247, 198, 0.6);
  color: #8df7c6;
}

.breaker-card {
  margin-right: 150px;
}

.breaker-device {
  margin: 22px 0;
  padding: 18px;
  border-radius: 8px;
  background: rgba(13, 25, 35, 0.86);
  border: 1px solid rgba(178, 205, 218, 0.16);
}

.breaker-light {
  width: 22px;
  height: 22px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #ffd45e;
  box-shadow: 0 0 18px rgba(255, 212, 94, 0.8);
}

.breaker-light.blue {
  background: #63d9ff;
  box-shadow: 0 0 22px rgba(99, 217, 255, 0.9);
}

.breaker-wire-row {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 8px;
  align-items: center;
}

.breaker-wire {
  min-height: 118px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.breaker-wire span {
  display: block;
  margin-bottom: 12px;
  color: #a9c4d2;
  font-size: 15px;
}

.breaker-wire strong {
  font-size: 38px;
  color: #ffffff;
}

.breaker-link {
  height: 10px;
  border-radius: 10px;
  background: repeating-linear-gradient(90deg, rgba(255, 211, 90, 0.35) 0 14px, rgba(255, 211, 90, 0.08) 14px 28px);
}

.breaker-wire.connected,
.breaker-link.connected {
  border-color: rgba(99, 217, 255, 0.42);
  background-color: rgba(43, 123, 154, 0.2);
  box-shadow: 0 0 22px rgba(99, 217, 255, 0.22);
}

.breaker-input-section label,
.numerator-inputs label {
  display: block;
  color: #e9f8ff;
  font-size: 18px;
  font-weight: 850;
}

.denominator-input,
.numerator-input {
  width: 150px;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 8px;
  border: 2px solid rgba(121, 214, 255, 0.28);
  background: rgba(3, 9, 15, 0.82);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.numerator-inputs {
  display: none;
  margin-top: 22px;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.numerator-inputs.visible {
  display: flex;
  animation: stage2-panel-rise 0.22s ease both;
}

.numerator-inputs label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.corridor-next-puzzle {
  margin-top: 18px;
}

.corridor-light-strip {
  position: absolute;
  left: 80px;
  right: 80px;
  top: 112px;
  display: flex;
  justify-content: space-around;
}

.corridor-light-strip span {
  width: 210px;
  height: 18px;
  border-radius: 7px;
  background: #91e8ff;
  box-shadow: 0 0 42px rgba(145, 232, 255, 0.82);
}

.science-stage-screen {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #07111b 0%, #122837 52%, #0b151e 100%);
  overflow: hidden;
}

.science-stage-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(142, 211, 235, 0.08) 0 2px, transparent 2px 120px),
    linear-gradient(180deg, rgba(125, 226, 255, 0.1), transparent 36%);
}

.science-stage-panel {
  position: relative;
  z-index: 2;
  width: min(760px, 90%);
  padding: 42px;
  border-radius: 8px;
  background: rgba(8, 18, 29, 0.88);
  border: 1px solid rgba(125, 226, 255, 0.26);
  text-align: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.science-stage-panel p {
  margin: 0 0 10px;
  color: #7de2ff;
  font-size: 18px;
  font-weight: 900;
}

.science-stage-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 42px;
}

.science-stage-panel span {
  display: block;
  margin-bottom: 26px;
  color: #d7e9f2;
  font-size: 20px;
}

.science-stage-panel button {
  min-height: 50px;
  padding: 0 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #3f8fff, #2868dd);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

body.stage2-ui-active #dialogue-panel {
  bottom: 28px;
}

@keyframes stage2-panel-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px), (max-aspect-ratio: 4 / 3) {
  .corridor-play-layer {
    padding: 100px 76px calc(28px + var(--dialogue-hud-height, 86px) + 20px) 76px;
  }

  .corridor-puzzle-card {
    padding: 24px;
  }

  .breaker-wire-row {
    grid-template-columns: 1fr;
  }

  .breaker-link {
    width: 10px;
    height: 44px;
    margin: 0 auto;
  }

  .breaker-card {
    margin-right: 0;
  }

  .corridor-fire-door {
    opacity: 0.28;
  }
}

/* =========================
   STAGE 2-2 DRONE SHOOTER — OPEN CORRIDOR
========================= */

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .corridor-play-layer {
  /* 조준 보드가 방어선·화면 양끝까지 가도록 좌우 여백 제거 */
  padding: 68px 0 calc(28px + var(--dialogue-hud-height, 86px) + 96px);
  place-items: stretch;
  align-content: stretch;
  overflow: visible;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-arena--open {
  position: absolute;
  left: 0;
  right: 0;
  top: 118px;
  bottom: calc(28px + var(--dialogue-hud-height, 86px) + 96px);
  width: 1920px;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  z-index: 3;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-arena--open.stage2-arcade-arena {
  width: 1920px;
  max-width: none;
  min-height: 0;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] > .stage2-aim-reticle {
  z-index: 48;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-arena--open .stage2-drone-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  overflow: visible;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .corridor-bg::after,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-vignette {
  display: none;
}

.stage2-drone-top-hud {
  position: absolute;
  left: 320px;
  top: 48px;
  width: 1380px;
  z-index: 40;
  pointer-events: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage-chrome-topbar {
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 14px;
}

.s22-drone-hud {
  display: grid;
  grid-template-columns: max-content minmax(180px, 1fr) 96px max-content max-content;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 88px;
  padding: 10px 16px;
  border-radius: 18px;
  border: 1px solid rgba(117, 220, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(8, 26, 44, 0.92), rgba(5, 14, 28, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(61, 216, 255, 0.1), transparent 64%);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 18px rgba(43, 172, 255, 0.06) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.s22-drone-hud-kicker {
  color: rgba(158, 234, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.s22-drone-hud-round {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 4px 0 2px;
}

.s22-drone-hud-round-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.s22-drone-hud-round-label {
  color: #f4fbff;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.s22-drone-hud-round-label b {
  color: #9bedff;
  margin-left: 4px;
}

.s22-drone-hud-round-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.s22-drone-hud-round-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(28, 42, 58, 0.92);
  border: 1px solid rgba(130, 178, 206, 0.46);
}

.s22-drone-hud-round-dot.is-filled {
  background: #5fe0ff;
  border-color: #b8f4ff;
  box-shadow: 0 0 10px rgba(95, 224, 255, 0.78);
}

.s22-drone-hud-target {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  padding: 0 8px;
}

.s22-drone-hud-fraction {
  display: inline-flex;
  align-items: center;
  color: #f4fbff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.s22-drone-hud-fraction .textbook-math {
  --math-fs: 34px;
  --min-bar: 0;
  --bar-pad: 0.12em;
  --near-bar-gap: 0px;
  --bar-h: 3px;
}

.s22-drone-hud-fraction .tm-frac.s22-hud-target-frac {
  min-width: 0;
  width: max-content;
}

.s22-drone-hud-fraction .tm-num,
.s22-drone-hud-fraction .tm-den {
  color: #f4fbff !important;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.s22-drone-hud-fraction .tm-bar {
  background: #9bedff !important;
  box-shadow: 0 0 10px rgba(131, 233, 255, 0.55);
}

.s22-drone-hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(6, 18, 32, 0.42);
  border: 1px solid rgba(117, 220, 255, 0.14);
}

.s22-drone-hud-stat b {
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.s22-drone-hud-meter {
  display: grid;
  grid-template-columns: auto 110px;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 64px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(6, 18, 32, 0.28);
  border: 1px solid rgba(117, 220, 255, 0.1);
}

.s22-drone-hud-track {
  display: block;
  width: 110px;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.s22-drone-hud-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fd6ff, #3a9bff);
  box-shadow: 0 0 10px rgba(74, 210, 255, 0.4);
}

.s22-drone-hud-meter.energy .s22-drone-hud-track i {
  background: linear-gradient(90deg, #b6f35a, #7ad64a);
  box-shadow: 0 0 10px rgba(146, 230, 90, 0.35);
}

.s22-drone-hud-meter b {
  display: none;
}

/* s22 drone round clear (s14-style) */
.s22-drone-result-layer {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  pointer-events: none;
  background: rgba(2, 8, 16, 0.42);
}

.s22-drone-result-layer.is-visible {
  display: grid;
  pointer-events: auto;
}

.s22-drone-result-card {
  width: min(560px, calc(100% - 72px));
  padding: 42px 28px 40px;
  border: 1px solid rgba(127, 226, 255, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 23, 41, 0.96), rgba(2, 9, 19, 0.97)),
    radial-gradient(circle at 50% 0%, rgba(69, 214, 255, 0.16), transparent 58%);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.48),
    0 0 42px rgba(69, 214, 255, 0.16) inset;
  text-align: center;
  pointer-events: auto;
}

.s22-drone-result-card.is-clear {
  border-color: rgba(122, 255, 205, 0.44);
}

.s22-drone-result-kicker {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 6px;
  background: rgba(61, 216, 255, 0.14);
  color: #8befff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.s22-drone-result-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  font-weight: 950;
}

.s22-drone-round-clear-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 4px;
  margin: 18px 0 28px;
  color: rgba(228, 248, 255, 0.84);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.s22-round-clear-fraction {
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
}

.s22-round-clear-fraction .tm-num,
.s22-round-clear-fraction .tm-den {
  color: #f4fbff !important;
}

.s22-drone-next-round-btn {
  min-width: 168px;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #3bd8ff, #2579ff);
  box-shadow: 0 14px 28px rgba(0, 78, 177, 0.32), 0 0 18px rgba(61, 206, 255, 0.24);
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.s22-drone-next-round-btn:hover,
.s22-drone-next-round-btn:focus-visible {
  filter: brightness(1.06);
}

/* unified .s22-drone-hud above */

.stage2-drone-arena--open {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: block;
}

.stage2-drone-arena--open.stage2-arcade-arena {
  width: 100%;
  max-width: none;
}

.stage2-drone-arena--open .stage2-drone-board {
  height: 100%;
  min-height: 520px;
  background: transparent;
  border: none;
  overflow: visible;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock {
  --s22-turret-half: 85px;
  --s22-dock-gap: 14px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(28px + var(--dialogue-hud-height, 86px) + 10px + 0.5cm + 2px);
  z-index: 46;
  height: 118px;
  pointer-events: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-turret {
  position: absolute;
  left: 50%;
  bottom: -14px;
  grid-column: auto;
  flex: 0 0 auto;
  width: 170px;
  height: 230px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-cannon-base {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 160px;
  height: auto;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(0, 220, 255, 0.5));
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-cannon-barrel-wrap {
  position: absolute;
  left: 50%;
  bottom: 90px;
  width: 96px;
  height: auto;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--s22-cannon-angle, 0rad));
  z-index: 3;
  pointer-events: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-cannon-barrel {
  width: 96px;
  height: auto;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(0, 220, 255, 0.55));
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-turret.firing .s22-cannon-barrel {
  animation: s22CannonRecoil 0.16s ease-out;
}

@keyframes s22CannonRecoil {
  0% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(10px);
  }

  100% {
    transform: translateY(0);
  }
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-drone-control-panel {
  position: absolute;
  /* Left edge stays fixed beside the turret; right edge aligns with #dialogue-panel. */
  left: calc(50% + var(--s22-turret-half) + var(--s22-dock-gap));
  width: calc(var(--dialogue-hud-width) / 2 - var(--s22-turret-half) - var(--s22-dock-gap));
  max-width: calc(var(--dialogue-hud-width) / 2 - var(--s22-turret-half) - var(--s22-dock-gap));
  /* Keep key band under the drone flight path; sit closer to the cannon base. */
  bottom: calc(0.5cm + 8px);
  grid-column: auto;
  flex: 0 1 auto;
  min-width: 0;
  margin-bottom: 0;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
  box-sizing: border-box;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-missile-slots {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 10px;
  justify-content: flex-start;
  min-width: 0;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-missile-slots button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 74px;
  padding: 5px 6px 6px;
  color: #e8f9ff;
  background: #0a1f33;
  border: 1px solid #4ec8ef;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-missile-slots button .stage2-keycap {
  min-width: 58px;
  padding: 3px 7px;
  font-size: 11px;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-missile-slots button strong {
  font-size: 24px;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone-command-dock .stage2-missile-slots button.active {
  background: linear-gradient(180deg, #65e9ff, #2879f2);
}

/* =========================
   S22 DRONE ASSET (s22drone.png)
========================= */

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone {
  --s22-drone-w: 176px;
  --s22-drone-h: 165px;
  width: var(--s22-drone-w);
  height: var(--s22-drone-h);
  margin-left: calc(var(--s22-drone-w) / -2);
  margin-top: calc(var(--s22-drone-h) / -2);
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-visual {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-body {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 248%;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(0, 180, 255, 0.45));
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(155, 248, 255, 0.42) 0%,
      rgba(96, 229, 255, 0.22) 34%,
      rgba(65, 210, 255, 0.08) 58%,
      transparent 100%);
  box-shadow:
    0 0 12px rgba(0, 220, 255, 0.72),
    0 0 26px rgba(0, 220, 255, 0.36),
    inset 0 0 16px rgba(180, 250, 255, 0.18);
  opacity: 0.88;
  filter: blur(0.6px);
  pointer-events: none;
  z-index: 3;
  transform-origin: center;
  animation: s22PropSpin 0.08s linear infinite;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop::before,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 13px;
  border-radius: 999px;
  transform-origin: center;
  background:
    linear-gradient(90deg,
      rgba(0, 240, 255, 0),
      rgba(185, 252, 255, 0.82) 50%,
      rgba(0, 240, 255, 0));
  filter: blur(2px);
  opacity: 0.78;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop::before {
  transform: translate(-50%, -50%) rotate(0deg);
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0.56;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop-tl {
  left: 10%;
  top: 17%;
  translate: -50% -50%;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop-tr {
  right: 10%;
  top: 17%;
  translate: 50% -50%;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop-bl {
  left: 12%;
  top: 45%;
  translate: -50% -50%;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-prop-br {
  right: 12%;
  top: 45%;
  translate: 50% -50%;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-eye {
  position: absolute;
  left: 50%;
  top: 39%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(230, 255, 255, 1) 0%,
      rgba(90, 230, 255, 0.95) 24%,
      rgba(0, 170, 255, 0.55) 48%,
      rgba(0, 120, 220, 0.12) 70%,
      transparent 100%);
  box-shadow:
    0 0 8px rgba(160, 245, 255, 0.95),
    0 0 18px rgba(0, 200, 255, 0.85),
    0 0 36px rgba(0, 160, 255, 0.45);
  pointer-events: none;
  z-index: 4;
  animation: s22EyePulse 1.25s ease-in-out infinite;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-eye::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(1px);
  opacity: 0.7;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction-panel {
  position: absolute;
  left: 50%;
  top: 73%;
  width: 58px;
  min-height: 82px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  border: 1.5px solid rgba(90, 230, 255, 0.9);
  background:
    linear-gradient(180deg,
      rgba(8, 40, 58, 0.78),
      rgba(0, 110, 150, 0.28));
  box-shadow:
    0 0 10px rgba(0, 210, 255, 0.8),
    inset 0 0 14px rgba(0, 210, 255, 0.22);
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  text-shadow:
    0 0 6px rgba(0, 200, 255, 0.9),
    0 2px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .num,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .den {
  font-size: 22px;
  line-height: 1;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .bar {
  width: 34px;
  height: 3px;
  margin: 3px 0;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.9);
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.hit {
  filter: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.hit .s22-drone-visual {
  animation: s22DroneHit 0.22s ease;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.wrong {
  border-color: transparent;
  animation: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.wrong .s22-drone-visual {
  animation: s22DroneWrong 0.26s linear;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.explode {
  animation: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.exploding {
  pointer-events: none;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .stage2-drone.s22-drone.exploding .s22-drone-visual {
  animation: s22DroneExplodeOut 0.46s ease-out forwards;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(190, 255, 255, 0.96);
  box-shadow:
    0 0 12px rgba(190, 255, 255, 1),
    0 0 30px rgba(0, 220, 255, 0.92),
    0 0 58px rgba(0, 160, 255, 0.68);
  animation: s22ExplosionFlash 0.36s ease-out forwards;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(130, 238, 255, 0.92);
  box-shadow: 0 0 18px rgba(0, 220, 255, 0.74);
  animation: s22ExplosionRing 0.44s ease-out forwards;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(125, 238, 255, 0.96);
  box-shadow: 0 0 10px rgba(0, 220, 255, 0.96);
  transform: translate(-50%, -50%);
  animation: s22ExplosionParticle 0.48s ease-out forwards;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(1) { --x: -48px; --y: -24px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(2) { --x: 44px; --y: -20px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(3) { --x: -40px; --y: 28px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(4) { --x: 38px; --y: 32px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(5) { --x: 0px; --y: -50px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(6) { --x: 0px; --y: 46px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(7) { --x: -60px; --y: 0px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(8) { --x: 58px; --y: 0px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(9) { --x: -24px; --y: -44px; }
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(10) { --x: 26px; --y: 42px; }

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(2n) {
  width: 4px;
  height: 4px;
  animation-duration: 0.42s;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-explosion span:nth-child(3n) {
  animation-delay: 0.03s;
}

@keyframes s22PropSpin {
  0% {
    rotate: 0deg;
    scale: 1;
    opacity: 0.9;
  }

  50% {
    opacity: 0.56;
  }

  100% {
    rotate: 360deg;
    scale: 1.06;
    opacity: 0.9;
  }
}

@keyframes s22EyePulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.82;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
  }
}

@keyframes s22DroneHit {
  0% { filter: none; transform: translateX(0); }
  40% { filter: drop-shadow(0 0 18px rgba(120, 255, 255, 0.95)) brightness(1.22); transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { filter: none; transform: translateX(0); }
}

@keyframes s22DroneWrong {
  0%, 100% { filter: none; transform: translateX(0); }
  35% { filter: drop-shadow(0 0 16px rgba(255, 80, 100, 0.92)) saturate(1.1); transform: translateX(-6px); }
  70% { transform: translateX(6px); }
}

@keyframes s22ExplosionFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }

  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.45);
  }
}

@keyframes s22ExplosionRing {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.5);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.25);
  }
}

@keyframes s22ExplosionParticle {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.3);
  }
}

@keyframes s22DroneExplodeOut {
  0% {
    opacity: 1;
    filter: brightness(1) drop-shadow(0 0 10px rgba(0, 220, 255, 0.5));
    transform: scale(1) rotate(0deg);
  }

  35% {
    opacity: 1;
    filter: brightness(1.8) drop-shadow(0 0 24px rgba(0, 220, 255, 0.95));
    transform: scale(1.08) rotate(-2deg);
  }

  100% {
    opacity: 0;
    filter: brightness(2.4) blur(2px);
    transform: scale(0.78) rotate(4deg);
  }
}

/* textbook-math — Stage 2: 기존 분수 숫자 크기 유지 */
.common-stacked-fraction.tm-frac {
  grid-template-rows: auto 3px auto;
  min-width: 76px;
  line-height: 0.92;
}

.common-stacked-fraction.tm-frac .tm-num,
.common-stacked-fraction.tm-frac .tm-den,
.common-stacked-fraction span {
  color: #ffffff;
  font-size: 38px;
  font-weight: 1000;
}

.common-stacked-fraction.tm-frac .tm-bar,
.common-stacked-fraction i {
  width: 100%;
  height: 3px;
  margin: 4px 0;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.stage2-drone-fraction.tm-frac,
.s22-drone-fraction.tm-frac {
  margin-top: 18px;
  color: #f8feff;
  font-size: 28px;
  font-weight: 950;
}

.stage2-drone-fraction.tm-frac .tm-num,
.stage2-drone-fraction.tm-frac .tm-den,
.s22-drone-fraction.tm-frac .tm-num,
.s22-drone-fraction.tm-frac .tm-den,
.s22-drone-fraction .num,
.s22-drone-fraction .den {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: inherit;
  font-weight: inherit;
}

.stage2-drone-fraction.tm-frac .tm-bar,
.s22-drone-fraction.tm-frac .tm-bar,
.s22-drone-fraction .bar {
  width: 1.15em;
  min-width: 34px;
  height: 3px;
  margin: 0.14em 0;
  border-radius: 999px;
  background: currentColor;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction.tm-frac {
  display: inline-grid;
  flex-direction: unset;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .tm-num,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .tm-den,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .num,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .den {
  font-size: 22px;
}

.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .tm-bar,
.corridor-stage-screen[data-current-step="stage2-drone-shooter"] .s22-drone-fraction .bar {
  width: 34px;
  margin: 3px 0;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.9);
}

/* s24 tutorial equal-height boxes — compact 100px, inline+CSS locked */
.s24-tut-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 12px !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  margin: 0 auto 20px !important;
  box-sizing: border-box !important;
}

.s24-tut-row-lanes {
  gap: 18px !important;
}

.s24-tut-lanes-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 18px !important;
  margin: 0 auto 12px !important;
  box-sizing: border-box !important;
}

.s24-tut-lane-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  width: 220px !important;
}

.s24-tut-lane-label {
  display: block !important;
  margin: 0 !important;
  color: #e8f9ff !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.s24-tut-row-need {
  gap: 24px !important;
}

.s24-tut-row > .s24-tbox {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex: 0 0 120px !important;
  width: 120px !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  padding: 8px 10px !important;
  border: 2px solid rgba(120, 230, 255, 0.75) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(10, 48, 78, 0.98), rgba(3, 22, 40, 0.98)) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  margin: 0 !important;
  transform: none !important;
  text-align: center !important;
}

.s24-tut-row-lanes > .s24-tbox,
.s24-tut-lane-col > .s24-tbox {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex-basis: 220px !important;
  width: 220px !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  position: relative !important;
  padding: 8px 10px !important;
  border-width: 1px !important;
  border-color: rgba(105, 221, 255, 0.28) !important;
  background: rgba(4, 24, 42, 0.74) !important;
}

.s24-tut-arrow {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 24px !important;
  align-self: center !important;
  height: auto !important;
  color: #7fdfff !important;
  font-size: 24px !important;
  font-weight: 950 !important;
}

.s24-tut-row .s24-tbox small {
  display: block;
  color: #9fe8ff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.s24-tut-row .s24-tbox-num {
  display: block;
  color: #7ef0e4;
  font-size: 28px;
  font-weight: 1000;
  line-height: 1;
}

.s24-plain-frac {
  display: inline-grid;
  grid-template-columns: max-content;
  grid-template-rows: auto 2px auto;
  justify-items: stretch;
  line-height: 1;
  color: #fff;
}

.s24-plain-num,
.s24-plain-den {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1;
}

.s24-plain-bar {
  display: block;
  width: 100%;
  min-width: 1em;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: currentColor;
}

.s24-tutorial-need-card {
  width: 64px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  border: 1px solid rgba(223, 255, 255, 0.64);
  font-size: 20px;
  font-weight: 1000;
  background: linear-gradient(180deg, rgba(79, 236, 255, 0.98), rgba(38, 117, 239, 0.96));
  flex-shrink: 0;
}

.s24-tut-need-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 24px !important;
  margin: 0 auto 12px !important;
  box-sizing: border-box !important;
}

.s24-tut-need-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  width: 120px !important;
}

.s24-tutorial-need-spacer {
  width: 64px;
  height: 36px;
  flex-shrink: 0;
  visibility: hidden;
}

.s24-tut-need-wrap .s24-tbox {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 120px !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  padding: 8px 10px !important;
  border: 2px solid rgba(120, 230, 255, 0.75) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(10, 48, 78, 0.98), rgba(3, 22, 40, 0.98)) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  margin: 0 !important;
  text-align: center !important;
}

.s24-tut-need-wrap .s24-plain-frac {
  margin: 0 auto;
}

.s24-tut-row-need > .s24-tbox {
  gap: 14px !important;
}

.s24-tut-row-need .s24-plain-frac {
  margin: 0 auto;
}

.s24-tutorial-move-arrow {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  color: #7fdfff;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.s24-tbox-lane img {
  position: static;
  left: auto;
  bottom: auto;
  width: 72px;
  height: auto;
  transform: none;
  display: block;
}

.s24-tbox-lane > strong {
  display: none;
}

.s24-need-denom-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.s24-need-denom-label {
  color: #9fe8ff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.s24-need-denom-num {
  color: #ffffff;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1;
}
