.eq-stage-screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: #071423;
  color: #eef6ff;
}

/* =========================
   STAGE 1-4 FRACTION RUN
========================= */

body.s14-ui-active .s14-screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  color: #eefbff;
  --s14-col-left: 204px;
  --s14-col-width: 1512px;
  --s14-hud-top: 54px;
  --s14-hud-height: 118px;
  --s14-board-gap: 4px;
  --s14-board-height: 622px;
  --s14-safe-bottom: 168px;
  --s14-board-top: calc(var(--s14-hud-top) + var(--s14-hud-height) + var(--s14-board-gap));
  --s14-play-zone-height: calc(var(--s14-hud-height) + var(--s14-board-gap) + var(--s14-board-height));
  background:
    radial-gradient(circle at 18% 20%, rgba(47, 211, 255, 0.18), transparent 26%),
    radial-gradient(circle at 80% 34%, rgba(94, 112, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(6, 18, 32, 0.98), rgba(2, 8, 18, 0.98));
}

body.s14-ui-active .s14-screen {
  background: url("../assets/images/s1.png") center / cover no-repeat;
  --game-bg-dark: #071827;
  --game-bg-mid: #0d2138;
  --game-panel-bg: rgba(4, 18, 32, 0.86);
  --game-panel-border: rgba(80, 210, 255, 0.45);
  --game-panel-shadow: rgba(5, 12, 26, 0.48);
  --card-bg: #dff8ff;
  --card-border: #8eeaff;
  --card-text: #071827;
  --card-warning-border: rgba(131, 229, 255, 0.72);
  --success-glow: rgba(92, 255, 190, 0.8);
  --error-glow: rgba(255, 80, 110, 0.8);
  --hud-number: #f7fdff;
  --hud-accent: #9cecff;
  --hud-panel-texture: url("../assets/ui/hud-panel.svg");
  --bg-layer-far: url("../assets/backgrounds/stage-1-bg-layer-far.svg");
  --bg-layer-mid: url("../assets/backgrounds/stage-1-bg-layer-mid.svg");
  --card-normal-asset: url("../assets/cards/fraction-card-normal.svg");
  --card-warning-asset: url("../assets/cards/fraction-card-normal.svg");
}

body.s14-ui-active .s14-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    url("../assets/images/s1.png") center / cover no-repeat;
  background-size: 36px 36px, 36px 36px, cover;
  background-blend-mode: screen, screen, normal;
  filter: brightness(0.96) saturate(0.98);
  opacity: 1;
}

body.s14-ui-active .s14-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.22)),
    radial-gradient(circle at 50% 58%, rgba(69, 214, 255, 0.08), transparent 42%);
}

.s14-wrap {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  z-index: 2;
  overflow: hidden;
}

.s14-bg-grid {
  position: absolute;
  left: var(--s14-col-left, 330px);
  top: var(--s14-hud-top, 182px);
  width: var(--s14-col-width, 1260px);
  height: var(--s14-play-zone-height, 669px);
  border: 1px solid rgba(113, 223, 255, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(69, 214, 255, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(69, 214, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.42;
  pointer-events: none;
}

.s14-hud {
  position: absolute;
  left: var(--s14-col-left, 330px);
  top: var(--s14-hud-top, 182px);
  width: var(--s14-col-width, 1260px);
  height: var(--s14-hud-height, 102px);
  z-index: 3;
  display: grid;
  grid-template-columns: 300px 1px minmax(0, 1fr) 1px 400px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1px solid rgba(117, 220, 255, 0.24);
  border-radius: 14px;
  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;
}

.s14-hud-round {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 2px;
  min-width: 0;
  padding-right: 8px;
}

.s14-hud-divider {
  width: 1px;
  height: 62px;
  justify-self: center;
  background: linear-gradient(180deg, transparent, rgba(117, 220, 255, 0.28), transparent);
  opacity: 0.85;
}

.s14-round-kicker {
  color: rgba(129, 233, 255, 0.68);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
}

.s14-mission-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.s14-mission-label {
  color: rgba(200, 222, 240, 0.9);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.s14-mission-label b {
  color: #9bedff;
  font-size: 16px;
  margin-left: 2px;
}

.s14-mission-sub {
  color: rgba(158, 234, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.s14-found-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
}

.s14-found-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(32, 44, 62, 0.9);
  border: 1px solid rgba(58, 78, 102, 0.5);
}

.s14-found-dot.is-filled {
  background: #5fe0ff;
  border-color: #9bedff;
  box-shadow: 0 0 8px rgba(95, 224, 255, 0.7);
}

/* Stage 6(s64) mission-dot parity — full round track */
.s14-mission-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.s14-mission-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(38, 52, 72, 0.85);
  border: 1px solid rgba(70, 92, 118, 0.55);
}

.s14-mission-dot.is-current {
  background: #5fe0ff;
  border-color: #9bedff;
  box-shadow: 0 0 10px rgba(95, 224, 255, 0.9);
}

.s14-mission-dot.is-pending {
  background: rgba(32, 44, 62, 0.9);
  border-color: rgba(58, 78, 102, 0.5);
}

.s14-mission-dot.is-done {
  background: rgba(95, 224, 255, 0.42);
  border-color: rgba(126, 224, 255, 0.62);
}

.s14-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.s14-status-row strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(6, 21, 38, 0.68);
  border: 1px solid rgba(127, 226, 255, 0.2);
  color: #bdf6ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#s14-fever-status {
  color: #ffe2ff;
  border-color: rgba(255, 120, 224, 0.24);
}

.s14-target-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 0;
  transform-origin: 50% 50%;
}

.s14-target-label {
  color: rgba(158, 234, 255, 0.82);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.s14-stat-compact {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  padding-left: 4px;
}

.s14-stat-item {
  min-width: 96px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(6, 18, 32, 0.42);
  border: 1px solid rgba(117, 220, 255, 0.14);
}

.s14-stat-label {
  color: #81e9ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.s14-stat-value {
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.s14-life-item .s14-stat-value {
  color: #ffd5d5;
}

.s14-wave-meter {
  min-width: 148px;
  width: 158px;
  gap: 4px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
}

.s14-wave-meter-track {
  position: relative;
  width: 100%;
  height: 15px;
  margin-top: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(4, 16, 30, 0.92);
  border: 1px solid rgba(117, 220, 255, 0.28);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.s14-wave-meter-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fd6ff, #3a9bff);
  box-shadow: 0 0 10px rgba(74, 210, 255, 0.45);
  transition: width 120ms linear, background 180ms ease, box-shadow 180ms ease;
}

.s14-wave-meter-track.is-safe .s14-wave-meter-fill {
  background: linear-gradient(90deg, #2fd6ff, #3a9bff);
  box-shadow: 0 0 10px rgba(74, 210, 255, 0.45);
}

.s14-wave-meter-track.is-warn .s14-wave-meter-fill {
  background: linear-gradient(90deg, #ffe066, #f5c542);
  box-shadow: 0 0 10px rgba(255, 214, 74, 0.42);
}

.s14-wave-meter-track.is-danger .s14-wave-meter-fill {
  background: linear-gradient(90deg, #ff9a4d, #ff6a45);
  box-shadow: 0 0 10px rgba(255, 132, 72, 0.48);
}

.s14-wave-meter-track.is-critical .s14-wave-meter-fill {
  background: linear-gradient(90deg, #ff5a62, #ff2d44);
  box-shadow: 0 0 12px rgba(255, 72, 96, 0.55);
  animation: s14WaveMeterCritical 1.35s ease-in-out infinite;
}

@keyframes s14WaveMeterCritical {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.72; filter: brightness(1.12); }
}

.s14-board {
  position: absolute;
  left: var(--s14-col-left, 330px);
  top: var(--s14-board-top, 288px);
  width: var(--s14-col-width, 1260px);
  height: var(--s14-board-height, 563px);
  z-index: 3;
  --s14-pace: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(117, 220, 255, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 24, 43, 0.9), rgba(2, 9, 18, 0.96)),
    radial-gradient(circle at 18% 22%, rgba(69, 214, 255, 0.16), transparent 32%),
    radial-gradient(circle at 78% 18%, rgba(104, 125, 255, 0.13), transparent 30%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(6, 37, 68, 0.72) inset,
    0 0 42px rgba(37, 156, 255, 0.12) inset;
  touch-action: manipulation;
}

.s14-run-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  filter: brightness(0.76) saturate(0.9);
}

.s14-run-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 200%;
  background-image:
    linear-gradient(
      rgba(0, 8, 18, 0.54),
      rgba(0, 8, 18, 0.62)
    ),
    url("../assets/images/s14runbg.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 50%;
  will-change: transform;
  animation: s14-bg-scroll 18s linear infinite;
}

body.s14-ui-active .s14-screen[data-phase="s14-intro"] .s14-run-bg::before {
  animation-duration: 28s;
}

body.s14-ui-active .s14-screen[data-phase="s14-running"] .s14-run-bg::before {
  animation-duration: 16s;
}

body.s14-ui-active .s14-screen[data-phase="s14-round-clear"] .s14-run-bg::before,
body.s14-ui-active .s14-screen[data-phase="s14-clear"] .s14-run-bg::before,
body.s14-ui-active .s14-screen[data-phase="s14-fail"] .s14-run-bg::before {
  animation-play-state: paused;
}

@keyframes s14-bg-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.s14-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 18%, rgba(79, 224, 255, 0.08) 19% 20%, transparent 21% 48%, rgba(104, 125, 255, 0.08) 49% 50%, transparent 51% 100%);
  background-size: 420px 100%;
  opacity: 0.28;
  animation: none;
}

.s14-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  box-shadow: inset 0 0 0 4px rgba(255, 62, 111, 0.45), inset 0 0 54px rgba(255, 30, 88, 0.3);
}

.s14-board.is-wave-danger::after {
  animation: s14-wave-warning 0.72s ease-in-out infinite;
}

.s14-board.is-fever {
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(6, 37, 68, 0.72) inset,
    0 0 62px rgba(75, 211, 255, 0.26) inset,
    0 0 42px rgba(96, 255, 203, 0.16);
}

@keyframes s14-data-sweep {
  from { background-position: 0 0; }
  to { background-position: -420px 0; }
}

@keyframes s14-wave-warning {
  0%, 100% { opacity: 0.16; }
  50% { opacity: 0.74; }
}

.s14-run-lines {
  position: absolute;
  inset: 38px 0 108px;
  pointer-events: none;
  opacity: 0.45;
}

.s14-run-lines span {
  position: absolute;
  left: 0;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0 3%, rgba(111, 222, 255, 0.32) 3% 9%, transparent 9% 14%);
  background-size: 180px 1px;
  animation: s14-run-line calc(1.8s / var(--s14-pace, 1)) linear infinite;
}

.s14-run-lines span:nth-child(1) { top: 18%; animation-duration: calc(2.1s / var(--s14-pace, 1)); }
.s14-run-lines span:nth-child(2) { top: 40%; animation-duration: calc(1.7s / var(--s14-pace, 1)); opacity: 0.7; }
.s14-run-lines span:nth-child(3) { top: 62%; animation-duration: calc(1.45s / var(--s14-pace, 1)); opacity: 0.62; }
.s14-run-lines span:nth-child(4) { top: 82%; animation-duration: calc(1.18s / var(--s14-pace, 1)); opacity: 0.52; }

@keyframes s14-run-line {
  from { transform: translateX(0); }
  to { transform: translateX(-180px); }
}

.s14-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 44px;
  border-top: 2px solid rgba(117, 220, 255, 0.54);
  background:
    linear-gradient(90deg, rgba(117, 220, 255, 0.22) 0 38px, transparent 38px 78px),
    linear-gradient(180deg, rgba(50, 167, 255, 0.16), rgba(23, 68, 118, 0.18));
  background-size: 78px 100%, 100% 100%;
  box-shadow: 0 0 24px rgba(69, 214, 255, 0.22);
  animation: none;
}

@keyframes s14-ground-flow {
  from { background-position: 0 0, 0 0; }
  to { background-position: -78px 0, 0 0; }
}

.s14-card-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: auto;
}

.s14-particle-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.s14-error-wave {
  --s14-wave-x: -230px;
  position: absolute;
  left: 0;
  bottom: 12px;
  z-index: 3;
  width: 190px;
  height: 214px;
  pointer-events: none;
  opacity: 0.92;
  filter: blur(0.2px) drop-shadow(0 0 28px rgba(255, 36, 104, 0.45));
  transform: translate3d(var(--s14-wave-x), 0, 0);
  will-change: transform;
}

.s14-error-wave span {
  position: absolute;
  inset: 0;
  border-radius: 42% 58% 54% 46%;
  background:
    radial-gradient(circle at 58% 44%, rgba(255, 99, 155, 0.72), transparent 32%),
    radial-gradient(circle at 42% 58%, rgba(125, 60, 255, 0.72), transparent 46%),
    linear-gradient(90deg, rgba(255, 36, 104, 0.08), rgba(255, 36, 104, 0.54));
  box-shadow: inset -16px 0 28px rgba(255, 96, 176, 0.28);
  animation: s14-wave-pulse 1.05s ease-in-out infinite alternate;
}

.s14-error-wave span:nth-child(2) {
  inset: 22px -18px 18px 24px;
  opacity: 0.56;
  animation-duration: 0.82s;
  animation-delay: -0.25s;
}

.s14-error-wave span:nth-child(3) {
  inset: 48px -32px 42px 54px;
  opacity: 0.42;
  animation-duration: 1.24s;
  animation-delay: -0.5s;
}

@keyframes s14-wave-pulse {
  from { transform: translateX(-4px) scaleY(0.96) skewX(-4deg); }
  to { transform: translateX(8px) scaleY(1.04) skewX(5deg); }
}

.s14-player {
  position: absolute;
  left: 156px;
  bottom: 50px;
  z-index: 6;
  width: 104px;
  height: 118px;
  border-radius: 28px 28px 18px 18px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.92), transparent 10%),
    linear-gradient(180deg, #e8fbff, #83dfff 58%, #2b85e8);
  border: 2px solid rgba(214, 250, 255, 0.86);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(70, 216, 255, 0.42);
  transform-origin: 50% 100%;
  animation: s14-player-run 0.42s ease-in-out infinite alternate;
}

.roboki-runner-sprite {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 256px;
  height: 256px;
  margin-left: -128px;
  background-image: url("../assets/images/roboki_run_sheet.png");
  background-repeat: no-repeat;
  background-size: 2048px 256px;
  background-position: 0 0;
  animation: robokiRun 0.58s steps(8) infinite;
  transform: scale(0.58);
  transform-origin: center bottom;
  pointer-events: none;
}

.s14-player.is-jumping .roboki-runner-sprite {
  animation-play-state: paused;
}

.s14-player::before,
.s14-player::after {
  content: "";
  position: absolute;
  top: 54px;
  width: 18px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d9f7ff, #4fa8f4);
  border: 1px solid rgba(219, 250, 255, 0.72);
}

.s14-player::before {
  left: -13px;
  transform: rotate(10deg);
}

.s14-player::after {
  right: -13px;
  transform: rotate(-10deg);
}

.s14-player-eye {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 28px;
  height: 24px;
  border-radius: 8px;
  background: #071728;
  box-shadow: 0 0 0 2px rgba(143, 235, 255, 0.5) inset;
}

.s14-player-eye::before,
.s14-player-eye::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8bf4ff;
  box-shadow: 0 0 12px rgba(139, 244, 255, 0.9);
}

.s14-player-eye::before { left: 13px; }
.s14-player-eye::after { right: 13px; }

.s14-player-core {
  position: absolute;
  left: 38px;
  bottom: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 24%, #68f2ff 25% 52%, #236dff 54%);
  box-shadow: 0 0 18px rgba(104, 242, 255, 0.76);
}

.s14-player.is-jumping {
  animation-duration: 0.66s;
  rotate: -4deg;
}

.s14-player.is-fever {
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(70, 216, 255, 0.62),
    0 0 58px rgba(96, 255, 203, 0.56);
}

.s14-player.is-fever::before,
.s14-player.is-fever::after {
  filter: drop-shadow(0 0 14px rgba(99, 255, 207, 0.72));
}

.s14-player.is-fever .s14-player-core {
  animation: s14-fever-core 0.48s ease-in-out infinite alternate;
}

@keyframes s14-fever-core {
  from { transform: scale(1); box-shadow: 0 0 18px rgba(104, 242, 255, 0.76); }
  to { transform: scale(1.2); box-shadow: 0 0 34px rgba(114, 255, 205, 0.92); }
}

@keyframes s14-player-run {
  from { translate: 0 0; rotate: -1deg; }
  to { translate: 0 4px; rotate: 1deg; }
}

@keyframes robokiRun {
  from { background-position-x: 0; }
  to { background-position-x: -2048px; }
}

/* s14 분수 카드 기본 디자인 — 아래쪽 중복 선언을 통합한 단일 기준 블록 */
.s14-fraction-card {
  position: absolute;
  z-index: 5;
  width: 112px;
  height: 90px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(131, 229, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(250, 254, 255, 0.98), rgba(201, 241, 255, 0.94)),
    var(--card-normal-asset) center / cover no-repeat;
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(66, 211, 255, 0.18);
  color: #06233c;
  pointer-events: none;
}

.s14-hazard-card {
  position: absolute;
  z-index: 5;
  width: 88px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 8px 8px;
  border: 1px solid rgba(255, 112, 142, 0.78);
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 200, 220, 0.34), transparent 30%),
    linear-gradient(180deg, rgba(86, 12, 44, 0.96), rgba(36, 4, 26, 0.98));
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.32),
    0 0 26px rgba(255, 49, 101, 0.32);
  color: #ffe0e9;
  transform: skewX(-3deg);
  pointer-events: none;
}

.s14-hazard-card span {
  position: absolute;
  inset: 8px 14px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 174, 204, 0.6);
  opacity: 0.72;
}

.s14-hazard-card strong {
  position: relative;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(255, 92, 142, 0.9);
}

.s14-fraction-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(18, 96, 145, 0.14);
  border-radius: 6px;
  pointer-events: none;
}

.s14-hazard-card.is-collected-wrong {
  animation: s14-card-wrong 0.26s ease-out forwards;
}

.s14-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #7fffd7;
  box-shadow: 0 0 12px rgba(127, 255, 215, 0.95);
  animation: s14-particle-burst 0.68s ease-out forwards;
}

.s14-particle.is-wrong {
  background: #ff6f8f;
  box-shadow: 0 0 12px rgba(255, 88, 125, 0.95);
}

@keyframes s14-particle-burst {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.28);
  }
}

.s14-fraction {
  display: inline-grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-items: center;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.s14-fraction-num,
.s14-fraction-den {
  font-size: 26px;
}

/* 분수선 폭·간격은 textbook-math(--min-bar)에 맡김 — 고정 width 금지 */
.s14-fraction-bar {
  border-radius: 999px;
  background: currentColor;
}

.s14-target-fraction .s14-fraction-num,
.s14-target-fraction .s14-fraction-den,
#s14-target-fraction .s14-fraction-num,
#s14-target-fraction .s14-fraction-den {
  font-size: 48px;
  line-height: 1;
}

/* s14 — textbook-math 래퍼의 .s14-fraction inline-grid 중복 해소, 분수 가운데 정렬 */
.s14-fraction-card > .textbook-math.s14-fraction,
.s14-fraction-card > .textbook-math.s14-card-fraction {
  display: flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  margin-inline: auto;
}

/*
 * .s14-fraction min-width(48px)가 tm-frac을 숫자보다 넓히고
 * grid justify-content:start 로 왼쪽 치우침 → 카드 안에서는 해제
 */
.s14-fraction-card .tm-frac.s14-fraction,
.s14-fraction-card .tm-frac.s14-card-fraction {
  min-width: 0;
  width: max-content;
  justify-content: center;
  justify-items: center;
}

body.s14-ui-active #s14-target-fraction > .textbook-math.s14-fraction,
body.s14-ui-active #s14-target-fraction > .textbook-math.s14-target-fraction {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.s14-feedback {
  position: absolute;
  left: 50%;
  top: 42%;
  min-width: 168px;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(4, 16, 31, 0.82);
  border: 1px solid rgba(130, 229, 255, 0.28);
  color: #ffffff;
  font-size: 25px;
  font-weight: 950;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
  pointer-events: none;
}

.s14-feedback.is-ready,
.s14-feedback.is-correct,
.s14-feedback.is-wrong {
  animation: s14-feedback-pop 0.85s ease-out forwards;
}

.s14-feedback.is-correct {
  color: #baffdf;
  border-color: rgba(99, 255, 207, 0.5);
  box-shadow: 0 0 28px rgba(99, 255, 207, 0.2);
}

.s14-feedback.is-wrong {
  color: #ffd7d7;
  border-color: rgba(255, 104, 120, 0.52);
  box-shadow: 0 0 28px rgba(255, 62, 84, 0.18);
}

@keyframes s14-feedback-pop {
  0% { opacity: 0; transform: translate(-50%, -45%) scale(0.88); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -66%) scale(0.98); }
}

.s14-board.is-wrong {
  animation: s14-board-shake 0.42s ease-in-out;
}

@keyframes s14-board-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-10px); }
  38% { transform: translateX(8px); }
  58% { transform: translateX(-6px); }
  78% { transform: translateX(4px); }
}

.s14-board.is-clear {
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(6, 37, 68, 0.72) inset,
    0 0 58px rgba(99, 255, 207, 0.24) inset;
}

.s14-board.is-clear::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(161, 255, 221, 0.32), transparent 14%),
    radial-gradient(circle at 50% 50%, rgba(72, 214, 255, 0.2), transparent 34%);
  animation: s14-clear-gather 0.95s ease-out both;
}

@keyframes s14-clear-gather {
  from { opacity: 0; transform: scale(1.7); }
  to { opacity: 0.78; transform: scale(1); }
}

.s14-jump-btn {
  position: absolute;
  right: 28px;
  bottom: 52px;
  z-index: 8;
  min-width: 118px;
  min-height: 58px;
  border: 1px solid rgba(127, 226, 255, 0.36);
  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;
  letter-spacing: 0;
  cursor: pointer;
}

.s14-result-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.s14-result-layer:has(.s14-tutorial-shell),
.s14-result-layer .s14-tutorial-shell {
  pointer-events: auto;
}

.s14-result-layer:empty {
  display: none;
}

.s14-result-card {
  width: min(560px, calc(100% - 72px));
  max-height: calc(100% - 64px);
  overflow: auto;
  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;
}

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

.s14-result-card.is-fail {
  border-color: rgba(255, 115, 132, 0.46);
}

.s14-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;
}

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

.s14-result-card p {
  margin: 18px 0 28px;
  color: rgba(228, 248, 255, 0.84);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.s14-result-card.is-clear .s14-round-clear-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  line-height: 1.55;
}

.s14-result-card.is-clear .s14-round-clear-fraction {
  display: inline-flex;
  align-items: center;
  margin: 0 5px 0 4px;
  color: #e4f8ff;
  vertical-align: middle;
}

.s14-result-card.is-clear .s14-round-clear-fraction .textbook-math {
  display: inline-flex;
  align-items: center;
  color: #dffcff;
  --game-math-color: #dffcff;
  --game-math-bar: rgba(230, 250, 255, 0.95);
  --math-fs: 22px;
  --min-bar: 0;
  --bar-pad: 0.14em;
  --near-bar-gap: 0px;
  --bar-h: 2px;
  transform: translateY(-1px);
}

/* tm-frac은 textbook-math 그리드 유지 — flex column/고정 width 금지 */
.s14-result-card.is-clear .tm-frac.s14-result-fraction {
  min-width: 0;
  width: max-content;
  transform: none;
}

.s14-result-card.is-clear .s14-result-fraction .s14-fraction-num,
.s14-result-card.is-clear .s14-result-fraction .s14-fraction-den {
  font-size: 22px;
  line-height: 1;
  color: #e4f8ff;
}

.s14-result-card.is-clear .s14-result-fraction .s14-fraction-bar {
  background: #e4f8ff;
}

.s14-final-clear {
  width: 560px;
  max-width: calc(100% - 48px);
  max-height: none;
  overflow: visible;
  padding: 32px 38px 30px;
  border: 2px solid rgba(117, 242, 217, 0.78);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 190, 232, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(7, 25, 43, 0.98), rgba(3, 14, 27, 0.98));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.58),
    0 0 36px rgba(70, 236, 208, 0.18);
}

.s14-final-clear h2 {
  margin: 8px 0 0;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: none;
}

.s14-final-clear-copy {
  display: block;
  margin: 22px 0 24px;
  max-width: none;
}

.s14-final-clear-copy p {
  margin: 6px 0;
  color: rgba(227, 247, 255, 0.92);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.55;
  white-space: normal;
}

.s14-final-clear .stage1-primary-action,
.s14-final-clear .stage-final-clear-btn {
  margin-top: 0;
  min-width: 150px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  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: 17px;
}

.s14-collected-list {
  margin: 0 auto 24px;
  padding: 16px;
  max-height: 230px;
  overflow: auto;
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: rgba(7, 27, 45, 0.72);
  border: 1px solid rgba(127, 226, 255, 0.18);
}

.s14-collected-list strong {
  margin-bottom: 4px;
  color: #9ff4ff;
  font-size: 15px;
  font-weight: 950;
}

.s14-collected-list em {
  margin-top: 8px;
  color: #c8f8ff;
  font-size: 14px;
  font-style: normal;
  font-weight: 950;
}

.s14-collected-list > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
}

.s14-collected-list b {
  color: rgba(202, 245, 255, 0.76);
  font-size: 20px;
}

.s14-wrap::before,
.s14-wrap::after {
  content: "";
  position: absolute;
  left: var(--s14-col-left, 330px);
  top: var(--s14-hud-top, 182px);
  width: var(--s14-col-width, 1260px);
  height: var(--s14-play-zone-height, 669px);
  pointer-events: none;
  border-radius: 12px;
}

.s14-wrap::before {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 100%, rgba(110, 223, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(8, 26, 44, 0.18), rgba(8, 26, 44, 0));
}

.s14-wrap::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(120, 229, 255, 0.02), rgba(120, 229, 255, 0.08), rgba(120, 229, 255, 0.02));
  background-size: 420px 100%;
  opacity: 0.24;
  animation: s14-parallax-scan 13s linear infinite;
}

.s14-bg-parallax {
  position: absolute;
  left: var(--s14-col-left, 330px);
  top: var(--s14-board-top, 288px);
  width: var(--s14-col-width, 1260px);
  height: var(--s14-board-height, 563px);
  pointer-events: none;
  border-radius: 12px;
  overflow: hidden;
}

.s14-bg-parallax-far {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 16, 28, 0.26), rgba(6, 16, 28, 0.62)),
    var(--bg-layer-far) center / cover no-repeat;
  opacity: 0.75;
  animation: s14-parallax-far 18s linear infinite alternate;
}

.s14-bg-parallax-mid {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 18, 30, 0.1), rgba(6, 18, 30, 0.34)),
    var(--bg-layer-mid) center / cover no-repeat;
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: s14-parallax-mid 12s ease-in-out infinite alternate;
}

.s14-bg-parallax-front {
  z-index: 2;
  inset: auto 74px 168px 150px;
  height: 130px;
  background:
    radial-gradient(circle at 16% 72%, rgba(103, 225, 255, 0.18), transparent 18%),
    radial-gradient(circle at 84% 68%, rgba(126, 165, 255, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(49, 132, 176, 0.14), rgba(13, 28, 45, 0));
  filter: blur(0.2px);
  animation: s14-parallax-front 7s ease-in-out infinite alternate;
}

@keyframes s14-parallax-scan {
  from { background-position: 0 0; }
  to { background-position: -420px 0; }
}

@keyframes s14-parallax-far {
  from { transform: translateX(-12px) scale(1.01); }
  to { transform: translateX(10px) scale(1.03); }
}

@keyframes s14-parallax-mid {
  from { transform: translateX(0) translateY(0); }
  to { transform: translateX(-18px) translateY(6px); }
}

@keyframes s14-parallax-front {
  from { transform: translateX(-10px); }
  to { transform: translateX(12px); }
}

.s14-bg-grid {
  border: 1px solid rgba(141, 233, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(114, 227, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(114, 227, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%);
  background-size: 84px 84px, 84px 84px, 100% 100%;
  opacity: 0.58;
  box-shadow: inset 0 0 0 1px rgba(118, 226, 255, 0.04), 0 0 24px rgba(64, 179, 255, 0.06);
}

.s14-hud {
  overflow: visible;
}

.s14-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.05) 46%, transparent 52%),
    radial-gradient(circle at 88% 14%, rgba(158, 240, 255, 0.1), transparent 18%);
  opacity: 0.82;
  pointer-events: none;
}

.s14-target-compact,
.s14-target-card {
  position: relative;
  transform-origin: 50% 50%;
}

.s14-target-label,
.s14-stat-label {
  color: var(--hud-accent);
  text-shadow: 0 0 10px rgba(115, 230, 255, 0.18);
}

.s14-status-row strong {
  background: rgba(6, 24, 42, 0.78);
  border-color: rgba(141, 233, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.s14-target-card.is-updating {
  animation: s14-target-pulse 0.72s ease-out;
}

.s14-target-compact strong,
.s14-target-card strong {
  color: var(--hud-number);
  text-shadow: 0 0 14px rgba(146, 240, 255, 0.2);
}

body.s14-ui-active #s14-target-fraction {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transform-origin: 50% 50%;
  animation: s14-target-fraction-blink 1.2s ease-in-out infinite;
}

@keyframes s14-target-pulse {
  0% { transform: scale(0.97); filter: brightness(1); }
  40% { transform: scale(1.02); filter: brightness(1.08); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes s14-target-fraction-blink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    text-shadow:
      0 0 12px rgba(146, 240, 255, 0.18),
      0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    opacity: 0.98;
    transform: scale(1.03);
    text-shadow:
      0 0 16px rgba(190, 247, 255, 0.42),
      0 0 22px rgba(95, 224, 255, 0.22);
  }
}

.s14-stat-value {
  color: var(--hud-number);
  text-shadow: 0 0 12px rgba(146, 240, 255, 0.12);
}

.s14-life-item .s14-stat-value {
  color: #ffe6e9;
  text-shadow: 0 0 10px rgba(255, 114, 148, 0.16);
}

.s14-board {
  border-radius: 22px;
  border-color: rgba(120, 230, 255, 0.34);
  background:
    radial-gradient(circle at 50% 12%, rgba(66, 196, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(12, 29, 48, 0.94), rgba(4, 11, 21, 0.98));
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(85, 208, 255, 0.08),
    inset 0 0 40px rgba(57, 173, 255, 0.08);
}

.s14-board::before {
  background:
    linear-gradient(105deg, transparent 0 18%, rgba(79, 224, 255, 0.08) 19% 20%, transparent 21% 48%, rgba(104, 125, 255, 0.08) 49% 50%, transparent 51% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%);
}

.s14-run-lines {
  inset: 42px 18px 112px;
  opacity: 0.56;
}

.s14-run-lines span {
  height: 2px;
  background: linear-gradient(90deg, transparent 0 3%, rgba(111, 222, 255, 0.34) 3% 8%, rgba(255, 255, 255, 0.08) 8% 10%, transparent 10% 14%);
}

.s14-ground {
  height: 44px;
  border-top: 2px solid rgba(141, 233, 255, 0.66);
  background:
    linear-gradient(90deg, rgba(123, 230, 255, 0.18) 0 32px, rgba(6, 20, 34, 0.08) 32px 68px, transparent 68px 100px),
    linear-gradient(180deg, rgba(102, 220, 255, 0.18), rgba(31, 82, 132, 0.24) 55%, rgba(5, 15, 28, 0.92));
  background-size: 100px 100%, 100% 100%;
  box-shadow:
    0 0 18px rgba(79, 208, 255, 0.2),
    inset 0 8px 20px rgba(191, 246, 255, 0.1);
}

.s14-ground::before,
.s14-ground::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.s14-ground::before {
  top: -16px;
  height: 20px;
  background: radial-gradient(circle at 50% 100%, rgba(118, 229, 255, 0.18), transparent 70%);
}

.s14-ground::after {
  top: 12px;
  height: 16px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 24px,
      rgba(180, 244, 255, 0.18) 24px 30px,
      transparent 30px 88px
    ),
    linear-gradient(90deg, transparent, rgba(180, 244, 255, 0.2), transparent);
  animation: s14-ground-streaks calc(0.58s / var(--s14-pace, 1)) linear infinite;
}

@keyframes s14-ground-streaks {
  from { background-position: 0 0, 0 0; }
  to { background-position: -88px 0, 0 0; }
}

.s14-error-wave {
  filter: blur(0.2px) drop-shadow(0 0 28px rgba(255, 36, 104, 0.45));
}

.s14-player {
  background: transparent;
  border-color: transparent;
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(78, 218, 255, 0.12);
  animation: none;
  --s14-jump-y: 0px;
  transform: translate3d(0, calc(var(--s14-jump-y) * -1), 0);
  transition: none;
  will-change: transform;
}

.s14-player-shadow {
  position: absolute;
  left: 208px;
  bottom: 42px;
  z-index: 4;
  width: 82px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.15) 58%, transparent 74%);
  filter: blur(3px);
  transform: translateX(-50%) scaleX(1);
  opacity: 0.34;
  pointer-events: none;
  transition:
    transform 0.08s linear,
    opacity 0.08s linear;
}

.s14-player.is-running {
  /* transform은 점프 Y 전용 — 흔들림은 translate/rotate 개별 속성 */
  animation: s14-player-run calc(0.34s / var(--s14-pace, 1)) ease-in-out infinite;
}

.s14-player.is-jumping {
  animation: none;
}

.s14-player.is-jump-up {
  rotate: -6deg;
}

.s14-player.is-jump-apex {
  rotate: -1deg;
}

.s14-player.is-jump-down {
  rotate: 4deg;
}

.s14-player.is-landing {
  animation: s14-player-land 0.17s ease-out;
}

.s14-player-shadow.is-jumping {
  transform: translateX(-50%) scaleX(0.56);
  opacity: 0.15;
}

.s14-player-shadow.is-landing {
  transform: translateX(-50%) scaleX(1.2);
  opacity: 0.4;
}

.s14-player::before,
.s14-player::after {
  display: none;
}

.s14-player-eye {
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(143, 235, 255, 0.42) inset,
    0 6px 12px rgba(0, 0, 0, 0.18) inset;
}

.s14-player-eye::before,
.s14-player-eye::after {
  animation: s14-eye-blink 4.8s ease-in-out infinite;
}

.s14-player-eye::after {
  animation-delay: 0.12s;
}

.s14-player-core {
  box-shadow:
    0 0 16px rgba(104, 242, 255, 0.72),
    0 0 32px rgba(63, 153, 255, 0.22);
}

.s14-player.is-fever .roboki-runner-sprite,
.s14-player.is-react-correct .roboki-runner-sprite {
  filter:
    drop-shadow(0 0 12px rgba(83, 232, 255, 0.66))
    drop-shadow(0 0 22px rgba(92, 255, 190, 0.42));
}

.s14-player.is-react-wrong .roboki-runner-sprite {
  filter:
    drop-shadow(0 0 12px rgba(255, 80, 110, 0.52))
    drop-shadow(0 0 20px rgba(255, 80, 110, 0.28));
}

.s14-player.is-collect-shield {
  filter: drop-shadow(0 0 12px rgba(95, 224, 255, 0.62));
}

.s14-player.is-collect-shield .roboki-runner-sprite {
  filter:
    brightness(1.1)
    saturate(1.12)
    drop-shadow(0 0 10px rgba(120, 236, 255, 0.45));
}

.s14-player.is-react-correct {
  animation: s14-player-success 0.4s ease-out;
}

.s14-player.is-react-wrong {
  animation: s14-player-hurt 0.34s ease-out;
}

@keyframes s14-eye-blink {
  0%, 44%, 48%, 100% { transform: scaleY(1); }
  46% { transform: scaleY(0.18); }
}

@keyframes s14-player-success {
  0% { translate: 0 0; scale: 1; }
  45% { translate: 0 -6px; scale: 1.04; }
  100% { translate: 0 0; scale: 1; }
}

@keyframes s14-player-hurt {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  20% { translate: -6px 0; rotate: -2deg; }
  50% { translate: 6px 0; rotate: 2deg; }
  80% { translate: -4px 0; rotate: 0deg; }
}

@keyframes s14-player-land {
  0% { scale: 1.08 0.88; translate: 0 3px; }
  68% { scale: 0.97 1.04; translate: 0 -1px; }
  100% { scale: 1 1; translate: 0 0; }
}

.s14-fraction-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 34%, transparent 70%, rgba(108, 226, 255, 0.08));
  pointer-events: none;
}

.s14-fraction-card > .textbook-math,
.s14-fraction-card > .s14-card-fraction {
  position: relative;
  z-index: 1;
}

.s14-fraction-card.is-different {
  background:
    linear-gradient(180deg, rgba(250, 254, 255, 0.98), rgba(201, 241, 255, 0.94)),
    var(--card-warning-asset) center / cover no-repeat;
  border-color: var(--card-warning-border);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(66, 211, 255, 0.18);
}

.s14-fraction-card.is-match {
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.26),
    0 0 22px rgba(77, 222, 255, 0.2);
}

.s14-fraction-card.is-high {
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(122, 231, 255, 0.2);
}

.s14-fraction-card.is-choice-pair {
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(99, 216, 255, 0.14);
}

.s14-hazard-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(86, 12, 44, 0.94), rgba(36, 4, 26, 0.98)),
    repeating-linear-gradient(135deg, rgba(255, 97, 132, 0.18) 0 8px, rgba(255, 255, 255, 0) 8px 16px);
  animation: s14-card-enter 0.28s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.s14-hazard-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%, rgba(255, 95, 120, 0.08));
  pointer-events: none;
}

.s14-fraction-card.is-collected-correct {
  z-index: 8;
  animation: s14-card-correct 0.34s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}

.s14-fraction-card.is-collected-wrong,
.s14-hazard-card.is-collected-wrong {
  z-index: 8;
  animation: s14-card-wrong 0.3s ease-out forwards;
}

@keyframes s14-card-correct {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 0 rgba(99, 255, 207, 0));
  }
  52% {
    transform: translate(calc(var(--s14-collect-dx, -34px) * 0.54), calc(var(--s14-collect-dy, -8px) * 0.54)) scale(1.08);
    opacity: 0.95;
    filter: drop-shadow(0 0 22px rgba(99, 255, 207, 0.82));
  }
  100% {
    transform: translate(var(--s14-collect-dx, -54px), var(--s14-collect-dy, -16px)) scale(0.36);
    opacity: 0;
    filter: drop-shadow(0 0 28px rgba(99, 255, 207, 0.95));
  }
}

@keyframes s14-card-wrong {
  0% {
    transform: translate(0, 0) scale(1);
  }
  22% {
    transform: translate(-8px, 0) rotate(-5deg);
  }
  44% {
    transform: translate(7px, 0) rotate(4deg);
  }
  100% {
    transform: translate(var(--s14-collect-dx, 12px), var(--s14-collect-dy, 10px)) scale(0.78) rotate(8deg);
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(255, 75, 92, 0.95));
  }
}

.s14-fraction {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
}

/* 이동 카드 숫자는 잔상·번짐을 막기 위해 text-shadow 없이 선명하게 */
.s14-fraction-card .s14-fraction,
.s14-fraction-card .s14-card-fraction .s14-fraction-num,
.s14-fraction-card .s14-card-fraction .s14-fraction-den,
.s14-fraction-card .tm-num,
.s14-fraction-card .tm-den {
  color: #0c2034;
  opacity: 1;
  filter: none;
  text-shadow: none;
}

.s14-fraction-card.is-different .s14-card-fraction .s14-fraction-num,
.s14-fraction-card.is-different .s14-card-fraction .s14-fraction-den {
  color: #0c2034;
}

.s14-fraction-bar {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
}

.s14-feedback {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(6, 20, 36, 0.92), rgba(4, 12, 22, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(61, 216, 255, 0.08), transparent 62%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(135, 231, 255, 0.08);
  backdrop-filter: blur(10px);
}

.s14-feedback.is-correct {
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(99, 255, 207, 0.16),
    inset 0 0 0 1px rgba(162, 255, 220, 0.18);
}

.s14-feedback.is-wrong {
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(255, 97, 132, 0.14),
    inset 0 0 0 1px rgba(255, 151, 177, 0.14);
}

.s14-jump-btn {
  border-radius: 16px;
  background:
    linear-gradient(180deg, #55ddff, #2f8eff 60%, #266ce2 100%);
  box-shadow:
    0 16px 30px rgba(0, 77, 177, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 18px rgba(61, 206, 255, 0.18);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.s14-jump-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.s14-result-card {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(10, 28, 46, 0.96), rgba(3, 10, 19, 0.97)),
    radial-gradient(circle at 50% 0%, rgba(61, 216, 255, 0.08), transparent 62%);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(69, 214, 255, 0.1) inset;
}

/* s14: fixed 1920×1080 — no mobile reflow overrides */

/* s14 arcade polish */
.s14-bg-parallax-far {
  animation-duration: 24s;
}

.s14-bg-parallax-mid {
  animation-duration: 18s;
}

.s14-error-wave {
  opacity: 0.66;
  filter: blur(0.6px) drop-shadow(0 0 18px rgba(255, 36, 104, 0.34));
}

.s14-landing-dust {
  position: absolute;
  z-index: 5;
  width: 104px;
  height: 28px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) scale(0.72);
  background:
    radial-gradient(ellipse at 28% 55%, rgba(154, 238, 255, 0.34), transparent 38%),
    radial-gradient(ellipse at 72% 58%, rgba(154, 238, 255, 0.28), transparent 36%),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.2), transparent 64%);
  filter: blur(1px);
}

.s14-landing-dust.is-active {
  animation: s14-landing-dust 0.2s ease-out forwards;
}

@keyframes s14-landing-dust {
  0% { opacity: 0.58; transform: translateX(-50%) scale(0.62); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.35); }
}

.s14-player.is-running {
  animation: s14-player-run calc(0.3s / var(--s14-pace, 1)) ease-in-out infinite;
}

.s14-player.is-react-wrong {
  animation: s14-player-hurt 0.3s ease-out, s14-player-red-flash 0.3s ease-out;
}

@keyframes s14-player-run {
  0% { translate: 0 0; rotate: -1deg; }
  50% { translate: 0 -4px; rotate: 1deg; }
  100% { translate: 0 0; rotate: -1deg; }
}

@keyframes s14-player-hurt {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  22% { translate: -5px 0; rotate: -2deg; }
  48% { translate: 5px 0; rotate: 2deg; }
  74% { translate: -3px 0; rotate: -1deg; }
}

@keyframes s14-player-red-flash {
  0%, 100% { filter: none; }
  35% {
    filter:
      drop-shadow(0 0 12px rgba(255, 76, 100, 0.8))
      drop-shadow(0 0 24px rgba(255, 76, 100, 0.35));
  }
}

/* 이동 중 카드를 GPU 레이어로 승격시키지 않는다.
   #game-root 가 scale(<1) 인 상태에서 레이어로 승격되면 레이어가 정수 픽셀에
   스냅된 뒤 GPU 보간으로 다시 그려져 분자·분모 숫자가 번진다.
   (카드가 멈추면 transform 이 사라져 다시 선명해지는 것이 그 증거) */
.s14-hazard-card:not(.is-collected-wrong) {
  will-change: transform;
}

/* 좌우 이동은 s14.js가 transform으로 관리 — 카드에 상하 흔들림을 주지 않는다 */
.s14-fraction-card:not(.is-collected-correct):not(.is-collected-wrong) {
  animation: s14-card-enter 0.18s ease-out both;
}

.s14-hazard-card:not(.is-collected-wrong) {
  animation:
    s14-card-enter 0.18s ease-out both,
    s14-card-float 2.4s ease-in-out 0.18s infinite alternate,
    s14-error-pulse 1.05s ease-in-out 0.18s infinite;
}

@keyframes s14-card-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes s14-card-float {
  from { translate: 0 0; }
  to { translate: 0 -3px; }
}

@keyframes s14-error-pulse {
  0%, 100% {
    border-color: rgba(255, 112, 142, 0.78);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.32),
      0 0 18px rgba(255, 49, 101, 0.24);
  }
  50% {
    border-color: rgba(255, 166, 188, 0.95);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.32),
      0 0 30px rgba(255, 49, 101, 0.42);
  }
}

.s14-score-pop {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -50%);
  color: #baffdf;
  font-size: 24px;
  font-weight: 950;
  text-shadow:
    0 0 10px rgba(99, 255, 207, 0.84),
    0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: s14-score-pop 0.56s ease-out forwards;
}

@keyframes s14-score-pop {
  0% { opacity: 0; transform: translate(-50%, -16%) scale(0.8); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(0.92); }
}

.s14-stat-value.is-pulse,
.s14-found-dot.is-filled,
.s14-mission-dot.is-current {
  animation: s14-hud-pop 0.34s ease-out;
}

.s14-stat-value.is-error-pulse {
  animation: s14-error-count-pulse 0.36s ease-out;
}

@keyframes s14-hud-pop {
  0% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.2); filter: brightness(1.25); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes s14-error-count-pulse {
  0% { transform: scale(1); color: #ffd5d5; }
  42% {
    transform: scale(1.18);
    color: #ff8da1;
    text-shadow: 0 0 18px rgba(255, 76, 100, 0.78);
  }
  100% { transform: scale(1); color: #ffd5d5; }
}

.s14-board.is-wrong {
  animation: s14-board-shake 0.28s ease-in-out;
}

@keyframes s14-board-shake {
  0%, 100% { transform: translateX(0); }
  24% { transform: translateX(-5px); }
  52% { transform: translateX(5px); }
  76% { transform: translateX(-3px); }
}

.s14-result-card {
  animation: s14-result-in 0.28s ease-out both;
}

.s14-result-card.is-clear {
  animation: s14-result-in 0.28s ease-out both, s14-result-glow 0.75s ease-out 0.04s both;
}

.s14-result-card h2 {
  text-shadow: 0 0 18px rgba(117, 230, 255, 0.24);
}

.s14-final-clear h2 {
  animation: none;
}

.s14-final-clear .stage1-primary-action,
.s14-result-card .stage1-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.s14-intro-actions,
.s14-tutorial-actions,
.s14-practice-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.s14-intro-actions .s14-secondary-action,
.s14-intro-actions .stage1-primary-action,
.s14-tutorial-actions .s14-secondary-action,
.s14-tutorial-actions .stage1-primary-action,
.s14-practice-actions .s14-secondary-action,
.s14-practice-actions .stage1-primary-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 134px;
  min-height: 52px;
  margin: 0;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.s14-intro-actions .s14-secondary-action,
.s14-tutorial-actions .s14-secondary-action,
.s14-practice-actions .s14-secondary-action {
  border: 1px solid rgba(120, 210, 255, 0.55);
  background: rgba(8, 28, 46, 0.92);
  color: #e8f7ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.s14-intro-actions .stage1-primary-action,
.s14-tutorial-actions .stage1-primary-action,
.s14-practice-actions .stage1-primary-action {
  border: 1px solid rgba(130, 225, 255, 0.55);
  background: linear-gradient(180deg, #3ec8f2, #2a8adf);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(12, 70, 140, 0.28);
}

.s14-intro-actions .s14-secondary-action:hover,
.s14-intro-actions .s14-secondary-action:focus-visible,
.s14-tutorial-actions .s14-secondary-action:hover,
.s14-tutorial-actions .s14-secondary-action:focus-visible,
.s14-practice-actions .s14-secondary-action:hover,
.s14-practice-actions .s14-secondary-action:focus-visible,
.s14-intro-actions .stage1-primary-action:hover,
.s14-intro-actions .stage1-primary-action:focus-visible,
.s14-tutorial-actions .stage1-primary-action:hover,
.s14-tutorial-actions .stage1-primary-action:focus-visible,
.s14-practice-actions .stage1-primary-action:hover,
.s14-practice-actions .stage1-primary-action:focus-visible {
  transform: translateY(-1px);
  outline: none;
  filter: brightness(1.06);
}

.s14-result-card .s14-next-round-btn {
  box-sizing: border-box;
  min-width: 124px;
  width: auto;
  min-height: 58px;
  margin: 4px auto 0;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1;
}

.s14-practice-fraction-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 10px;
}

.s14-practice-inline-frac {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.s14-practice-inline-frac .textbook-math,
.s14-practice-inline-frac .tm-frac {
  display: inline-flex;
}

.s14-practice-mode-badge {
  /* s33 「게임 시범 보기」 배지와 동일 위치·크기 */
  position: absolute;
  left: 68px;
  top: 118px;
  z-index: 110;
  min-width: 310px;
  padding: 17px 28px 16px;
  box-sizing: border-box;
  display: block;
  border: 2px solid rgba(126, 226, 255, 0.72);
  border-radius: 16px;
  background: rgba(3, 19, 34, 0.96);
  color: #eafaff;
  text-align: center;
  font-size: 27px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.03em;
  box-shadow: 0 0 28px rgba(77, 208, 255, 0.28);
  pointer-events: none;
  white-space: nowrap;
}

.s14-practice-tag {
  display: none !important;
}

/* 배지만 카드 위로 삐져나오게 — 보드는 계속 clip (가로 밖으로 카드가 새지 않음) */
.s14-fraction-card.is-practice-jump,
.s14-fraction-card.is-practice-avoid {
  overflow: visible;
}

.s14-practice-badge {
  position: absolute;
  left: 50%;
  top: -42px;
  z-index: 6;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}

.s14-practice-badge.is-jump {
  background: #0b83db;
  box-shadow: 0 0 16px rgba(58, 194, 255, 0.65);
  animation: s14PracticeLabel 650ms ease-in-out infinite alternate;
}

.s14-practice-badge.is-avoid {
  background: linear-gradient(180deg, #e2555c, #c4454a);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(255, 98, 110, 0.55);
  animation: s14PracticeAvoidPopup 700ms ease-in-out infinite alternate;
}

.s14-fraction-card.is-practice-avoid.is-practice-real-fraction {
  border-color: #ff7b86 !important;
  box-shadow: 0 0 22px rgba(255, 110, 120, 0.28), inset 0 0 16px rgba(255, 120, 130, 0.1) !important;
}

/* 연습 모드에서도 보드/레이어는 clip — 카드가 교실 배경 위로 새지 않게 */
.s14-board.is-practice,
.s14-board.is-practice .s14-card-layer {
  overflow: hidden;
}

@keyframes s14PracticeLabel {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(-4px); }
}

@keyframes s14PracticeAvoidPopup {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to { transform: translateX(-50%) translateY(-7px) scale(1.04); }
}

.s14-result-card .stage1-primary-action:hover,
.s14-result-card .stage1-primary-action:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 24px rgba(95, 224, 255, 0.32);
}

@keyframes s14-result-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes s14-result-glow {
  0% { box-shadow: 0 24px 62px rgba(0, 0, 0, 0.5), 0 0 0 rgba(95, 224, 255, 0); }
  42% { box-shadow: 0 24px 62px rgba(0, 0, 0, 0.5), 0 0 34px rgba(95, 224, 255, 0.34); }
  100% { box-shadow: 0 24px 62px rgba(0, 0, 0, 0.5), 0 0 16px rgba(95, 224, 255, 0.14); }
}

@keyframes s14-final-title-glow {
  0% { opacity: 0; filter: blur(2px); text-shadow: 0 0 0 rgba(159, 255, 230, 0); }
  55% { opacity: 1; filter: blur(0); text-shadow: 0 0 28px rgba(159, 255, 230, 0.58); }
  100% { opacity: 1; filter: blur(0); text-shadow: 0 0 16px rgba(159, 255, 230, 0.28); }
}

/* s14 HUD cleanup: keep top information split into round, target, and stats. */
body.s14-ui-active .s14-screen {
  --s14-col-left: 204px;
  --s14-col-width: 1512px;
  /* 게임 HUD·보드만 1.5cm 아래로 이동한다. */
  --s14-hud-top: calc(54px + 1.5cm);
  --s14-hud-height: 118px;
  --s14-board-gap: 4px;
  --s14-board-height: 622px;
  --s14-board-top: calc(var(--s14-hud-top) + var(--s14-hud-height) + var(--s14-board-gap));
  --s14-play-zone-height: calc(var(--s14-hud-height) + var(--s14-board-gap) + var(--s14-board-height));
}

body.s14-ui-active .s14-hud {
  left: var(--s14-col-left);
  top: var(--s14-hud-top);
  width: var(--s14-col-width);
  height: var(--s14-hud-height);
  grid-template-columns: 220px minmax(0, 1fr) minmax(460px, 520px);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  box-sizing: border-box;
  border-radius: 18px;
  overflow: visible;
}

body.s14-ui-active .s14-hud-divider,
body.s14-ui-active .s14-round-kicker,
body.s14-ui-active .s14-mission-sub,
body.s14-ui-active .s14-status-row {
  display: none;
}

body.s14-ui-active .s14-hud-round {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
}

body.s14-ui-active .s14-mission-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}

body.s14-ui-active .s14-mission-label {
  color: #f4fbff;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 1px;
  line-height: 1;
}

body.s14-ui-active .s14-mission-label b {
  color: #9bedff;
  font-size: 28px;
  margin-left: 4px;
}

body.s14-ui-active .s14-found-dots {
  gap: 9px;
  margin-left: 0;
}

body.s14-ui-active .s14-found-dot {
  width: 15px;
  height: 15px;
  background: rgba(28, 42, 58, 0.92);
  border-color: rgba(130, 178, 206, 0.46);
}

body.s14-ui-active .s14-found-dot.is-filled {
  background: #5fe0ff;
  border-color: #b8f4ff;
  box-shadow: 0 0 12px rgba(95, 224, 255, 0.78);
}

/* Keep Stage 6 mission-dot size/gap/color (do not enlarge like old found-dots) */
body.s14-ui-active .s14-mission-dots {
  gap: 7px;
}

body.s14-ui-active .s14-mission-dot {
  width: 10px;
  height: 10px;
}

body.s14-ui-active .s14-mission-dot.is-current {
  background: #5fe0ff;
  border-color: #9bedff;
  box-shadow: 0 0 10px rgba(95, 224, 255, 0.9);
}

body.s14-ui-active .s14-mission-dot.is-pending {
  background: rgba(32, 44, 62, 0.9);
  border-color: rgba(58, 78, 102, 0.5);
}

body.s14-ui-active .s14-mission-dot.is-done {
  background: rgba(95, 224, 255, 0.42);
  border-color: rgba(126, 224, 255, 0.62);
}

body.s14-ui-active .s14-target-compact {
  justify-self: center;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 14px;
  line-height: 1;
}

body.s14-ui-active .s14-target-label {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(1px);
}

body.s14-ui-active #s14-target-fraction .s14-fraction-num,
body.s14-ui-active #s14-target-fraction .s14-fraction-den {
  font-size: 46px;
  line-height: 1;
}

/* 목표 분수: 고정 폭 제거, 숫자 폭에 맞춘 분수선 */
body.s14-ui-active #s14-target-fraction .textbook-math {
  --math-fs: 46px;
  --min-bar: 0;
  --bar-pad: 0.12em;
  --near-bar-gap: 0px;
  --bar-h: 3px;
}

body.s14-ui-active #s14-target-fraction .tm-frac.s14-fraction,
body.s14-ui-active #s14-target-fraction .tm-frac.s14-target-fraction {
  min-width: 0;
  width: max-content;
}

body.s14-ui-active #s14-target-fraction .s14-fraction-bar {
  margin: 0;
}

/* 어두운 HUD 위에서도 목표 분수의 숫자와 분수선이 또렷하게 보이도록 한다. */
body.s14-ui-active #s14-target-fraction,
body.s14-ui-active #s14-target-fraction .textbook-math,
body.s14-ui-active #s14-target-fraction .s14-fraction-num,
body.s14-ui-active #s14-target-fraction .s14-fraction-den {
  color: #e8fbff !important;
  -webkit-text-fill-color: #e8fbff !important;
  text-shadow: 0 0 12px rgba(150, 239, 255, 0.72), 0 0 24px rgba(61, 194, 255, 0.38) !important;
}

body.s14-ui-active #s14-target-fraction .s14-fraction-bar,
body.s14-ui-active #s14-target-fraction .tm-bar {
  background: #bdf6ff !important;
  box-shadow: 0 0 10px rgba(131, 233, 255, 0.8) !important;
}

body.s14-ui-active .s14-stat-compact {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding-left: 0;
  min-width: 0;
}

body.s14-ui-active .s14-wave-meter {
  min-width: 132px;
  width: 142px;
  flex: 0 0 auto;
  height: 64px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

body.s14-ui-active .s14-wave-meter-track {
  height: 20px;
  margin-top: 0;
}

body.s14-ui-active .s14-stat-item {
  min-width: 96px;
  height: 64px;
  border-radius: 14px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  box-sizing: border-box;
}

body.s14-ui-active .s14-stat-label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  min-height: 13px;
}

body.s14-ui-active .s14-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  font-size: 23px;
  line-height: 1;
}

body.stage1-ui-active {
  --eq-frame-width: 1920px;
  --eq-frame-height: 1080px;
  --eq-frame-left: 0px;
  --eq-shell-gap: clamp(18px, calc(var(--eq-frame-width) * 0.018), 28px);
  --eq-side-panel-width: clamp(360px, calc(var(--eq-frame-width) * 0.29), 410px);
}

.eq-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  min-height: 0;
  padding: 18px var(--eq-shell-gap, 24px) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border-bottom: 0;
  pointer-events: none;
}

.eq-mission {
  max-width: min(700px, calc(100% - var(--eq-side-panel-width, 390px) - 120px));
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(7, 18, 31, 0.74);
  border: 1px solid rgba(142, 214, 255, 0.18);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.01em;
  white-space: nowrap;
  word-break: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-mission::before {
  content: "[미션] ";
  color: #9edcff;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.eq-topbar-actions,
.eq-actions,
.eq-tool-row,
.eq-help-actions,
.eq-main-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.eq-topbar-actions button,
.eq-actions button {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  background: rgba(10, 23, 38, 0.78);
  border: 1px solid rgba(140, 214, 255, 0.24);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  pointer-events: auto;
}

.eq-topbar-actions button:hover,
.eq-actions button:hover {
  filter: brightness(1.08);
}

.eq-tool-btn {
  border: 1px solid rgba(135, 219, 255, 0.16);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  color: #dff2ff;
  background: rgba(20, 35, 56, 0.92);
  box-shadow: none;
  cursor: pointer;
}

.eq-tool-btn:hover {
  filter: brightness(1.05);
}

.eq-tool-btn.locked {
  cursor: default;
  color: rgba(255,255,255,0.42);
  background: rgba(16, 28, 46, 0.54);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: none;
  opacity: 0.72;
}

.eq-tool-btn.active {
  background: linear-gradient(180deg, #43d6ff, #287dff);
  border-color: rgba(171, 232, 255, 0.52);
  box-shadow: 0 0 0 1px rgba(171, 232, 255, 0.22), 0 0 18px rgba(87, 211, 255, 0.38);
}

.eq-tool-btn.recommended {
  border-color: rgba(255, 232, 143, 0.88);
  box-shadow: 0 0 0 2px rgba(255, 232, 143, 0.2), 0 0 22px rgba(255, 217, 92, 0.34);
  animation: eq-tool-recommend 1.8s ease-in-out infinite;
}

@keyframes eq-tool-recommend {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

.eq-wrap {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
}

.eq-bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/s1.png");
  background-size: cover;
  background-position: center;
  filter: none;
  transform: scale(1.012);
}

.eq-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(42, 134, 255, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.eq-stage-intro {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 32px 32px;
}

.eq-stage-intro-card {
  width: min(620px, calc(100% - 48px));
  padding: 22px 24px;
  border-radius: 28px;
  background: rgba(7, 17, 30, 0.88);
  border: 1px solid rgba(140, 214, 255, 0.2);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  text-align: center;
}

.eq-investigation-brief {
  position: absolute;
  left: calc(var(--eq-shell-gap, 24px) + var(--eq-inventory-width, 76px) + 22px);
  bottom: calc(var(--eq-inventory-height) + 74px);
  width: 440px;
  max-width: calc(100% - var(--eq-side-panel-width, 390px) - 180px);
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(6, 17, 30, 0.88);
  border: 1px solid rgba(126, 213, 255, 0.28);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  text-align: left;
}

.eq-investigation-brief .eq-stage-intro-title {
  font-size: 24px;
}

.eq-investigation-brief .eq-stage-intro-btn {
  border-radius: 12px;
}

.eq-stage-intro-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(94, 188, 255, 0.14);
  color: #aee6ff;
  font-size: 12px;
  font-weight: 950;
}

.eq-stage-intro-title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.eq-stage-intro-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(238, 246, 255, 0.86);
}

.eq-stage-intro-btn {
  margin-top: 18px;
  border: none;
  border-radius: 16px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 950;
  color: #ffffff;
  background: linear-gradient(180deg, #3f8fff, #2763e9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.eq-stage-intro-btn:hover {
  filter: brightness(1.08);
}

.eq-topbar-actions {
  align-items: center;
  pointer-events: auto;
}

.eq-topbar-actions button {
  min-width: 58px;
  min-height: 36px;
}

.eq-stage-badge {
  position: absolute;
  left: 24px;
  top: 12px;
  z-index: 15;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(8, 18, 32, 0.82);
  border: 1px solid rgba(145, 214, 255, 0.18);
  font-weight: 900;
  display: none;
}

.eq-door-panel {
  position: absolute;
  right: var(--eq-shell-gap, 24px);
  top: 20px;
  z-index: 15;
  box-sizing: border-box;
  width: var(--eq-side-panel-width, 390px);
  max-width: calc(100% - var(--eq-shell-gap, 24px) * 2);
  padding: 10px 14px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: rgba(8, 18, 32, 0.74);
  border: 1px solid rgba(255, 120, 120, 0.2);
  box-shadow: 0 14px 28px rgba(0,0,0,0.24);
  backdrop-filter: blur(12px);
}

.eq-door-title {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 900;
  margin-bottom: 0;
}

.eq-door-lamps {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.eq-lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.eq-lamp.off {
  background: rgba(255,255,255,0.16);
}

.eq-lamp.on {
  background: #ffcf58;
  box-shadow: 0 0 15px rgba(255, 216, 107, 0.95);
}

.eq-lamp.clear {
  background: #7fffb8;
  box-shadow: 0 0 17px rgba(127, 255, 184, 0.9);
}

.eq-seal-panel {
  position: absolute;
  right: calc(var(--eq-shell-gap, 24px) + var(--eq-home-pill-width, 68px) + var(--eq-home-door-gap, 24px));
  top: 78px;
  z-index: 25;
  box-sizing: border-box;
  width: min(520px, calc(100% - 460px));
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(5, 15, 30, 0.82);
  border: 1px solid rgba(110, 193, 255, 0.24);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
}

.eq-seal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #dff4ff;
  font-size: 12px;
  font-weight: 950;
}

.eq-seal-header strong {
  color: #8fdfff;
  font-size: 13px;
}

.eq-stability-meter {
  height: 9px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.eq-stability-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28a8ff, #65e7ff, #a7ffd1);
  box-shadow: 0 0 18px rgba(86, 212, 255, 0.75);
  transition: width 0.42s ease;
}

.eq-seal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.eq-seal-piece {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-rows: 26px auto auto;
  align-items: center;
  justify-items: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: 12px;
  background: rgba(7, 17, 31, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 242, 255, 0.48);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.22);
  transition: color 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.eq-seal-piece.active {
  color: #f5fbff;
  background: linear-gradient(180deg, rgba(29, 101, 164, 0.94), rgba(12, 52, 108, 0.94));
  border-color: rgba(129, 225, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(129, 225, 255, 0.2),
    0 0 24px rgba(69, 191, 255, 0.52),
    inset 0 0 18px rgba(128, 231, 255, 0.12);
}

.eq-seal-icon {
  width: 28px;
  height: 24px;
  position: relative;
  display: block;
}

.eq-seal-icon::before,
.eq-seal-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.eq-seal-icon-bar::before {
  inset: 5px 3px;
  border-radius: 6px;
  background: currentColor;
}

.eq-seal-icon-line::before {
  left: 3px;
  right: 3px;
  top: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.eq-seal-icon-line::after {
  left: 12px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 10px 0 0 currentColor;
}

.eq-seal-icon-circle::before {
  inset: 2px 4px;
  border-radius: 50%;
  border: 3px solid currentColor;
}

.eq-seal-icon-multiply::before,
.eq-seal-icon-multiply::after {
  left: 13px;
  top: 2px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
}

.eq-seal-icon-multiply::before { transform: rotate(45deg); }
.eq-seal-icon-multiply::after { transform: rotate(-45deg); }

.eq-seal-icon-divide::before {
  left: 4px;
  right: 4px;
  top: 11px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.eq-seal-icon-divide::after {
  left: 12px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 14px 0 currentColor;
}

.eq-seal-icon-discovery::before {
  left: 3px;
  top: 5px;
  width: 22px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid currentColor;
}

.eq-seal-icon-discovery::after {
  left: 12px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.eq-seal-icon-rule::before {
  left: 3px;
  right: 3px;
  top: 5px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
}

.eq-seal-icon-door::before {
  inset: 2px 7px 1px;
  border-radius: 7px 7px 3px 3px;
  border: 3px solid currentColor;
}

.eq-seal-icon-door::after {
  right: 8px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.eq-seal-label {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
}

.eq-seal-state {
  max-width: 100%;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  color: rgba(226, 242, 255, 0.42);
  white-space: nowrap;
}

.eq-seal-piece.active .eq-seal-state {
  color: #a7ffd1;
}

.eq-subseal-panel {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(160, 220, 255, 0.12);
}

.eq-subseal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(226, 242, 255, 0.56);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.eq-subseal-chip.active {
  color: #dffbff;
  background: rgba(45, 152, 220, 0.28);
  border-color: rgba(117, 224, 255, 0.54);
  box-shadow: 0 0 14px rgba(75, 204, 255, 0.28);
}

.eq-clue-vault {
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(4, 15, 28, 0.62);
  border: 1px solid rgba(102, 192, 255, 0.18);
}

.eq-clue-vault-title {
  margin-bottom: 6px;
  color: #c9efff;
  font-size: 11px;
  font-weight: 950;
}

.eq-clue-card-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.eq-clue-card {
  min-height: 46px;
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(5, 18, 31, 0.72);
  border: 1px solid rgba(160, 190, 210, 0.18);
  color: rgba(226, 241, 252, 0.5);
}

.eq-clue-card.active {
  color: #f2fbff;
  background: rgba(18, 80, 126, 0.72);
  border-color: rgba(122, 214, 255, 0.5);
  box-shadow: inset 0 0 18px rgba(91, 194, 255, 0.16);
}

.eq-clue-card strong,
.eq-clue-card span {
  display: block;
}

.eq-clue-card strong {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.eq-clue-card span {
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
}

.eq-seal-effect-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.eq-seal-complete-burst {
  position: absolute;
  top: 164px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  color: #f7fdff;
  font-size: 18px;
  font-weight: 950;
  background: rgba(18, 83, 143, 0.9);
  border: 1px solid rgba(137, 232, 255, 0.9);
  box-shadow: 0 0 38px rgba(78, 209, 255, 0.82);
  animation: eq-seal-burst 1.15s ease forwards;
}

.eq-clue-acquired {
  position: absolute;
  left: 50%;
  top: 188px;
  transform: translateX(-50%);
  z-index: 3;
  padding: 10px 18px;
  border-radius: 999px;
  color: #eaffff;
  background: rgba(12, 75, 118, 0.92);
  border: 1px solid rgba(137, 223, 255, 0.8);
  box-shadow: 0 0 30px rgba(82, 192, 255, 0.52);
  font-size: 16px;
  font-weight: 950;
  animation: eq-clue-fly 1.5s ease forwards;
}

.eq-stage-screen.eq-seal-flash::after,
.eq-stage-screen.eq-error-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

.eq-stage-screen.eq-seal-flash::after {
  background: radial-gradient(circle at 62% 16%, rgba(100, 219, 255, 0.34), transparent 30%);
  animation: eq-seal-flash 0.66s ease forwards;
}

.eq-stage-screen.eq-error-pulse::after {
  background:
    radial-gradient(circle at 50% 42%, transparent 0 22%, rgba(255, 70, 82, 0.28) 23%, transparent 38%),
    rgba(110, 0, 18, 0.08);
  animation: eq-error-pulse 0.48s ease forwards;
}

.eq-stage-screen.eq-screen-shake {
  animation: eq-stage-shake 0.36s ease;
}

.eq-namecard-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 4;
  pointer-events: none;
}

.eq-namecard-links line {
  stroke-width: 0.9;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.eq-namecard-links line.active {
  stroke: #79e7ff;
  filter: drop-shadow(0 0 8px rgba(94, 220, 255, 0.96));
  stroke-dasharray: 6 4;
  animation: eq-link-flow 0.85s linear infinite;
}

.eq-namecard-links line.error {
  stroke: #ff6472;
  filter: drop-shadow(0 0 9px rgba(255, 88, 96, 0.9));
  stroke-dasharray: 5 5;
  animation: eq-link-error 0.42s ease 2;
}

.eq-fraction-card.seal-fuse {
  animation: eq-namecard-fuse 0.9s ease forwards;
}

.eq-door-panel.unlocked {
  border-color: rgba(127, 255, 184, 0.75);
  box-shadow: 0 0 34px rgba(127, 255, 184, 0.42), 0 14px 28px rgba(0,0,0,0.24);
}

@keyframes eq-seal-burst {
  0% { opacity: 0; transform: translate(-50%, 18px) scale(0.94); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -6px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -18px) scale(0.98); }
}

@keyframes eq-clue-fly {
  0% { opacity: 0; transform: translate(-50%, 18px) scale(0.92); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -26px) scale(0.98); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(0.9); }
}

@keyframes eq-seal-flash {
  0% { opacity: 0; }
  26% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes eq-hotspot-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(94, 200, 255, 0.13), 0 0 22px rgba(90, 202, 255, 0.42), 0 16px 28px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(94, 200, 255, 0.2), 0 0 36px rgba(90, 202, 255, 0.66), 0 16px 28px rgba(0, 0, 0, 0.3); }
}

@keyframes eq-error-pulse {
  0% { opacity: 0; transform: scale(0.92); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes eq-stage-shake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  22% { transform: translate3d(-8px, 0, 0); }
  44% { transform: translate3d(7px, 0, 0); }
  66% { transform: translate3d(-4px, 0, 0); }
  82% { transform: translate3d(3px, 0, 0); }
}

@keyframes eq-link-flow {
  to { stroke-dashoffset: -20; }
}

@keyframes eq-link-error {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; stroke-width: 1.4; }
}

@keyframes eq-namecard-fuse {
  0% { opacity: 1; filter: brightness(1); }
  72% { opacity: 1; transform: translate(42px, -170px) scale(0.82) rotate(0deg); filter: brightness(1.5); }
  100% { opacity: 0; transform: translate(70px, -220px) scale(0.3) rotate(6deg); filter: brightness(2); }
}

.eq-error {
  position: absolute;
  left: var(--eq-shell-gap, 24px);
  top: 76px;
  z-index: 14;
  max-width: calc(100% - var(--eq-side-panel-width, 390px) - var(--eq-shell-gap, 24px) * 3);
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(64, 0, 0, 0.42);
  border: 1px solid rgba(255, 118, 118, 0.32);
  color: #ffd4d4;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  text-align: left;
  display: none;
}

.eq-object-layer,
.eq-visual-layer {
  position: absolute;
  inset: 84px calc(var(--eq-side-panel-width, 390px) + var(--eq-shell-gap, 24px) * 2) 28px var(--eq-shell-gap, 24px);
  z-index: 6;
  pointer-events: none;
}

.eq-object-layer .eq-fraction-card {
  pointer-events: auto;
}

.eq-classroom-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.eq-room-hotspot {
  position: absolute;
  min-width: 120px;
  padding: 9px 11px 9px 38px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: rgba(235, 247, 255, 0.72);
  background: rgba(7, 16, 28, 0.72);
  border: 1px solid rgba(175, 200, 220, 0.22);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.eq-room-hotspot.locked {
  opacity: 0.5;
  filter: grayscale(0.45);
}

.eq-room-hotspot.done {
  opacity: 0.82;
  color: #ceffe8;
  border-color: rgba(127, 255, 190, 0.35);
}

.eq-room-hotspot.active {
  color: #f4fdff;
  background: rgba(8, 48, 78, 0.88);
  border-color: rgba(129, 221, 255, 0.8);
  box-shadow:
    0 0 0 2px rgba(94, 200, 255, 0.16),
    0 0 30px rgba(90, 202, 255, 0.52),
    0 16px 28px rgba(0, 0, 0, 0.3);
  animation: eq-hotspot-glow 1.8s ease-in-out infinite;
}

.eq-room-hotspot:hover {
  transform: translate(-50%, -54%) scale(1.03);
}

.eq-room-hotspot-dot {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(140, 162, 180, 0.48);
  transform: translateY(-50%);
}

.eq-room-hotspot.active .eq-room-hotspot-dot {
  background: #75e6ff;
  box-shadow: 0 0 18px rgba(103, 220, 255, 0.9);
}

.eq-room-hotspot.done .eq-room-hotspot-dot {
  background: #77ffc1;
}

.eq-room-hotspot-label,
.eq-room-hotspot-state {
  display: block;
  white-space: nowrap;
}

.eq-room-hotspot-state {
  margin-top: 2px;
  color: rgba(218, 238, 255, 0.64);
  font-size: 10px;
  font-weight: 850;
}

.eq-fraction-card {
  position: absolute;
  width: 124px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 20px;
  color: #eef8ff;
  background: rgba(8, 18, 32, 0.86);
  border: 1px solid rgba(137, 217, 255, 0.23);
  box-shadow: 0 18px 28px rgba(0,0,0,0.24), 0 0 0 1px rgba(255,255,255,0.04) inset;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.eq-fraction-card .eq-card-label {
  font-size: 27px;
  font-weight: 950;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 분수 카드 UI — 수식 markup(.textbook-math)과 별개 */
.eq-fraction-inline {
  margin: 0 0.06em;
}

.input-fraction {
  --fraction-line-gap: 0.18em;
  min-width: 72px;
  color: #f4fbff;
}

.input-fraction .tm-bar,
.input-fraction .fraction-line,
.input-fraction .eq-fraction-line {
  width: 100%;
  min-width: 64px;
  height: 2px;
  margin: var(--fraction-line-gap) 0;
  opacity: 1;
  background: rgba(245, 250, 255, 0.9);
}

.fraction-input,
.numerator-input {
  width: 64px;
  height: 38px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1.5px solid rgba(100, 200, 255, 0.85);
  background: rgba(8, 22, 40, 0.95);
  color: #ffffff;
  outline: none;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.fraction-input:focus,
.numerator-input:focus {
  border-color: rgba(90, 190, 255, 1);
  box-shadow: 0 0 10px rgba(90, 190, 255, 0.55);
}

.equation-list,
.eq-fill-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.fraction-equation {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: #f4fbff;
}

.equation-sign {
  font-size: 26px;
  font-weight: 900;
  color: #f4fbff;
}

.eq-fraction-card .eq-card-sub {
  font-size: 12px;
  color: rgba(232, 247, 255, 0.72);
  font-weight: 800;
}

.eq-fraction-card.selected {
  background: linear-gradient(180deg, rgba(35, 113, 196, 0.96), rgba(18, 68, 146, 0.94));
  border-color: rgba(157, 228, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(157, 228, 255, 0.2),
    0 0 28px rgba(89, 192, 255, 0.5),
    0 18px 30px rgba(0, 0, 0, 0.28);
}

.eq-fraction-card.wrong {
  background: rgba(112, 30, 42, 0.88);
  border-color: rgba(255, 118, 118, 0.8);
  animation: eq-shake 0.32s ease;
}

.eq-fraction-card.correct-glow {
  background: rgba(26, 128, 128, 0.86);
  border-color: rgba(127, 255, 210, 0.9);
  box-shadow: 0 0 22px rgba(127, 255, 210, 0.54);
}

@keyframes eq-shake {
  0%, 100% { margin-left: 0; }
  25% { margin-left: -8px; }
  75% { margin-left: 8px; }
}

.eq-panel {
  position: absolute;
  z-index: 20;
  top: 94px;
  right: var(--eq-shell-gap, 24px);
  bottom: 28px;
  left: auto;
  box-sizing: border-box;
  width: var(--eq-side-panel-width, 390px);
  max-width: calc(100% - var(--eq-shell-gap, 24px) * 2);
  min-height: 0;
  padding: 22px 20px 18px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(5, 14, 28, 0.88);
  border: 1px solid rgba(110, 220, 255, 0.25);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
}

.eq-object-panel {
  transform: none;
}

.eq-question-panel {
  transform: none;
}

.eq-panel-kicker {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(94, 188, 255, 0.14);
  color: #aee6ff;
  font-size: 12px;
  font-weight: 950;
}

.eq-panel h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.eq-panel p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(238,246,255,0.86);
}

.eq-interaction {
  margin-top: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.eq-interaction::-webkit-scrollbar {
  width: 8px;
}

.eq-interaction::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(138, 212, 255, 0.24);
}

.eq-panel-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.eq-help-actions,
.eq-main-actions {
  align-items: center;
  width: 100%;
}

.eq-help-actions > *,
.eq-main-actions > * {
  flex: 1 1 0;
}

.eq-help-btn,
.eq-primary-btn,
.eq-secondary-btn {
  min-height: 40px;
  padding: 9px 14px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.eq-help-btn {
  color: #d8efff;
  background: rgba(21, 37, 58, 0.96);
  border: 1px solid rgba(122, 205, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.eq-help-btn:hover,
.eq-secondary-btn:hover {
  filter: brightness(1.06);
}

.eq-primary-btn {
  color: #ffffff;
  background: linear-gradient(180deg, #3f8fff, #2763e9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.eq-primary-btn:hover {
  filter: brightness(1.08);
}

.eq-primary-btn:disabled,
.eq-primary-btn.disabled {
  cursor: default;
  opacity: 0.5;
  filter: grayscale(0.35);
}

.eq-secondary-btn {
  color: #d8efff;
  background: rgba(27, 42, 64, 0.96);
  border: 1px solid rgba(255,255,255,0.1);
}

.eq-prompt {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
}

.eq-mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.eq-mini-card {
  border: 1px solid rgba(149, 217, 255, 0.22);
  border-radius: 18px;
  min-height: 76px;
  padding: 11px 10px;
  background: rgba(16, 28, 48, 0.84);
  color: #ffffff;
  font-size: 23px;
  font-weight: 950;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.eq-mini-card.selected {
  background: rgba(30, 93, 164, 0.95);
  border-color: rgba(135, 219, 255, 0.92);
  box-shadow: 0 0 18px rgba(110, 198, 255, 0.35);
}

.eq-bars-workspace {
  display: grid;
  gap: 15px;
}

.eq-bar-row {
  display: grid;
  grid-template-columns: 68px 1fr 48px;
  align-items: center;
  gap: 10px;
}

.eq-bar-label {
  font-size: 18px;
  font-weight: 950;
  color: #ffffff;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.eq-bar {
  display: grid;
  gap: 3px;
  padding: 4px;
  min-height: 38px;
  border-radius: 13px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.eq-bar-cell {
  min-height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
}

.eq-bar-cell.filled {
  background: linear-gradient(180deg, #60d7ff, #2e86ff);
  box-shadow: 0 0 10px rgba(89, 205, 255, 0.38);
}

.eq-bar-target .eq-bar-cell.filled {
  background: linear-gradient(180deg, #7fffb8, #2ecb7c);
}

.eq-bar-value {
  font-size: 18px;
  font-weight: 950;
  color: #dff4ff;
}

.eq-fill-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.eq-fill-row {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 14px;
  font-size: 20px;
  font-weight: 950;
}

.eq-door-cert {
  display: grid;
  gap: 12px;
}

.eq-base-fraction {
  border-radius: 18px;
  padding: 16px;
  background: rgba(92, 214, 255, 0.12);
  border: 1px solid rgba(92, 214, 255, 0.25);
  text-align: center;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.35;
}

.eq-toolbox {
  position: absolute;
  right: calc(var(--eq-shell-gap, 24px) + 12px);
  left: auto;
  top: 138px;
  z-index: 21;
  box-sizing: border-box;
  width: calc(var(--eq-side-panel-width, 390px) - 24px);
  max-width: calc(100% - var(--eq-shell-gap, 24px) * 2 - 24px);
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(8, 18, 32, 0.66);
  border: 1px solid rgba(135, 219, 255, 0.16);
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
}

.eq-toolbox-title {
  font-size: 11px;
  font-weight: 950;
  color: rgba(187, 234, 255, 0.84);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.eq-toolbox:not(.hidden) ~ .eq-panel {
  padding-top: 144px;
}

.eq-visual-card {
  position: absolute;
  box-sizing: border-box;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(700px, calc(100% - 24px));
  padding: 16px;
  border-radius: 22px;
  background: rgba(7, 17, 30, 0.83);
  border: 1px solid rgba(127, 210, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.eq-visual-title {
  font-size: 16px;
  font-weight: 950;
  margin-bottom: 12px;
  color: #c9f0ff;
}

.eq-visual-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
  margin: 9px 0;
}

.eq-visual-label {
  font-size: 18px;
  font-weight: 950;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.eq-visual-bar {
  display: grid;
  grid-template-columns: repeat(var(--eq-segment-count, 1), minmax(0, 1fr));
  gap: 2px;
  min-height: 28px;
  padding: 3px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  box-sizing: border-box;
}

.eq-visual-segment {
  min-width: 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.eq-visual-segment.filled {
  background: linear-gradient(180deg, #73dcff, #3a8fff);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 10px rgba(76, 171, 255, 0.16);
}

.eq-visual-note {
  margin-top: 10px;
  color: rgba(238,246,255,0.78);
  font-size: 14px;
  line-height: 1.55;
}

.eq-msg {
  min-height: 26px;
  margin-top: 12px !important;
  color: #ffd9d9 !important;
  font-weight: 850;
}

.eq-msg.success {
  color: #a7ffd1 !important;
}

.hidden {
  display: none !important;
}

/* =========================
   STAGE 1 FLOW REFINEMENTS
========================= */

body.stage1-ui-active {
  --eq-door-width: clamp(250px, calc(var(--eq-frame-width) * 0.2), 320px);
  --eq-action-panel-width: clamp(312px, calc(var(--eq-frame-width) * 0.24), 360px);
  --eq-question-width: clamp(520px, calc(var(--eq-frame-width) * 0.35), 560px);
  --eq-question-side-width: clamp(390px, calc(var(--eq-frame-width) * 0.29), 460px);
  --eq-question-left-width: clamp(390px, calc(var(--eq-frame-width) * 0.22), 420px);
  --eq-question-rail-gap: clamp(18px, calc(var(--eq-frame-width) * 0.021), 34px);
  --eq-question-panel-width: min(
    var(--eq-question-width),
    calc(
      var(--eq-frame-width)
      - var(--eq-question-side-width)
      - var(--eq-question-left-width)
      - (var(--eq-shell-gap, 24px) * 4)
      - (var(--eq-question-rail-gap) * 2)
    )
  );
  --eq-inventory-height: 44px;
  --eq-inventory-bottom: clamp(216px, calc(var(--eq-frame-height) * 0.22), 252px);
  --eq-inventory-width: 68px;
  --eq-inventory-slot-size: 44px;
  --eq-home-pill-width: 68px;
  --eq-home-door-gap: 24px;
  --eq-problem-panel-top: clamp(190px, calc(var(--eq-frame-height) * 0.213), 230px);
  --eq-problem-panel-height: clamp(390px, calc(var(--eq-frame-height) - var(--eq-problem-panel-top) - var(--eq-inventory-height) - 170px), 455px);
}

body.stage1-ui-active .eq-stage-screen {
  isolation: isolate;
}

body.stage1-ui-active .eq-mission {
  max-width: min(920px, calc(100% - var(--eq-door-width) - var(--eq-home-pill-width) - 180px));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.stage1-ui-active .eq-mission::before {
  content: "Stage 1";
  margin-right: 8px;
  text-transform: uppercase;
}

body.stage1-ui-active .eq-door-panel {
  top: 18px;
  right: calc(var(--eq-shell-gap, 24px) + var(--eq-home-pill-width) + var(--eq-home-door-gap));
  width: var(--eq-door-width);
  max-width: calc(100% - var(--eq-shell-gap, 24px) * 2 - var(--eq-home-pill-width) - var(--eq-home-door-gap));
  z-index: 24;
}

body.stage1-ui-active .eq-topbar-actions {
  position: relative;
  display: flex;
  align-self: flex-start;
  align-items: flex-start;
  z-index: 26;
  margin-left: auto;
}

body.stage1-ui-active .eq-topbar-actions button {
  min-width: var(--eq-home-pill-width);
}

body.stage1-ui-active .eq-topbar-actions #home-btn {
  position: static;
  inset: auto;
  top: auto;
  right: auto;
  z-index: auto !important;
  margin: 0;
  min-height: 41px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.stage1-ui-active .eq-error {
  display: none !important;
}

body.stage1-ui-active .eq-question-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(4, 10, 18, 0.58);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-bg {
  filter: brightness(0.88) saturate(0.92);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-vignette {
  background:
    radial-gradient(circle at 50% 40%, rgba(61, 157, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.34));
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"] .eq-object-layer,
body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-object-layer,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"] .eq-object-layer {
  inset: 92px calc(var(--eq-action-panel-width) + var(--eq-shell-gap, 24px) * 1.4) calc(var(--eq-inventory-height) + 46px) var(--eq-shell-gap, 24px);
}

body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-object-layer {
  z-index: 18;
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-stage-intro {
  z-index: 24;
  pointer-events: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-investigation-brief {
  pointer-events: auto;
}

body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-bg {
  filter: brightness(0.94) saturate(0.96);
}

body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-vignette {
  background:
    radial-gradient(circle at 36% 56%, rgba(82, 192, 255, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54));
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-mission,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-mission {
  max-width: min(360px, calc(100% - var(--eq-door-width) - var(--eq-home-pill-width) - 220px));
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-layer,
body.stage1-ui-active .eq-stage-screen[data-phase="learning"][data-object-kind="cards"] .eq-object-layer,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-layer {
  inset:
    430px
    var(--eq-shell-gap, 24px)
    calc(var(--eq-inventory-height) + 80px)
    calc(var(--eq-shell-gap, 24px) + var(--eq-inventory-width, 76px) + 26px);
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="bars"] .eq-object-layer {
  inset: 92px var(--eq-shell-gap, 24px) calc(var(--eq-inventory-height) + 46px) var(--eq-shell-gap, 24px);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-object-layer {
  inset: 92px var(--eq-shell-gap, 24px) calc(var(--eq-inventory-height) + 42px) var(--eq-shell-gap, 24px);
  opacity: 0.15;
  filter: blur(2px) saturate(0.74);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-layer {
  inset: 0;
  z-index: 30;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-object-layer .eq-fraction-card,
body.stage1-ui-active .eq-stage-screen[data-phase="learning"] .eq-object-layer .eq-fraction-card,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"] .eq-object-layer .eq-fraction-card {
  pointer-events: none;
}

body.stage1-ui-active .eq-fraction-card.selected {
  box-shadow:
    0 0 0 2px rgba(157, 228, 255, 0.26),
    0 0 32px rgba(89, 192, 255, 0.54),
    0 20px 32px rgba(0, 0, 0, 0.3);
}

body.stage1-ui-active .eq-fraction-card.correct-glow {
  background: linear-gradient(180deg, rgba(30, 137, 137, 0.94), rgba(18, 108, 121, 0.94));
  border-color: rgba(127, 255, 210, 0.94);
  box-shadow:
    0 0 0 2px rgba(127, 255, 210, 0.18),
    0 0 34px rgba(127, 255, 210, 0.6),
    0 18px 30px rgba(0, 0, 0, 0.24);
}

body.stage1-ui-active .eq-panel {
  box-sizing: border-box;
  overflow: hidden;
}

body.stage1-ui-active .eq-stage-screen[data-phase="learning"] .eq-object-panel {
  top: clamp(184px, calc(var(--eq-frame-height) * 0.22), 260px);
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(960px, calc(var(--eq-frame-width) * 0.66));
  max-height: 520px;
  min-height: 0;
  padding: 14px 18px;
  border-radius: 18px;
  z-index: 28;
  transform: translateX(-50%);
  background: rgba(5, 15, 28, 0.88);
  border: 1px solid rgba(100, 200, 255, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body.stage1-ui-active .eq-stage-screen[data-phase="learning"] .eq-object-panel h3,
body.stage1-ui-active .eq-stage-screen[data-phase="learning"] #stage-desc {
  display: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="learning"] .eq-object-panel .eq-panel-kicker {
  margin-bottom: 9px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.1;
}

body.stage1-ui-active .eq-stage-screen[data-phase="learning"] .eq-object-panel .eq-interaction {
  margin-top: 0;
  padding: 0;
  overflow: visible;
}

body.stage1-ui-active .eq-learning-visual {
  display: grid;
  gap: 8px;
}

body.stage1-ui-active .eq-learning-visual-board {
  padding: 2px 0 0;
}

body.stage1-ui-active .vertical-fraction-area {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(26px, calc(var(--eq-frame-width) * 0.03), 54px);
}

body.stage1-ui-active .vertical-fraction-area.single {
  gap: 0;
}

body.stage1-ui-active .vertical-fraction-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

body.stage1-ui-active .vertical-fraction-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  color: #f5fbff;
  font-size: 26px;
  font-weight: 950;
}

body.stage1-ui-active .vertical-fraction-bar {
  display: grid;
  grid-template-rows: repeat(var(--eq-learning-segment-count, 1), minmax(0, 1fr));
  width: clamp(92px, calc(var(--eq-frame-width) * 0.068), 128px);
  height: clamp(154px, calc(var(--eq-frame-height) * 0.18), 194px);
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  border: 2px solid rgba(230, 245, 255, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.28),
    0 12px 22px rgba(0, 0, 0, 0.2);
}

body.stage1-ui-active .vertical-fraction-cell {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-bottom: 1px dashed rgba(230, 245, 255, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

body.stage1-ui-active .vertical-fraction-cell:last-child {
  border-bottom: 0;
}

body.stage1-ui-active .vertical-fraction-cell.filled {
  background: linear-gradient(180deg, rgba(91, 190, 255, 0.96), rgba(53, 145, 235, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

body.stage1-ui-active .eq-learning-cell-btn {
  cursor: pointer;
  transition: background 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

body.stage1-ui-active .eq-learning-cell-btn:hover,
body.stage1-ui-active .eq-learning-cell-btn:focus-visible {
  filter: brightness(1.15);
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(196, 236, 255, 0.42);
}

body.stage1-ui-active .eq-learning-note {
  margin-top: 0;
  color: rgba(230, 242, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

body.stage1-ui-active .eq-learning-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}

body.stage1-ui-active .eq-reason-panel {
  gap: 10px;
}

body.stage1-ui-active .eq-reason-question {
  color: #f6fbff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.35;
  text-align: center;
}

body.stage1-ui-active .eq-reason-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.stage1-ui-active .eq-reason-choice {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(166, 217, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #eef8ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

body.stage1-ui-active .eq-reason-choice:hover,
body.stage1-ui-active .eq-reason-choice:focus-visible {
  outline: none;
  border-color: rgba(157, 221, 255, 0.56);
  background: rgba(89, 168, 234, 0.18);
}

body.stage1-ui-active .eq-reason-choice.correct {
  border-color: rgba(126, 255, 182, 0.72);
  background: rgba(57, 183, 109, 0.24);
}

body.stage1-ui-active .eq-reason-choice.wrong {
  border-color: rgba(255, 150, 150, 0.7);
  background: rgba(202, 72, 72, 0.23);
}

body.stage1-ui-active .eq-numberline-panel,
body.stage1-ui-active .eq-circle-panel,
body.stage1-ui-active .eq-rule-panel {
  gap: 12px;
}

body.stage1-ui-active .eq-numberline-board {
  position: relative;
  display: grid;
  gap: 44px;
  padding: 20px 54px 24px;
}

body.stage1-ui-active .eq-numberline-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 22px;
}

body.stage1-ui-active .eq-numberline-label {
  display: flex;
  justify-content: center;
  color: #f5fbff;
  font-size: 28px;
  font-weight: 950;
}

body.stage1-ui-active .eq-numberline-track {
  position: relative;
  height: 78px;
}

body.stage1-ui-active .eq-numberline-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  height: 4px;
  border-radius: 999px;
  background: rgba(220, 242, 255, 0.78);
}

body.stage1-ui-active .eq-numberline-tick {
  position: absolute;
  top: 0;
  width: 58px;
  height: 76px;
  transform: translateX(-50%);
}

body.stage1-ui-active button.eq-numberline-tick {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

body.stage1-ui-active .eq-numberline-tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 2px;
  height: 30px;
  background: rgba(220, 242, 255, 0.82);
  transform: translateX(-50%);
}

body.stage1-ui-active .eq-numberline-dot {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(173, 226, 255, 0.72);
  background: rgba(7, 18, 32, 0.96);
  transform: translate(-50%, -50%);
  z-index: 2;
}

body.stage1-ui-active .eq-numberline-dot.selected {
  background: #54c7ff;
  animation: eq-point-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(84, 199, 255, 0.64);
}

body.stage1-ui-active button.eq-numberline-tick:hover .eq-numberline-dot,
body.stage1-ui-active button.eq-numberline-tick:focus-visible .eq-numberline-dot {
  border-color: rgba(214, 245, 255, 0.98);
  box-shadow: 0 0 16px rgba(104, 216, 255, 0.54);
}

body.stage1-ui-active .eq-numberline-tick-label {
  position: absolute;
  left: 50%;
  top: 54px;
  color: rgba(235, 248, 255, 0.82);
  font-size: 14px;
  font-weight: 900;
  transform: translateX(-50%);
}

body.stage1-ui-active .eq-numberline-guide {
  position: absolute;
  left: calc(50% + 59px);
  top: 42px;
  width: 2px;
  height: 120px;
  opacity: 0;
  color: #b8f4ff;
  font-size: 12px;
  font-weight: 950;
  background: repeating-linear-gradient(180deg, rgba(102, 221, 255, 0.95) 0 9px, transparent 9px 17px);
  transition: opacity 0.18s ease;
}

body.stage1-ui-active .eq-numberline-guide.visible {
  opacity: 1;
}

body.stage1-ui-active .eq-numberline-guide span {
  position: absolute;
  left: 12px;
  top: 48px;
  width: 76px;
  color: #b8f4ff;
  font-size: 13px;
  font-weight: 950;
}

@keyframes eq-point-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.12); }
}

body.stage1-ui-active .eq-circle-board,
body.stage1-ui-active .eq-circle-visual-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(34px, calc(var(--eq-frame-width) * 0.035), 68px);
}

body.stage1-ui-active .eq-circle-fraction-card {
  display: grid;
  justify-items: center;
  gap: 8px;
}

body.stage1-ui-active .eq-circle-model {
  width: 150px;
  height: 150px;
  overflow: visible;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.28));
}

body.stage1-ui-active .eq-circle-slice {
  fill: rgba(255, 255, 255, 0.075);
  stroke: rgba(235, 248, 255, 0.9);
  stroke-width: 1.7;
}

body.stage1-ui-active .eq-circle-slice.filled {
  fill: rgba(82, 185, 255, 0.95);
}

body.stage1-ui-active .eq-circle-slice-btn {
  cursor: pointer;
  transition: fill 0.16s ease, filter 0.16s ease;
}

body.stage1-ui-active .eq-circle-slice-btn:hover,
body.stage1-ui-active .eq-circle-slice-btn:focus-visible {
  fill: rgba(122, 214, 255, 0.5);
  filter: drop-shadow(0 0 5px rgba(120, 220, 255, 0.9));
  outline: none;
}

body.stage1-ui-active .eq-circle-label {
  color: #f5fbff;
  font-size: 24px;
  font-weight: 950;
}

body.stage1-ui-active .eq-rule-panel {
  gap: 14px;
}

body.stage1-ui-active .eq-rule-formula-list,
body.stage1-ui-active .eq-rule-answer-list {
  display: grid;
  gap: 12px;
}

body.stage1-ui-active .eq-rule-formula,
body.stage1-ui-active .eq-rule-answer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  color: #f4fbff;
  font-size: 24px;
  font-weight: 900;
}

body.stage1-ui-active .eq-rule-operation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 82px;
  color: #f4fbff;
  font-size: 34px;
  font-weight: 950;
}

body.stage1-ui-active .eq-rule-source-fraction {
  position: relative;
  font-size: 34px;
}

body.stage1-ui-active .eq-op-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 9px;
  color: #071522;
  background: #ffe17d;
  font-size: 18px;
  font-weight: 950;
  vertical-align: middle;
  animation: eq-op-flash 1.9s ease-in-out infinite;
}

body.stage1-ui-active .eq-rule-operation-row.divide .eq-op-badge {
  background: #9ee7ff;
}

body.stage1-ui-active .eq-rule-arrow {
  color: #91ddff;
  animation: eq-arrow-slide 1.9s ease-in-out infinite;
}

body.stage1-ui-active .eq-rule-result {
  opacity: 0;
  animation: eq-result-appear 0.7s ease 0.45s forwards;
}

@keyframes eq-op-flash {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.2); transform: scale(1.06); }
}

@keyframes eq-arrow-slide {
  0%, 100% { transform: translateX(0); opacity: 0.75; }
  50% { transform: translateX(6px); opacity: 1; }
}

@keyframes eq-result-appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

body.stage1-ui-active .eq-rule-prefix {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.stage1-ui-active .eq-rule-input-fraction .fraction-input {
  width: 64px;
  height: 38px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 28px;
  font-weight: 800;
}

body.stage1-ui-active .eq-numberline-visual-list {
  display: grid;
  gap: 10px;
  padding: 0 24px;
}

body.stage1-ui-active .eq-stage-screen[data-phase="learning"] #learning-action-btn {
  align-self: flex-end;
  flex: 0 0 auto;
  margin-top: 0;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 16px;
  font-size: 13px;
}

body.stage1-ui-active .eq-stage-screen[data-phase="learning"] #learning-overlay-btn {
  align-self: flex-end;
  flex: 0 0 auto;
  margin-top: 0;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 16px;
  font-size: 13px;
}

body.stage1-ui-active .eq-overlay-bars {
  display: flex;
}

body.stage1-ui-active .eq-overlay-bars.active {
  position: relative;
  min-height: 166px;
}

body.stage1-ui-active .eq-overlay-bars.active .vertical-fraction-card {
  opacity: 0.84;
}

body.stage1-ui-active .eq-overlay-bars.active .vertical-fraction-card + .vertical-fraction-card {
  margin-left: calc(clamp(76px, calc(var(--eq-frame-width) * 0.06), 104px) * -0.72);
  transform: none;
}

body.stage1-ui-active .eq-overlay-bars.active .vertical-fraction-bar {
  mix-blend-mode: screen;
  border-color: rgba(165, 225, 255, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    0 0 30px rgba(95, 191, 255, 0.26),
    0 12px 22px rgba(0, 0, 0, 0.2);
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel {
  top: clamp(112px, calc(var(--eq-frame-height) * 0.12), 140px);
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(680px, calc(100% - var(--eq-shell-gap, 24px) * 2 - 220px));
  min-height: 0;
  padding: 20px 24px 16px;
  border-radius: 26px;
  z-index: 28;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(8, 18, 32, 0.94), rgba(5, 13, 25, 0.92));
  border-color: rgba(118, 207, 255, 0.26);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(117, 211, 255, 0.07) inset;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel h3,
body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] #stage-desc,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel h3,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] #stage-desc {
  display: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel .eq-panel-kicker,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel .eq-panel-kicker {
  margin-bottom: 12px;
  padding: 0;
  text-align: left;
  color: #f1f8ff;
  background: transparent;
  border-radius: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel .eq-panel-kicker:empty,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel .eq-panel-kicker:empty {
  display: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel .eq-interaction,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel .eq-interaction {
  margin-top: 0;
  flex: 0 0 auto;
  overflow: visible;
  padding: 0;
  padding-right: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel .eq-prompt,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel .eq-prompt {
  margin: 0;
  font-size: 17px;
  line-height: 1.58;
  text-align: center;
}

body.stage1-ui-active .eq-object-problem-text {
  margin: 0;
  color: #f4f8ff;
  font-size: clamp(22px, calc(var(--eq-frame-width) * 0.0135), 28px);
  font-weight: 950;
  line-height: 1.42;
  letter-spacing: -0.04em;
}

body.stage1-ui-active .eq-object-problem-text .eq-fraction-inline {
  margin: 0 0.12em;
  font-size: 1.08em;
}

body.stage1-ui-active .eq-object-problem-guide {
  margin-top: 8px;
  color: rgba(225, 239, 250, 0.76);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

body.stage1-ui-active .eq-object-selection-count {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #bfeaff;
  background: rgba(83, 170, 232, 0.12);
  border: 1px solid rgba(132, 214, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-panel .eq-panel-footer,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-object-panel .eq-panel-footer {
  display: none;
}

body.stage1-ui-active .eq-object-mission-base {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(20, 37, 58, 0.68);
  border: 1px solid rgba(120, 205, 255, 0.14);
}

body.stage1-ui-active .eq-object-mission-base-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #9edcff;
}

body.stage1-ui-active .eq-object-mission-base-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

body.stage1-ui-active .eq-object-base-fraction {
  font-size: 33px;
  font-weight: 950;
  min-width: 2.4em;
}

body.stage1-ui-active .eq-object-action-bar {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  transform: none;
  pointer-events: auto;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-object-action-bar {
  display: flex;
}

body.stage1-ui-active .eq-object-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, calc(var(--eq-frame-width) * 0.0105), 20px);
  width: 100%;
  flex-wrap: nowrap;
}

body.stage1-ui-active .eq-object-action-bar .eq-main-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, calc(var(--eq-frame-width) * 0.0063), 12px);
  width: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

body.stage1-ui-active .eq-object-action-bar .eq-secondary-btn,
body.stage1-ui-active .eq-object-action-bar .eq-primary-btn {
  flex: 0 0 auto;
  width: clamp(112px, calc(var(--eq-frame-width) * 0.0646), 124px);
  min-width: 0;
  min-height: clamp(38px, calc(var(--eq-frame-width) * 0.0208), 40px);
  padding: 9px 18px;
  border-radius: 16px;
  font-size: clamp(13px, calc(var(--eq-frame-width) * 0.0078), 15px);
}

body.stage1-ui-active .eq-object-action-bar .eq-msg {
  min-height: 18px;
  margin: 0;
  text-align: center;
}

body.stage1-ui-active .eq-fraction-card.base-card {
  border-color: rgba(153, 228, 255, 0.48);
  box-shadow:
    0 0 0 1px rgba(153, 228, 255, 0.16),
    0 18px 28px rgba(0,0,0,0.24),
    0 0 20px rgba(74, 174, 255, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

body.stage1-ui-active .eq-card-badge {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 25, 43, 0.96);
  border: 1px solid rgba(132, 214, 255, 0.34);
  color: #bfe8ff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="bars"] .eq-object-panel {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(760px, calc(100% - var(--eq-shell-gap, 24px) * 2));
  max-height: min(calc(var(--eq-frame-height) * 0.62), 580px);
  z-index: 25;
  transform: translate(-50%, -46%);
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="bars"] .eq-object-panel .eq-interaction {
  overflow: auto;
}

body.stage1-ui-active .eq-stage-screen[data-phase="bridge"] .eq-object-panel,
body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-object-panel,
body.stage1-ui-active .eq-stage-screen[data-phase="investigate"] .eq-object-panel,
body.stage1-ui-active .eq-stage-screen[data-phase="intro"] .eq-object-panel {
  display: none !important;
}

body.stage1-ui-active .eq-question-panel {
  left: 50%;
  top: var(--eq-problem-panel-top);
  right: auto;
  bottom: auto;
  width: var(--eq-question-panel-width);
  height: var(--eq-problem-panel-height);
  max-height: none;
  min-height: var(--eq-problem-panel-height);
  padding: 14px 16px 12px;
  border-radius: 24px;
  overflow: visible;
  transform: translate(-50%, 10px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  z-index: 31;
  background:
    linear-gradient(180deg, rgba(11, 20, 34, 0.98) 0%, rgba(6, 13, 24, 0.99) 100%);
  border: 1px solid rgba(114, 200, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(98, 200, 255, 0.08),
    0 0 18px rgba(58, 168, 255, 0.14),
    0 22px 56px rgba(0, 0, 0, 0.48);
  transition: opacity 0.22s ease, transform 0.22s ease;
  justify-content: flex-start;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-question-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

body.stage1-ui-active .eq-stage-screen:not([data-phase="question"]) .eq-question-panel {
  display: none !important;
}

body.stage1-ui-active .eq-toolbox:not(.hidden) ~ .eq-question-panel {
  padding-top: 16px;
}

body.stage1-ui-active .eq-toolbox:not(.hidden) ~ .eq-object-panel {
  padding-top: 18px;
}

body.stage1-ui-active .eq-question-panel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 9px;
  width: 62px;
  height: 6px;
  border-radius: 999px;
  background: rgba(175, 219, 255, 0.12);
  transform: translateX(-50%);
}

body.stage1-ui-active .eq-question-panel .eq-panel-kicker {
  margin-bottom: 8px;
  padding: 5px 10px;
  background: rgba(76, 123, 170, 0.22);
  color: #b7e7ff;
  font-size: 11px;
}

body.stage1-ui-active .eq-question-panel h3 {
  margin-bottom: 8px;
  font-size: clamp(17px, calc(var(--eq-frame-width) * 0.0116), 21px);
  line-height: 1.32;
  letter-spacing: -0.02em;
}

body.stage1-ui-active .eq-question-panel .eq-interaction {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(16, 27, 44, 0.76) 0%, rgba(11, 21, 36, 0.7) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -12px 24px rgba(0, 0, 0, 0.12);
  padding-right: 12px;
}

body.stage1-ui-active .eq-question-panel .eq-interaction::-webkit-scrollbar {
  width: 6px;
}

body.stage1-ui-active .eq-question-panel .eq-interaction::-webkit-scrollbar-thumb {
  background: rgba(109, 170, 219, 0.44);
}

body.stage1-ui-active .eq-question-panel .eq-panel-footer {
  margin-top: 10px;
  padding-top: 10px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.stage1-ui-active .eq-question-panel .eq-main-actions {
  width: auto;
  flex: 0 0 auto;
  gap: 8px;
}

body.stage1-ui-active .eq-question-panel .eq-main-actions {
  justify-content: center;
}

body.stage1-ui-active .eq-question-panel .eq-main-actions > * {
  flex: 0 0 auto;
  min-width: 92px;
}

body.stage1-ui-active .eq-question-panel .eq-primary-btn,
body.stage1-ui-active .eq-question-panel .eq-secondary-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 15px;
  font-size: 13px;
}

body.stage1-ui-active .eq-question-panel .eq-secondary-btn {
  background: rgba(24, 40, 62, 0.96);
  border: 1px solid rgba(133, 198, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.stage1-ui-active .eq-question-panel .eq-primary-btn {
  background: linear-gradient(180deg, #418dff, #2c6ae6);
  box-shadow:
    0 10px 24px rgba(13, 34, 66, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.stage1-ui-active .eq-question-panel .eq-prompt {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 900;
  color: rgba(238, 249, 255, 0.96);
}

body.stage1-ui-active .eq-question-reference {
  width: min(280px, 100%);
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 24, 42, 0.72);
  border: 1px solid rgba(126, 213, 255, 0.24);
  box-shadow: inset 0 0 18px rgba(94, 210, 255, 0.06);
  display: grid;
  justify-items: center;
  gap: 8px;
}

body.stage1-ui-active .eq-question-reference-label {
  color: rgba(159, 226, 255, 0.74);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

body.stage1-ui-active .eq-question-reference-fraction {
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

body.stage1-ui-active .eq-question-reference-bar {
  display: grid;
  grid-template-columns: repeat(var(--denominator), 1fr);
  width: 180px;
  height: 24px;
  border: 2px solid rgba(230, 250, 255, 0.78);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
}

body.stage1-ui-active .eq-question-reference-bar span {
  display: block;
  border-right: 1px solid rgba(230, 250, 255, 0.25);
}

body.stage1-ui-active .eq-question-reference-bar span:last-child {
  border-right: 0;
}

body.stage1-ui-active .eq-question-reference-bar span.filled {
  background: linear-gradient(180deg, rgba(125, 230, 255, 0.94), rgba(48, 160, 235, 0.88));
}

body.stage1-ui-active .eq-question-panel .eq-mini-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.stage1-ui-active .eq-question-panel .eq-mini-card {
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 17px;
  background:
    linear-gradient(180deg, rgba(22, 35, 55, 0.96) 0%, rgba(15, 27, 45, 0.96) 100%);
  border-color: rgba(125, 176, 214, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

body.stage1-ui-active .eq-question-panel .eq-mini-card.selected {
  background:
    linear-gradient(180deg, rgba(42, 104, 176, 0.98) 0%, rgba(27, 73, 132, 0.98) 100%);
  border-color: rgba(149, 226, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(149, 226, 255, 0.18),
    0 0 16px rgba(86, 178, 255, 0.24);
}

body.stage1-ui-active .eq-question-panel .eq-fill-grid {
  gap: 18px;
  margin-top: 18px;
}

body.stage1-ui-active .eq-question-panel .eq-fill-row {
  gap: 16px;
  font-size: 22px;
}

body.stage1-ui-active .eq-question-panel .fraction-equation .math-fraction {
  min-width: 58px;
}

body.stage1-ui-active .eq-question-panel .fraction-equation .fraction-numerator,
body.stage1-ui-active .eq-question-panel .fraction-equation .fraction-denominator {
  font-size: 22px;
  font-weight: 900;
  color: #f4fbff;
  line-height: var(--fraction-number-line-height);
}

body.stage1-ui-active .eq-question-panel .fraction-equation .fraction-line {
  width: 100%;
  min-width: 42px;
  height: 2px;
  margin: var(--fraction-line-gap) 0;
}

body.stage1-ui-active .eq-question-panel .fraction-equation .input-fraction {
  min-width: 76px;
}

body.stage1-ui-active .eq-question-panel .fraction-equation .numerator-input {
  width: 58px;
  height: 34px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 22px;
}

body.stage1-ui-active .eq-question-panel .eq-msg {
  min-height: 16px;
  margin-top: 6px !important;
  font-size: 12px;
  line-height: 1.35;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-toolbox {
  z-index: 39;
  opacity: 0.72;
  transform: translateY(-50%);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-toolbox:hover,
body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-toolbox:focus-within {
  opacity: 0.92;
  transform: translateY(-50%);
}

body.stage1-ui-active .eq-toolbox {
  left: 36px;
  right: auto;
  top: 50%;
  bottom: auto;
  box-sizing: content-box;
  width: var(--eq-inventory-width);
  max-width: none;
  padding: 6px 5px;
  border-radius: 17px;
  transform: translateY(-50%);
  z-index: 39;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(54, 38, 24, 0.94) 0%, rgba(23, 16, 12, 0.98) 100%);
  border: 1px solid rgba(255, 225, 188, 0.12);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 245, 223, 0.06),
    inset 0 -10px 24px rgba(0, 0, 0, 0.18);
}

body.stage1-ui-active .eq-support-actions {
  /* 위치·정렬: ui.css support dock 공통 규칙 */
  flex-direction: row;
}

body.stage1-ui-active .eq-support-actions.hidden {
  display: none;
}

body.stage1-ui-active .eq-support-actions .eq-help-btn {
  width: clamp(86px, calc(var(--eq-frame-width) * 0.05), 100px);
  height: clamp(44px, calc(var(--eq-frame-height) * 0.045), 52px);
  min-height: 0;
  padding: 0 14px;
  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),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 15px;
  font-weight: 950;
}

body.stage1-ui-active .eq-support-actions .eq-help-btn:hover,
body.stage1-ui-active .eq-support-actions .eq-help-btn:focus-visible {
  filter: brightness(1.12);
  border-color: rgba(154, 240, 255, 0.8);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(72, 210, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.stage1-ui-active .eq-stage-screen[data-phase="bridge"] .eq-toolbox {
  opacity: 0.72;
  pointer-events: auto;
}

body.stage1-ui-active .eq-toolbox-title {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0 0 7px;
  overflow: visible;
  clip: auto;
  color: #eafcff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 12px rgba(112, 232, 255, 0.48);
  white-space: nowrap;
}

body.stage1-ui-active .eq-tool-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

body.stage1-ui-active .eq-tool-slot {
  position: relative;
  box-sizing: content-box;
  width: var(--eq-inventory-slot-size);
  min-width: var(--eq-inventory-slot-size);
  min-height: var(--eq-inventory-slot-size);
  height: var(--eq-inventory-slot-size);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 13px;
  color: #eef6ff;
  background:
    linear-gradient(180deg, rgba(28, 38, 55, 0.96) 0%, rgba(11, 17, 28, 0.98) 100%);
  border: 1px solid rgba(139, 173, 206, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 18px rgba(0, 0, 0, 0.2);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease,
    filter 0.18s ease;
}

body.stage1-ui-active .eq-tool-slot.available {
  color: #f4fbff;
  background:
    linear-gradient(180deg, rgba(25, 56, 95, 0.98) 0%, rgba(11, 29, 52, 0.98) 100%);
  border-color: rgba(104, 205, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(88, 185, 255, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -8px 16px rgba(5, 19, 39, 0.42);
}

body.stage1-ui-active .eq-tool-slot.locked,
body.stage1-ui-active .eq-tool-slot[aria-disabled="true"] {
  color: rgba(214, 222, 232, 0.34);
  background:
    linear-gradient(180deg, rgba(13, 17, 24, 0.98) 0%, rgba(6, 9, 15, 0.99) 100%);
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 8px 14px rgba(0, 0, 0, 0.18);
  filter: saturate(0.4) brightness(0.8);
  opacity: 0.92;
  cursor: not-allowed;
  pointer-events: auto;
}

body.stage1-ui-active .eq-tool-slot.locked::after {
  content: "잠김";
  position: absolute;
  right: 4px;
  top: 4px;
  width: auto;
  height: auto;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(238, 244, 255, 0.48);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  transform: none;
}

body.stage1-ui-active .eq-tool-slot.available .eq-tool-icon {
  filter: drop-shadow(0 0 8px rgba(132, 222, 255, 0.22));
}

body.stage1-ui-active .eq-tool-slot.locked::after {
  content: "LOCK";
}

body.stage1-ui-active .eq-tool-slot.new {
  color: #ffffff;
  border-color: rgba(136, 237, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(122, 230, 255, 0.34),
    0 0 22px rgba(73, 211, 255, 0.82),
    0 12px 22px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: toolPulse 1.05s ease-in-out infinite;
}

body.stage1-ui-active .eq-tool-slot.locked .eq-tool-icon {
  opacity: 0.5;
}

body.stage1-ui-active .eq-tool-slot.active {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(28, 101, 164, 0.99) 0%, rgba(14, 55, 98, 0.99) 100%);
  border-color: rgba(133, 232, 255, 0.84);
  box-shadow:
    0 0 0 1px rgba(133, 232, 255, 0.26),
    0 0 20px rgba(83, 196, 255, 0.34),
    0 12px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.stage1-ui-active .eq-tool-slot.selected {
  outline: 2px solid rgba(175, 244, 255, 0.28);
  outline-offset: 3px;
}

body.stage1-ui-active .eq-tool-slot.dragging {
  opacity: 0.62;
  transform: scale(0.96);
}

body.stage1-ui-active .eq-tool-slot.recommended {
  opacity: 1;
  border-color: rgba(90, 200, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(90, 200, 255, 0.22),
    0 0 16px rgba(90, 200, 255, 0.75),
    0 12px 20px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: toolPulse 1.2s ease-in-out infinite;
}

@keyframes toolPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(90, 200, 255, 0.2),
      0 0 10px rgba(90, 200, 255, 0.45),
      0 12px 20px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 1px rgba(90, 200, 255, 0.35),
      0 0 22px rgba(90, 200, 255, 0.9),
      0 14px 22px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }
}

body.stage1-ui-active .eq-tool-slot .eq-tool-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.stage1-ui-active .eq-tool-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  color: currentColor;
}

body.stage1-ui-active .eq-tool-icon-bars {
  gap: 4px;
  align-items: flex-end;
}

body.stage1-ui-active .eq-tool-icon-bars span {
  display: block;
  width: 5px;
  border-radius: 4px 4px 1px 1px;
  background: currentColor;
}

body.stage1-ui-active .eq-tool-icon-bars span:nth-child(1) { height: 10px; }
body.stage1-ui-active .eq-tool-icon-bars span:nth-child(2) { height: 15px; }
body.stage1-ui-active .eq-tool-icon-bars span:nth-child(3) { height: 12px; }

body.stage1-ui-active .eq-tool-icon-circle span {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

body.stage1-ui-active .eq-tool-icon-reduce {
  flex-direction: column;
  gap: 4px;
}

body.stage1-ui-active .eq-tool-icon-reduce span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

body.stage1-ui-active .eq-tool-icon-reduce span:first-child {
  width: 22px;
}

body.stage1-ui-active .eq-tool-icon-reduce span:nth-child(2) {
  width: 12px;
}

body.stage1-ui-active .eq-tool-icon-reduce i {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

body.stage1-ui-active .eq-tool-icon-common span {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

body.stage1-ui-active .eq-tool-icon-common span:first-child {
  left: 2px;
  top: 2px;
}

body.stage1-ui-active .eq-tool-icon-common span:last-child {
  right: 2px;
  bottom: 2px;
  background: rgba(126, 230, 255, 0.12);
}

body.stage1-ui-active .eq-tool-icon-operation span {
  width: 20px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

body.stage1-ui-active .eq-tool-icon-operation span::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

body.stage1-ui-active .eq-tool-icon-sub span::before {
  content: "−";
}

body.stage1-ui-active .eq-tool-icon-line span:first-child {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

body.stage1-ui-active .eq-tool-icon-line span:last-child {
  position: absolute;
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
}

body.stage1-ui-active .eq-tool-icon-film {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 1px;
  width: 24px;
  height: 24px;
  padding: 2px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: rgba(170, 240, 255, 0.08);
}

body.stage1-ui-active .eq-tool-icon-film span {
  display: block;
  min-width: 0;
  min-height: 0;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.32;
}

body.stage1-ui-active .eq-tool-icon-ratio {
  width: 24px;
  height: 24px;
}

body.stage1-ui-active .eq-tool-icon-ratio span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

body.stage1-ui-active .eq-tool-icon-ratio span:first-child {
  left: 2px;
  top: 2px;
}

body.stage1-ui-active .eq-tool-icon-ratio span:nth-child(2) {
  right: 2px;
  bottom: 2px;
}

body.stage1-ui-active .eq-tool-icon-ratio i {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-35deg);
}

body.stage1-ui-active .eq-tool-tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  bottom: auto;
  width: 188px;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(7, 17, 30, 0.97);
  border: 1px solid rgba(126, 210, 255, 0.22);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
  color: #eef6ff;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translate(8px, -50%);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  pointer-events: none;
}

body.stage1-ui-active .eq-tool-slot:hover .eq-tool-tooltip,
body.stage1-ui-active .eq-tool-slot:focus-visible .eq-tool-tooltip,
body.stage1-ui-active .eq-tool-slot.locked-tip-active .eq-tool-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

body.stage1-ui-active .eq-tool-tip-line {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #eef6ff;
}

body.stage1-ui-active .eq-tool-input-panel,
body.stage1-ui-active .eq-tool-analysis-panel {
  position: absolute;
  z-index: 72;
  width: min(320px, calc(100% - 32px));
  max-width: 420px;
  padding: 6px 8px 8px;
  border-radius: 14px;
  color: #ecfbff;
  background:
    radial-gradient(circle at 18% 0%, rgba(88, 220, 255, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(8, 26, 47, 0.88), rgba(2, 9, 20, 0.96));
  border: 1px solid rgba(126, 232, 255, 0.34);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(64, 211, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 28px rgba(78, 213, 255, 0.055);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

body.stage1-ui-active .eq-tool-input-panel {
  left: calc(36px + var(--eq-inventory-width, 68px) + 16px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: min(350px, calc(100% - 156px));
  max-width: 350px;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.stage1-ui-active .eq-tool-input-panel.is-compare {
  width: min(360px, calc(100% - 156px));
  max-width: 360px;
  max-height: none;
}

body.stage1-ui-active .eq-tool-panel-head {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 0;
}

body.stage1-ui-active .eq-tool-panel-kicker {
  display: none;
}

body.stage1-ui-active .eq-tool-panel-title-wrap {
  padding: 0 24px 4px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(126, 232, 255, 0.16);
}

body.stage1-ui-active .eq-tool-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.stage1-ui-active .eq-tool-panel-title-wrap strong {
  display: block;
  color: #f2fdff;
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

body.stage1-ui-active .eq-tool-panel-title-wrap p {
  margin: 2px 0 0;
  color: rgba(218, 244, 255, 0.72);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.3;
}

body.stage1-ui-active .eq-tool-panel-description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.stage1-ui-active .eq-tool-panel-close {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(160, 230, 255, 0.18);
  border-radius: 50%;
  color: rgba(234, 253, 255, 0.74);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

body.stage1-ui-active .eq-tool-panel-close:hover,
body.stage1-ui-active .eq-tool-panel-close:focus-visible {
  color: #ffffff;
  border-color: rgba(160, 230, 255, 0.48);
  background: rgba(108, 224, 255, 0.12);
  box-shadow: 0 0 12px rgba(80, 220, 255, 0.22);
}

body.stage1-ui-active .eq-tool-mode-tabs {
  display: flex;
  width: max-content;
  max-width: max-content;
  flex: 0 0 auto;
  gap: 2px;
  margin: 0;
  padding: 2px;
  border-radius: 999px;
  background: rgba(3, 18, 32, 0.72);
  border: 1px solid rgba(110, 220, 255, 0.28);
}

body.stage1-ui-active .eq-tool-mode-tab {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: rgba(220, 245, 255, 0.68);
  background: transparent;
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
}

body.stage1-ui-active .eq-tool-mode-tab.active {
  color: #041522;
  background: linear-gradient(180deg, rgba(120, 235, 255, 0.95), rgba(45, 150, 225, 0.86));
  box-shadow: 0 0 14px rgba(80, 220, 255, 0.34);
}

body.stage1-ui-active .eq-tool-mode-section.hidden {
  display: none;
}

body.stage1-ui-active .eq-tool-compare-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  column-gap: 8px;
  row-gap: 5px;
  align-items: center;
}

body.stage1-ui-active .eq-tool-compare-slot {
  min-height: 66px;
  padding: 4px 5px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(7, 28, 51, 0.56), rgba(3, 14, 27, 0.66));
  border: 1px solid rgba(126, 232, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

body.stage1-ui-active .eq-tool-compare-slot strong {
  display: none;
  margin-bottom: 4px;
  color: rgba(235, 252, 255, 0.9);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

body.stage1-ui-active .eq-tool-panel-compare {
  width: 88px;
  height: 26px;
  margin: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(146, 239, 255, 0.56);
  border-radius: 8px;
  color: #03182a;
  background:
    linear-gradient(180deg, rgba(177, 250, 255, 0.98), rgba(57, 191, 255, 0.96));
  box-shadow:
    0 0 18px rgba(80, 220, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

body.stage1-ui-active .eq-tool-compare-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

body.stage1-ui-active .eq-tool-compare-actions .eq-tool-panel-compare {
  grid-column: 2;
  justify-self: center;
}

body.stage1-ui-active .eq-tool-compare-actions .eq-tool-result-view-tabs-inline {
  grid-column: 3;
  justify-self: start;
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  margin: 2px auto;
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input-caption {
  color: rgba(218, 244, 255, 0.58);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input {
  width: 44px;
  height: 26px;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid rgba(110, 220, 255, 0.7);
  border-radius: 7px;
  outline: none;
  color: #eafcff;
  background: rgba(3, 15, 28, 0.92);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
  appearance: textfield;
  -moz-appearance: textfield;
  text-align-last: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input::placeholder {
  color: rgba(218, 244, 255, 0.48);
  font-size: 11px;
  font-weight: 760;
  text-align: center;
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input:focus {
  border-color: rgba(120, 240, 255, 1);
  box-shadow: 0 0 14px rgba(80, 220, 255, 0.45);
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input::-webkit-outer-spin-button,
body.stage1-ui-active .eq-tool-input-panel .fraction-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

body.stage1-ui-active .eq-tool-input-panel .fraction-input-line {
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: rgba(230, 250, 255, 0.92);
  box-shadow: 0 0 10px rgba(120, 230, 255, 0.35);
}

body.stage1-ui-active .eq-tool-panel-submit {
  width: 104px;
  height: 30px;
  margin: 5px auto 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(146, 239, 255, 0.56);
  border-radius: 8px;
  color: #03182a;
  background:
    linear-gradient(180deg, rgba(177, 250, 255, 0.98), rgba(57, 191, 255, 0.96));
  box-shadow:
    0 0 18px rgba(80, 220, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

body.stage1-ui-active .eq-tool-panel-error {
  min-height: 12px;
  margin-top: 2px;
  color: #ffb4c0;
  font-size: 11px;
  font-weight: 850;
}

body.stage1-ui-active .eq-tool-panel-preview {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 50px;
  margin-top: 2px;
  padding: 5px 7px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(84, 218, 255, 0.09), transparent 64%),
    rgba(2, 12, 24, 0.58);
  border: 1px solid rgba(120, 230, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.stage1-ui-active .eq-tool-input-panel.is-compare .eq-tool-panel-preview {
  height: 112px;
  min-height: 112px;
  align-content: center;
  overflow: hidden;
}

body.stage1-ui-active .eq-tool-panel-preview.is-empty {
  min-height: 34px;
  padding-right: 6px;
  padding-left: 6px;
  place-items: center;
  color: rgba(220, 244, 255, 0.56);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

body.stage1-ui-active .eq-tool-empty-preview-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body.stage1-ui-active .eq-tool-compare-headline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(4, 20, 36, 0.64);
  border: 1px solid rgba(126, 232, 255, 0.15);
  color: rgba(231, 250, 255, 0.86);
  font-size: 12px;
  font-weight: 850;
}

body.stage1-ui-active .eq-tool-compare-headline span {
  color: rgba(136, 238, 255, 0.78);
  font-size: 11px;
  letter-spacing: 0.04em;
}

body.stage1-ui-active .eq-tool-compare-headline strong {
  color: #f3feff;
  font-size: 12px;
  font-weight: 950;
}

body.stage1-ui-active .eq-tool-result-view-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(2, 12, 24, 0.74);
  border: 1px solid rgba(126, 232, 255, 0.18);
}

body.stage1-ui-active .eq-tool-result-view-tabs-inline {
  transform: scale(0.88);
  transform-origin: left center;
}

body.stage1-ui-active .eq-tool-result-view-tab {
  height: 18px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  color: rgba(220, 245, 255, 0.68);
  background: transparent;
  font-size: 9px;
  font-weight: 820;
  cursor: pointer;
}

body.stage1-ui-active .eq-tool-result-view-tab.active {
  color: #041522;
  background: linear-gradient(180deg, rgba(124, 236, 255, 0.92), rgba(50, 155, 228, 0.84));
  box-shadow: 0 0 12px rgba(80, 220, 255, 0.3);
}

body.stage1-ui-active .eq-tool-compare-view {
  display: none;
  width: 100%;
}

body.stage1-ui-active .eq-tool-compare-view.active {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  height: 100%;
}

body.stage1-ui-active .eq-tool-compare-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  align-items: center;
}

body.stage1-ui-active .eq-tool-compare-model {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

body.stage1-ui-active .eq-tool-compare-fraction {
  display: flex;
  justify-content: center;
  color: #ffffff;
  transform: scale(0.68);
  transform-origin: center;
  min-height: 0;
  flex: 0 0 auto;
}

body.stage1-ui-active .eq-tool-compare-model .eq-analysis-fraction-bar,
body.stage1-ui-active .eq-tool-compare-model .eq-analysis-number-line {
  width: 132px;
}

body.stage1-ui-active .eq-tool-compare-model .eq-analysis-circle-model {
  width: 74px;
  height: 74px;
}

body.stage1-ui-active .eq-tool-compare-model .eq-analysis-film-model {
  width: 96px;
  height: 96px;
}

body.stage1-ui-active .eq-tool-compare-verdict {
  margin: 2px 0 0;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ecfbff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

body.stage1-ui-active .eq-tool-compare-verdict.same {
  color: #95f8ff;
  background: rgba(35, 210, 220, 0.1);
  border: 1px solid rgba(95, 236, 240, 0.24);
  text-shadow: 0 0 12px rgba(76, 226, 255, 0.48);
}

body.stage1-ui-active .eq-tool-compare-verdict.different {
  color: #ffb4c0;
  background: rgba(255, 94, 84, 0.1);
  border: 1px solid rgba(255, 118, 118, 0.23);
  text-shadow: 0 0 12px rgba(255, 78, 110, 0.35);
}

body.stage1-ui-active .eq-tool-overlay-wrap {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 2px 0 0;
}

body.stage1-ui-active .eq-tool-overlay-wrap p {
  margin: 0;
}

body.stage1-ui-active .eq-analysis-bar-overlay {
  position: relative;
  width: 330px;
  max-width: 100%;
  height: 50px;
  overflow: hidden;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-merge-stage {
  position: relative;
  width: 160px;
  height: 44px;
  margin: 2px auto 0;
  overflow: visible;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-moving-bar {
  position: absolute;
  left: 0;
  top: 8px;
  width: 160px;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-moving-bar .eq-analysis-fraction-bar {
  width: 160px;
  height: 24px;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-moving-bar.is-a {
  z-index: 1;
  --overlay-start-x: -92px;
  --overlay-final-opacity: 1;
  animation: eq-overlay-bar-merge 0.5s ease forwards;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-moving-bar.is-b {
  z-index: 2;
  --overlay-start-x: 92px;
  --overlay-final-opacity: 0.55;
  animation: eq-overlay-bar-merge 0.5s ease forwards;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-moving-bar.is-b .seg.filled {
  background: linear-gradient(180deg, rgba(117, 255, 219, 0.94), rgba(41, 194, 164, 0.88));
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-end-marker {
  position: absolute;
  z-index: 3;
  top: 4px;
  height: 31px;
  width: 2px;
  border-radius: 999px;
  opacity: 0;
  transform: translateX(-1px);
  animation: eq-overlay-marker-in 0.18s ease 0.38s forwards;
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-end-marker.a {
  left: var(--a-ratio);
  background: rgba(75, 196, 255, 0.98);
  box-shadow: 0 0 9px rgba(75, 196, 255, 0.62);
}

body.stage1-ui-active .eq-analysis-bar-overlay .eq-overlay-end-marker.b {
  left: var(--b-ratio);
  background: rgba(101, 255, 216, 0.98);
  box-shadow: 0 0 9px rgba(101, 255, 216, 0.58);
}

body.stage1-ui-active .eq-analysis-circle-overlay {
  width: 126px;
  height: 126px;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(84, 218, 255, 0.22));
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-circle-overlay {
  width: 82px;
  height: 82px;
}

body.stage1-ui-active .eq-overlay-circle-base {
  fill: rgba(255, 255, 255, 0.045);
  stroke: rgba(230, 250, 255, 0.18);
  stroke-width: 1;
}

body.stage1-ui-active .eq-overlay-circle-fill.a {
  fill: rgba(54, 174, 255, 0.48);
}

body.stage1-ui-active .eq-overlay-circle-fill.b {
  fill: rgba(78, 255, 210, 0.42);
  mix-blend-mode: screen;
}

body.stage1-ui-active .eq-overlay-circle-guide {
  stroke-width: 1.1;
  stroke-linecap: round;
}

body.stage1-ui-active .eq-overlay-circle-guide.a {
  stroke: rgba(238, 252, 255, 0.42);
}

body.stage1-ui-active .eq-overlay-circle-guide.b {
  stroke: rgba(126, 255, 224, 0.42);
  stroke-dasharray: 2 2;
}

body.stage1-ui-active .eq-overlay-circle-outline {
  fill: none;
  stroke: rgba(244, 255, 255, 0.92);
  stroke-width: 2;
}

body.stage1-ui-active .eq-analysis-line-overlay {
  position: relative;
  width: 310px;
  height: 78px;
}

body.stage1-ui-active .eq-analysis-line-overlay .track {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(224, 247, 255, 0.78);
}

body.stage1-ui-active .eq-analysis-line-overlay .zero,
body.stage1-ui-active .eq-analysis-line-overlay .one {
  position: absolute;
  top: 52px;
  color: rgba(238, 250, 255, 0.82);
  font-size: 13px;
  font-weight: 950;
}

body.stage1-ui-active .eq-analysis-line-overlay .zero { left: 0; }
body.stage1-ui-active .eq-analysis-line-overlay .one { right: 0; }

body.stage1-ui-active .eq-analysis-line-overlay .point {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateX(-50%);
}

body.stage1-ui-active .eq-analysis-line-overlay .point.a {
  left: var(--a-ratio);
  top: 22px;
  background: #45caff;
  box-shadow: 0 0 14px rgba(69, 215, 255, 0.65);
}

body.stage1-ui-active .eq-analysis-line-overlay .point.b {
  left: var(--b-ratio);
  top: 40px;
  background: #64ffd5;
  box-shadow: 0 0 14px rgba(100, 255, 213, 0.55);
}

body.stage1-ui-active .eq-analysis-film-overlay {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 2px;
  width: 128px;
  height: 128px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(4, 16, 30, 0.78);
  border: 1px solid rgba(186, 246, 255, 0.28);
}

body.stage1-ui-active .eq-analysis-film-overlay span {
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(220, 250, 255, 0.08);
}

body.stage1-ui-active .eq-analysis-film-overlay span.a {
  background: rgba(54, 174, 255, 0.46);
}

body.stage1-ui-active .eq-analysis-film-overlay span.b {
  background: rgba(78, 255, 210, 0.42);
}

body.stage1-ui-active .eq-analysis-film-overlay span.a.b {
  background: linear-gradient(135deg, rgba(54, 174, 255, 0.5), rgba(78, 255, 210, 0.48));
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.16);
}

body.stage1-ui-active .eq-tool-analysis-panel {
  left: 680px;
  top: 420px;
}

body.stage1-ui-active .eq-tool-applied-fraction {
  display: flex;
  justify-content: center;
  color: #ffffff;
  transform: scale(1.18);
  transform-origin: center;
  margin: 2px 0 8px;
}

body.stage1-ui-active .eq-tool-preview-fraction {
  display: flex;
  justify-content: center;
  color: #ffffff;
  transform: scale(0.72);
  transform-origin: center;
  margin: 0;
  flex: 0 0 auto;
}

body.stage1-ui-active .eq-tool-preview-model-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-fraction-bar {
  width: 176px;
  height: 28px;
  border-width: 2px;
  border-radius: 7px;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-circle-model {
  width: 72px;
  height: 72px;
  margin: 0;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-number-line {
  width: 178px;
  height: 48px;
  margin: 0;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-number-line::before {
  top: 23px;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-number-line .zero,
body.stage1-ui-active .eq-tool-input-panel .eq-analysis-number-line .one {
  top: 33px;
  font-size: 11px;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-number-line .half-marker {
  top: 15px;
  height: 20px;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-number-line .fraction-marker {
  top: 24px;
}

body.stage1-ui-active .eq-tool-input-panel .eq-analysis-film-model {
  width: 74px;
  height: 74px;
  margin: 0;
}

body.stage1-ui-active .eq-analysis-fraction-bar {
  display: grid;
  grid-template-columns: repeat(var(--denominator), 1fr);
  width: 204px;
  height: 32px;
  border: 2px solid rgba(235,255,255,0.9);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5,18,34,0.65);
}

body.stage1-ui-active .eq-analysis-fraction-bar .seg {
  display: block;
  min-width: 0;
  border-right: 1px solid rgba(235, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

body.stage1-ui-active .eq-analysis-fraction-bar .seg:last-child {
  border-right: none;
}

body.stage1-ui-active .eq-analysis-fraction-bar .seg.filled {
  background: linear-gradient(180deg, rgba(130,235,255,0.96), rgba(48,160,235,0.9));
  box-shadow: inset 0 0 8px rgba(255,255,255,0.35);
}

body.stage1-ui-active .eq-analysis-circle-model {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(84, 218, 255, 0.28));
}

body.stage1-ui-active .eq-analysis-circle-model path {
  fill: rgba(255, 255, 255, 0.07);
  stroke: rgba(224, 249, 255, 0.72);
  stroke-width: 1.5;
}

body.stage1-ui-active .eq-analysis-circle-model path.filled {
  fill: rgba(86, 205, 255, 0.9);
}

body.stage1-ui-active .eq-analysis-circle-model circle {
  fill: none;
  stroke: rgba(235, 255, 255, 0.92);
  stroke-width: 2.4;
}

body.stage1-ui-active .eq-analysis-number-line {
  position: relative;
  width: 220px;
  height: 70px;
  margin: 0 auto;
}

body.stage1-ui-active .eq-analysis-number-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  height: 4px;
  border-radius: 999px;
  background: rgba(224, 247, 255, 0.86);
}

body.stage1-ui-active .eq-analysis-number-line .zero,
body.stage1-ui-active .eq-analysis-number-line .one {
  position: absolute;
  top: 46px;
  color: rgba(238, 250, 255, 0.82);
  font-size: 14px;
  font-weight: 950;
}

body.stage1-ui-active .eq-analysis-number-line .zero { left: 0; }
body.stage1-ui-active .eq-analysis-number-line .one { right: 0; }

body.stage1-ui-active .eq-analysis-number-line .half-marker,
body.stage1-ui-active .eq-analysis-number-line .fraction-marker {
  position: absolute;
  top: 22px;
  width: 2px;
  height: 23px;
  border-radius: 999px;
  background: rgba(255, 233, 136, 0.68);
}

body.stage1-ui-active .eq-analysis-number-line .half-marker {
  left: 50%;
}

body.stage1-ui-active .eq-analysis-number-line .fraction-marker {
  left: var(--fraction-position);
  width: 14px;
  height: 14px;
  top: 27px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(236, 255, 255, 0.95);
  border-radius: 50%;
  background: #45d7ff;
  box-shadow: 0 0 16px rgba(69, 215, 255, 0.72);
}

body.stage1-ui-active .eq-analysis-film-model {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 2px;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  padding: 5px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(151, 230, 255, 0.1), rgba(22, 84, 118, 0.16)),
    rgba(5, 19, 34, 0.5);
  border: 1px solid rgba(186, 246, 255, 0.38);
  box-shadow:
    0 0 18px rgba(87, 216, 255, 0.2),
    inset 0 0 20px rgba(160, 240, 255, 0.08);
}

body.stage1-ui-active .eq-analysis-film-model span {
  display: block;
  min-width: 0;
  min-height: 0;
  border-radius: 2px;
  border: 1px solid rgba(220, 250, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

body.stage1-ui-active .eq-analysis-film-model span.filled {
  background: rgba(82, 205, 255, 0.86);
  border-color: rgba(213, 252, 255, 0.46);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.22);
}

body.stage1-ui-active .eq-tool-interpretation {
  margin: 4px 0 0;
  color: rgba(230, 249, 255, 0.86);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

body.stage1-ui-active .eq-visual-card {
  z-index: 27;
  overflow: auto;
}

body.stage1-ui-active .eq-visual-card.vertical-visual-card {
  overflow: hidden;
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 2px;
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-label {
  min-height: 0;
  min-width: 0;
  justify-content: center;
  font-size: 15px;
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-bar {
  width: 28px;
  height: 78px;
  display: grid;
  grid-template-rows: repeat(var(--denominator, var(--eq-learning-segment-count, 1)), minmax(0, 1fr));
  border: 1.5px solid rgba(230, 245, 255, 0.8);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-cell {
  border: 0;
  border-top: 1px dashed rgba(230, 245, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-cell:first-child {
  border-top: 0;
}

body.stage1-ui-active .eq-visual-card .vertical-fraction-cell.filled {
  background: linear-gradient(180deg, rgba(90, 190, 255, 0.95), rgba(45, 135, 230, 0.95));
}

body.stage1-ui-active .eq-visual-card.vertical-visual-card .eq-visual-title {
  margin-bottom: 8px;
  font-size: 14px;
}

body.stage1-ui-active .eq-visual-card.vertical-visual-card .eq-visual-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="cards"] .eq-visual-card,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="cards"] .eq-visual-card {
  left: calc(var(--eq-shell-gap, 24px) + var(--eq-inventory-width, 76px) + 18px);
  right: auto;
  bottom: calc(var(--eq-inventory-height) + 178px);
  width: min(320px, var(--eq-question-left-width));
  max-height: min(calc(var(--eq-frame-height) * 0.32), 260px);
  transform: none;
}

body.stage1-ui-active .eq-stage-screen[data-phase="object"][data-object-kind="bars"] .eq-visual-card,
body.stage1-ui-active .eq-stage-screen[data-phase="bridge"][data-object-kind="bars"] .eq-visual-card {
  left: 50%;
  bottom: calc(var(--eq-inventory-height) + 176px);
  width: min(420px, calc(100% - var(--eq-shell-gap, 24px) * 2));
  max-height: min(calc(var(--eq-frame-height) * 0.3), 240px);
  transform: translateX(-50%);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card {
  left: calc(var(--eq-shell-gap, 24px) + var(--eq-inventory-width, 76px) + 18px);
  top: var(--eq-problem-panel-top);
  right: auto;
  bottom: auto;
  width: var(--eq-question-left-width);
  height: var(--eq-problem-panel-height);
  max-height: none;
  min-height: var(--eq-problem-panel-height);
  z-index: 32;
  transform: none;
  padding: 20px 20px 18px;
  overflow: visible;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .eq-visual-title {
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 1.25;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .vertical-fraction-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  margin: 0;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .vertical-fraction-mini {
  gap: 10px;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .vertical-fraction-label {
  min-height: 28px;
  font-size: 21px;
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .vertical-fraction-bar {
  width: 56px;
  height: 216px;
  border-width: 2px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.32),
    0 14px 26px rgba(0, 0, 0, 0.28);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .vertical-fraction-cell {
  border-top: 1.5px solid rgba(230, 245, 255, 0.5);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .vertical-fraction-cell.filled {
  background:
    linear-gradient(180deg, rgba(111, 213, 255, 0.98), rgba(42, 139, 238, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.stage1-ui-active .eq-stage-screen[data-phase="question"] .eq-visual-card.vertical-visual-card .eq-visual-note {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.45;
}

/* =========================
   STAGE 1 TRIPLE SEAL GAME
========================= */

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-bg {
  background-image: url("../assets/images/s1.png") !important;
  filter: brightness(0.96) saturate(0.98) contrast(1.02);
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-vignette {
  background:
    radial-gradient(circle at 50% 43%, rgba(39, 151, 255, 0.1), transparent 34%),
    radial-gradient(circle at 82% 44%, rgba(0, 215, 255, 0.08), transparent 13%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.28));
}

body.stage1-ui-active .eq-stage-screen[data-current-step="stage1-seal-01-complete"] .eq-bg,
body.stage1-ui-active .eq-stage-screen[data-current-step="stage1-summary-same-amount"] .eq-bg,
body.stage1-ui-active .eq-stage-screen[data-current-step="stage1-summary-circle-amount"] .eq-bg,
body.stage1-ui-active .eq-stage-screen[data-current-step="stage1-summary-scale-rule"] .eq-bg {
  filter: brightness(0.94) saturate(0.98) contrast(1.02);
}

body.stage1-ui-active .eq-stage-screen[data-current-step="stage1-clear"] .eq-bg {
  filter: brightness(1) saturate(1) contrast(1);
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-stage-intro {
  z-index: 18;
  align-items: stretch;
  justify-content: center;
  padding:
    92px
    calc(var(--eq-shell-gap, 24px) + var(--eq-door-width, 300px) + 24px)
    calc(var(--eq-inventory-height, 44px) + 220px)
    calc(var(--eq-shell-gap, 24px) + var(--eq-inventory-width, 76px) + 26px);
}

.stage1-seal-shell {
  position: relative;
  width: min(900px, 100%);
  min-height: 100%;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(6, 18, 32, 0.94), rgba(3, 10, 20, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(49, 170, 255, 0.18), transparent 42%);
  border: 1px solid rgba(117, 220, 255, 0.24);
  box-shadow:
    0 0 0 1px rgba(10, 44, 72, 0.62) inset,
    0 28px 60px rgba(0, 0, 0, 0.46),
    0 0 36px rgba(41, 155, 255, 0.16);
  overflow: hidden;
  pointer-events: auto;
}

.stage1-seal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.34;
}

.stage1-seal-hud {
  display: none !important;
}

.stage1-system-label {
  display: block;
  margin-bottom: 6px;
  color: #7ee7ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.stage1-seal-hud strong {
  display: block;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0;
}

.stage1-hud-meters {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.stage1-hud-meters > span {
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(12, 33, 54, 0.92);
  border: 1px solid rgba(117, 220, 255, 0.18);
  color: #dff8ff;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.stage1-seal-hud p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(231, 249, 255, 0.8);
  font-size: 16px;
  font-weight: 850;
}

.stage1-seal-body {
  position: relative;
  z-index: 1;
  height: calc(100% - 112px);
  min-height: 488px;
}

.stage1-fixed-actions {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 8;
  display: flex;
  gap: 8px;
}

.stage1-fixed-actions button,
.stage1-primary-action,
.stage1-swipe-buttons button {
  border: 1px solid rgba(127, 226, 255, 0.32);
  border-radius: 6px;
  background: linear-gradient(180deg, #3bd8ff, #2579ff);
  box-shadow: 0 12px 24px rgba(0, 78, 177, 0.26), 0 0 18px rgba(61, 206, 255, 0.24);
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
  cursor: pointer;
}

.stage1-fixed-actions button {
  min-width: 74px;
  padding: 8px 12px;
  background: rgba(11, 30, 52, 0.88);
}

.stage1-primary-action {
  min-width: 172px;
  padding: 13px 20px;
}

.stage1-door-view {
  height: 100%;
  padding: 34px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: center;
}

.stage1-door-visual {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage1-door-slab {
  position: relative;
  width: 310px;
  height: 420px;
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.18), transparent 48%, rgba(255,255,255,0.05)),
    linear-gradient(180deg, #162236, #08111f);
  border: 1px solid rgba(126, 226, 255, 0.22);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.48), 0 0 36px rgba(28, 126, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.stage1-door-slab strong {
  font-size: 44px;
  font-weight: 950;
  color: #ffebef;
  text-shadow: 0 0 16px rgba(255, 66, 98, 0.4);
}

.stage1-door-slab em {
  font-style: normal;
  color: #7ee7ff;
  font-size: 18px;
  font-weight: 950;
}

.stage1-door-glow {
  position: absolute;
  inset: 36px;
  border: 2px solid rgba(255, 69, 97, 0.36);
  border-radius: 6px;
  box-shadow: 0 0 28px rgba(255, 69, 97, 0.22);
}

.stage1-door-seals {
  position: absolute;
  right: 34px;
  top: 62px;
  display: grid;
  gap: 14px;
}

.stage1-door-seals span {
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(7, 18, 32, 0.92);
  border: 1px solid rgba(255, 75, 104, 0.36);
  color: #ffd9df;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(255, 68, 99, 0.16);
}

.stage1-tablet-boot {
  padding: 26px;
  border-radius: 8px;
  background: rgba(4, 15, 28, 0.84);
  border: 1px solid rgba(118, 217, 255, 0.22);
  box-shadow: inset 0 0 38px rgba(36, 137, 255, 0.08);
}

.stage1-tablet-boot > span,
.stage1-complete-card > span,
.stage1-final-copy > span {
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stage1-tablet-boot h2,
.stage1-complete-card h2,
.stage1-final-copy h2 {
  margin: 12px 0 20px;
  font-size: 40px;
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: 0;
}

.stage1-power-bar {
  height: 12px;
  margin: 0 0 24px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(126, 226, 255, 0.16);
}

.stage1-power-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38f4ff, #2b7cff);
  box-shadow: 0 0 18px rgba(53, 218, 255, 0.5);
}

.stage1-uv-target-em {
  color: rgba(235, 250, 255, 0.92);
  font-weight: 800;
}

.stage1-uv-target-em strong {
  color: #7ef8ff;
  font-size: 1.08em;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(78, 220, 255, 0.55);
}

.stage1-uv-field {
  --uv-x: 50%;
  --uv-y: 42%;
  position: relative;
  height: 100%;
  min-height: 510px;
  overflow: hidden;
  cursor: none;
  background:
    radial-gradient(circle at 30% 24%, rgba(64, 155, 255, 0.12), transparent 14%),
    linear-gradient(180deg, rgba(16, 33, 52, 0.9), rgba(3, 8, 16, 0.92));
}

.stage1-classroom-silhouette span {
  position: absolute;
  display: block;
  border: 1px solid rgba(112, 202, 255, 0.12);
  background: rgba(255,255,255,0.035);
}

.stage1-classroom-silhouette .board {
  left: 18%;
  top: 18%;
  width: 42%;
  height: 18%;
}

.stage1-classroom-silhouette .locker {
  right: 8%;
  top: 22%;
  width: 17%;
  height: 48%;
}

.stage1-classroom-silhouette .notice {
  left: 58%;
  top: 17%;
  width: 20%;
  height: 18%;
}

.stage1-classroom-silhouette .door {
  left: 43%;
  top: 42%;
  width: 16%;
  height: 44%;
}

.stage1-uv-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle 120px at var(--uv-x) var(--uv-y),
      rgba(120, 230, 255, 0.32) 0%,
      rgba(120, 230, 255, 0.18) 35%,
      rgba(120, 230, 255, 0.06) 65%,
      rgba(0,0,0,0) 100%
    ),
    rgba(0,0,0,0.78);
  mix-blend-mode: multiply;
}

.stage1-uv-field::after {
  content: "";
  position: absolute;
  left: var(--uv-x);
  top: var(--uv-y);
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(116, 236, 255, 0.12);
  background: radial-gradient(
    circle,
    rgba(120, 230, 255, 0.32) 0%,
    rgba(120, 230, 255, 0.18) 35%,
    rgba(120, 230, 255, 0.06) 65%,
    rgba(120, 230, 255, 0) 100%
  );
  box-shadow: 0 0 24px rgba(80, 220, 255, 0.35);
  pointer-events: none;
  z-index: 5;
}

.stage1-uv-clue {
  position: absolute;
  z-index: 20;
  width: 170px;
  height: 128px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(154, 245, 255, 0.18);
  opacity: 0.1;
  filter: blur(1px);
  cursor: pointer;
  display: block;
  appearance: none;
  font: inherit;
  pointer-events: auto;
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease, color 180ms ease;
}

.stage1-uv-clue-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.stage1-uv-clue.revealed,
.stage1-uv-clue:focus-visible {
  opacity: 1;
  filter: blur(0);
  color: #dffcff;
}

.stage1-uv-clue.found {
  opacity: 1;
  filter: none;
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.06);
  pointer-events: none;
}

.stage1-uv-clue.wrong {
  opacity: 1;
  filter: none;
  animation: stage1-uv-clue-wrong 0.3s linear;
}

.stage1-uv-clue-fraction-tab {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 3;
  width: 72px;
  height: 44px;
  transform: translateX(-50%);
  border-radius: 10px;
  border: 2px solid rgba(132, 255, 216, 0.75);
  background:
    linear-gradient(180deg, rgba(246, 255, 253, 0.98), rgba(200, 249, 255, 0.92));
  box-shadow:
    0 0 14px rgba(120, 255, 220, 0.28),
    inset 0 -5px 10px rgba(80, 185, 220, 0.14);
  color: #061827;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage1-uv-clue-card-body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 160px;
  height: 90px;
  transform: translateX(-50%);
  border-radius: 14px;
  border: 2px solid rgba(120, 230, 255, 0.48);
  background:
    radial-gradient(circle at 50% 18%, rgba(120, 230, 255, 0.2), transparent 58%),
    linear-gradient(180deg, rgba(17, 72, 132, 0.78), rgba(5, 25, 47, 0.84));
  box-shadow:
    0 0 12px rgba(70, 210, 255, 0.18),
    inset 0 0 18px rgba(120, 230, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stage1-uv-clue.revealed .stage1-uv-clue-card-body,
.stage1-uv-clue:focus-visible .stage1-uv-clue-card-body {
  border-color: rgba(120, 230, 255, 0.72);
  box-shadow:
    0 0 24px rgba(80, 220, 255, 0.55),
    inset 0 0 20px rgba(120, 230, 255, 0.18);
}

.stage1-uv-clue.found .stage1-uv-clue-card-body {
  border-color: rgba(130, 255, 200, 0.95);
  background:
    radial-gradient(circle at 50% 20%, rgba(130, 255, 210, 0.28), transparent 58%),
    linear-gradient(180deg, rgba(18, 115, 134, 0.88), rgba(8, 61, 78, 0.92));
  box-shadow:
    0 0 0 2px rgba(140, 255, 220, 0.18),
    0 0 34px rgba(100, 255, 200, 0.88),
    inset 0 0 18px rgba(180, 255, 235, 0.22);
}

.stage1-uv-clue.wrong .stage1-uv-clue-card-body {
  border-color: rgba(255, 83, 108, 0.88);
  box-shadow:
    0 0 24px rgba(255, 65, 95, 0.5),
    inset 0 0 18px rgba(255, 75, 112, 0.18);
}

.stage1-uv-clue-visual {
  width: 130px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.48;
  transition: opacity 160ms ease, filter 160ms ease;
}

.stage1-uv-clue.clue-circle .stage1-uv-clue-visual {
  height: 66px;
}

.stage1-uv-clue.revealed .stage1-uv-clue-visual,
.stage1-uv-clue:focus-visible .stage1-uv-clue-visual,
.stage1-uv-clue.found .stage1-uv-clue-visual {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(94, 224, 255, 0.42));
}

.stage1-half-circle-scan .stage1-uv-clue {
  width: 210px;
  height: 158px;
}

.stage1-half-circle-scan .stage1-uv-clue-fraction-tab {
  width: 82px;
  height: 48px;
}

.stage1-half-circle-scan .stage1-uv-clue-card-body {
  width: 198px;
  height: 112px;
}

.stage1-half-circle-scan .stage1-uv-clue-visual {
  width: 160px;
  height: 88px;
}

.stage1-half-circle-scan .stage1-circle-model {
  width: 88px;
  height: 88px;
}

.stage1-half-circle-scan .stage1-circle-model .stage1-circle-segment.filled {
  fill: rgba(77, 210, 255, 0.94);
}

.stage1-fraction-bar-model {
  display: grid;
  grid-template-columns: repeat(var(--denominator), 1fr);
  width: 130px;
  height: 34px;
  border: 2px solid rgba(248, 255, 255, 0.96);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(4, 14, 28, 0.82);
  box-shadow:
    0 0 14px rgba(116, 226, 255, 0.24),
    inset 0 0 12px rgba(255, 255, 255, 0.08);
}

.stage1-fraction-bar-model .seg {
  display: block;
  min-width: 0;
  border-right: 2px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 1px 0 0 rgba(142, 232, 255, 0.26),
    inset -1px 0 0 rgba(255, 255, 255, 0.18);
}

.stage1-fraction-bar-model .seg:last-child {
  border-right: none;
}

.stage1-fraction-bar-model .seg.filled {
  background: linear-gradient(180deg, rgba(130, 235, 255, 0.96), rgba(48, 160, 235, 0.9));
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.52),
    0 0 10px rgba(78, 212, 255, 0.2);
}

.stage1-circle-model {
  display: block;
  width: 66px;
  height: 66px;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(92, 224, 255, 0.3));
}

.stage1-circle-model .stage1-circle-segment {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.stage1-circle-model .stage1-circle-segment.filled {
  fill: rgba(77, 210, 255, 0.92);
  filter: drop-shadow(0 0 5px rgba(80, 220, 255, 0.36));
}

.stage1-circle-model .stage1-circle-outline {
  fill: none;
  stroke: rgba(247, 255, 255, 0.98);
  stroke-width: 2.8;
}

.stage1-clue-fraction {
  position: relative;
  z-index: 1;
  transform: none;
  font-size: 20px;
  font-weight: 950;
  text-shadow: none;
}

.stage1-clue-fraction .tm-bar {
  height: 2px;
  margin: 0;
}

.stage1-uv-clue-fraction-tab .textbook-math {
  display: inline-flex;
  width: max-content;
  max-width: calc(100% - 6px);
}

/* UV 단서 분수 탭 — textbook-math 적용 후 색·크기 복구 */
.stage1-uv-clue-fraction-tab .textbook-math,
.stage1-uv-clue-fraction-tab .textbook-math.textbook-math--inherit,
.stage1-uv-clue-fraction-tab .textbook-math.textbook-math--compact {
  color: #061827;
  font-size: inherit;
  font-weight: inherit;
}

.stage1-uv-clue.revealed .stage1-uv-clue-fraction-tab .textbook-math,
.stage1-uv-clue.found .stage1-uv-clue-fraction-tab .textbook-math,
.stage1-uv-clue:focus-visible .stage1-uv-clue-fraction-tab .textbook-math,
.stage1-uv-clue.wrong .stage1-uv-clue-fraction-tab .textbook-math {
  color: #061827;
}

.stage1-uv-clue-fraction-tab .tm-num,
.stage1-uv-clue-fraction-tab .tm-den,
.stage1-uv-clue-fraction-tab .eq-fraction-num,
.stage1-uv-clue-fraction-tab .eq-fraction-den {
  color: #061827;
  font-size: inherit;
  font-weight: 950;
  text-shadow: none;
}

.stage1-uv-clue-fraction-tab .tm-bar {
  background: #061827;
  opacity: 1;
}

.stage1-lock-complete .stage1-seal-body,
.stage1-final-clear .stage1-seal-body {
  display: grid;
  place-items: center;
}

.stage1-complete-card {
  position: relative;
  width: min(560px, calc(100% - 56px));
  padding: 38px;
  border-radius: 8px;
  text-align: center;
  background: rgba(5, 18, 31, 0.88);
  border: 1px solid rgba(118, 231, 255, 0.34);
  box-shadow: 0 0 44px rgba(63, 202, 255, 0.18);
}

.stage1-complete-card p {
  margin: 0 0 24px;
  color: rgba(235, 250, 255, 0.82);
  font-size: 17px;
  font-weight: 800;
}

.stage1-chalkboard-analysis .stage1-seal-body {
  display: grid;
  place-items: center;
}

.stage1-chalkboard-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100%;
  padding: 24px 0 12px;
}

.stage1-chalkboard-panel {
  width: min(720px, calc(100% - 48px));
  padding: 34px 38px 30px;
  border-radius: 10px;
  text-align: center;
  background: rgba(8, 24, 38, 0.78);
  border: 1px solid rgba(118, 231, 255, 0.28);
  box-shadow:
    inset 0 0 48px rgba(36, 137, 255, 0.08),
    0 0 36px rgba(63, 202, 255, 0.12);
  backdrop-filter: blur(2px);
}

.stage1-chalkboard-kicker {
  display: block;
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stage1-chalkboard-title {
  margin: 10px 0 22px;
  font-size: 34px;
  line-height: 1.16;
  font-weight: 950;
  color: #f4fdff;
}

.stage1-chalkboard-rows {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.stage1-chalkboard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(126, 226, 255, 0.14);
  color: rgba(235, 250, 255, 0.9);
  font-size: 18px;
  font-weight: 800;
}

.stage1-chalkboard-arrow {
  color: rgba(126, 226, 255, 0.72);
  font-weight: 900;
}

.stage1-chalkboard-detail {
  color: rgba(235, 250, 255, 0.88);
}

.stage1-chalkboard-result {
  color: #8ef5ff;
  font-style: normal;
  font-weight: 900;
}

.stage1-chalkboard-summary {
  margin: 0 0 24px;
  color: rgba(235, 250, 255, 0.86);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 800;
}

.stage1-chalkboard-fraction .eq-fraction-inline,
.stage1-chalkboard-fraction.math-fraction {
  font-size: 28px;
}

.stage1-summary-scene .stage1-seal-body,
.stage1-chalkboard-analysis .stage1-seal-body {
  display: grid;
  place-items: center;
}

.stage1-summary-wrap,
.stage1-chalkboard-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100%;
  padding: 24px 0 148px;
}

.stage1-summary-panel,
.stage1-chalkboard-panel {
  width: min(980px, calc(100% - 40px));
  min-height: 420px;
  padding: 36px 42px 32px;
  border-radius: 10px;
  text-align: center;
  background: rgba(8, 24, 38, 0.78);
  border: 1px solid rgba(118, 231, 255, 0.28);
  box-shadow:
    inset 0 0 48px rgba(36, 137, 255, 0.08),
    0 0 36px rgba(63, 202, 255, 0.12);
  backdrop-filter: blur(2px);
}

.stage1-summary-scale .stage1-summary-panel,
.stage1-scale-panel {
  width: min(1020px, calc(100% - 32px));
  min-height: 460px;
  padding: 34px 40px 30px;
}

.stage1-summary-kicker,
.stage1-chalkboard-kicker {
  display: block;
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stage1-summary-title,
.stage1-chalkboard-title {
  margin: 10px 0 18px;
  font-size: 32px;
  line-height: 1.16;
  font-weight: 950;
  color: #f4fdff;
}

.stage1-summary-rows,
.stage1-chalkboard-rows {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.stage1-summary-row,
.stage1-chalkboard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(126, 226, 255, 0.14);
  color: rgba(235, 250, 255, 0.9);
  font-size: 18px;
  font-weight: 800;
}

.stage1-summary-visual .stage1-fraction-bar-model {
  --denominator: 4;
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.stage1-summary-visual .stage1-fraction-bar-model .seg {
  width: 32px;
  height: 40px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(200, 230, 255, 0.42);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.28);
}

.stage1-summary-visual .stage1-fraction-bar-model .seg.filled {
  background: linear-gradient(180deg, #7ef0ff, #2f95ff);
  border-color: rgba(210, 250, 255, 0.92);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.42),
    0 0 12px rgba(78, 212, 255, 0.28);
}

.stage1-summary-circle .stage1-summary-visual .stage1-circle-model {
  width: 112px;
  height: 112px;
}

.stage1-summary-circle .stage1-summary-visual .stage1-circle-segment {
  stroke: rgba(210, 245, 255, 0.92);
  stroke-width: 2.4;
}

.stage1-summary-circle .stage1-summary-rows {
  gap: 22px;
}

.stage1-summary-circle .stage1-summary-visual .stage1-circle-segment.filled {
  fill: rgba(77, 210, 255, 0.96);
}

.stage1-summary-arrow,
.stage1-chalkboard-arrow {
  color: rgba(126, 226, 255, 0.72);
  font-weight: 900;
}

.stage1-summary-detail,
.stage1-chalkboard-detail {
  color: rgba(235, 250, 255, 0.88);
}

.stage1-summary-result,
.stage1-chalkboard-result {
  color: #8ef5ff;
  font-style: normal;
  font-weight: 900;
}

.stage1-summary-text,
.stage1-chalkboard-summary {
  margin: 0 0 22px;
  color: rgba(235, 250, 255, 0.86);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 800;
}

.stage1-summary-fraction .eq-fraction-inline,
.stage1-summary-fraction.math-fraction,
.stage1-scale-fraction .eq-fraction-inline,
.stage1-scale-fraction.math-fraction {
  font-size: 26px;
}

.stage1-play-layer.stage1-summary-amount {
  place-items: start center;
  padding-top: 133px;
  box-sizing: border-box;
}

.stage1-seal-shell.stage1-summary-amount {
  width: 1300px;
  height: clamp(659px, 54.4vh, 736px);
  transform: none;
}

.stage1-summary-amount .stage1-summary-wrap {
  padding: 20px 0 24px;
}

.stage1-summary-amount .stage1-summary-panel {
  width: min(1240px, calc(100% - 32px));
  min-height: 602px;
  padding: 36px 64px 32px;
}

.stage1-summary-amount .stage1-summary-kicker {
  margin-top: 4px;
}

.stage1-summary-amount .stage1-summary-title {
  margin: 12px 0 8px;
  font-size: 34px;
}

.stage1-summary-subtitle {
  margin: 0 0 26px;
  color: rgba(190, 230, 245, 0.9);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 800;
}

.stage1-summary-amount .stage1-summary-rows {
  gap: 22px;
  margin-bottom: 30px;
}

.stage1-summary-amount .stage1-summary-row {
  display: grid;
  grid-template-columns: 80px 300px 28px minmax(120px, max-content) 28px auto;
  align-items: center;
  justify-content: center;
  column-gap: 14px;
  width: min(100%, 1180px);
  margin-inline: auto;
  padding: 22px 32px;
  min-height: 96px;
  flex-wrap: nowrap;
  text-align: left;
}

.stage1-summary-amount .stage1-summary-fraction {
  justify-self: end;
}

.stage1-summary-amount .stage1-summary-visual {
  display: flex;
  justify-content: flex-start;
  width: 300px;
}

.stage1-summary-bar-model {
  --summary-bar-width: 300px;
  --denominator: 4;
  display: inline-flex;
  width: var(--summary-bar-width);
  height: 54px;
  border: 2px solid rgba(200, 230, 255, 0.56);
  border-radius: 6px;
  overflow: hidden;
  vertical-align: middle;
  background: rgba(8, 22, 36, 0.94);
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(78, 212, 255, 0.16);
}

.stage1-summary-bar-model .seg {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  margin: 0;
  border: 0;
  border-right: 2px solid rgba(122, 145, 160, 0.48);
  border-radius: 0;
  box-sizing: border-box;
  background: #E5EBEE;
  box-shadow: none;
}

.stage1-summary-bar-model .seg:last-child {
  border-right: 0;
}

.stage1-summary-bar-model .seg.filled {
  background: linear-gradient(180deg, #8ef5ff 0%, #39a8ff 58%, #1f7fe6 100%);
  border-right-color: rgba(210, 250, 255, 0.72);
  box-shadow:
    inset 0 0 16px rgba(255, 255, 255, 0.42),
    0 0 14px rgba(78, 212, 255, 0.28);
}

.stage1-summary-amount .stage1-summary-detail {
  white-space: nowrap;
  font-size: 17px;
}

.stage1-summary-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 214, 74, 0.16);
  border: 1px solid rgba(255, 214, 74, 0.58);
  color: #ffe98a;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(255, 214, 74, 0.14);
}

.stage1-summary-amount .stage1-summary-text {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
}

.stage1-summary-amount .stage1-primary-action {
  min-width: 132px;
  height: 48px;
  font-size: 16px;
}

/* Stage 1-1: 같은 양 만들기 — 두 줄 활동 흐름 */
.stage1-play-layer.stage1-summary-amount:has(.stage1-same-amount-compact) {
  place-items: start center;
  padding-top: 248px;
  box-sizing: border-box;
}

.stage1-seal-shell.stage1-summary-scene.stage1-summary-amount.stage1-same-amount-compact,
.stage1-seal-shell.stage1-same-amount-compact {
  width: 1040px;
  height: 460px;
  max-height: 460px;
  transform: none;
}

.stage1-same-amount-compact .stage1-summary-wrap {
  padding: 0;
  height: 100%;
}

.stage1-same-amount-compact .stage1-summary-panel.stage1-sa-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.stage1-sa-panel.stage1-sa-compact.same-amount-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 42px 28px;
  box-sizing: border-box;
  gap: 0;
  overflow: hidden;
}

.stage1-sa-panel.stage1-sa-compact.same-amount-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 220, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 220, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.stage1-sa-panel.stage1-sa-compact.same-amount-panel > * {
  position: relative;
  z-index: 1;
}

.stage1-sa-header {
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  border-bottom: 1px solid rgba(105, 220, 255, 0.12);
  box-sizing: border-box;
}

.stage1-sa-problem-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage1-sa-progress-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stage1-sa-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(120, 170, 200, 0.28);
  border: 1px solid rgba(150, 210, 240, 0.35);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.25);
}

.stage1-sa-progress-dot.is-on {
  background: linear-gradient(180deg, #9ef5ff 0%, #3db4ff 100%);
  border-color: rgba(190, 245, 255, 0.85);
  box-shadow: 0 0 10px rgba(78, 212, 255, 0.45);
}

.stage1-sa-compact-title:not(.edu-worksheet-title) {
  margin: 0;
  color: rgba(210, 242, 255, 0.96);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
}

.stage1-sa-problem-label {
  color: rgba(150, 215, 245, 0.95);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stage1-sa-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 12px 0 48px;
  box-sizing: border-box;
}

.stage1-sa-activity-list.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.stage1-sa-activity-row.activity-row {
  display: grid;
  grid-template-columns: 132px 76px 360px 110px;
  align-items: center;
  column-gap: 22px;
  min-height: 78px;
  padding: 4px 0;
  box-sizing: border-box;
}

.stage1-sa-connection-row.connection-row {
  display: grid;
  grid-template-columns: 132px 76px 360px 110px;
  align-items: center;
  column-gap: 22px;
  min-height: 28px;
  padding: 2px 0;
}

.stage1-sa-connection-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.connection-line.stage1-sa-connection-line {
  position: relative;
  width: 220px;
  height: 4px;
  border-radius: 999px;
  background: rgba(90, 180, 220, 0.16);
  overflow: hidden;
}

.connection-line.stage1-sa-connection-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: rgba(100, 220, 255, 0.45);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.connection-line.stage1-sa-connection-line.is-left-on::before {
  opacity: 1;
}

.connection-line.stage1-sa-connection-line.is-full-on {
  background: rgba(90, 210, 240, 0.35);
  box-shadow: 0 0 12px rgba(78, 212, 255, 0.28);
}

.connection-line.stage1-sa-connection-line.is-full-on::before {
  width: 100%;
  background: linear-gradient(90deg, rgba(80, 210, 255, 0.85), rgba(120, 240, 255, 0.95));
  opacity: 1;
}

.connection-line.stage1-sa-connection-line.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(180, 250, 255, 0.95), transparent);
  animation: stage1-sa-data-flow 1.2s linear infinite;
}

@keyframes stage1-sa-data-flow {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.same-amount-badge.stage1-sa-same-badge {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%) scale(0.92);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 214, 120, 0.14);
  border: 1px solid rgba(255, 214, 120, 0.55);
  color: #ffe98a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.same-amount-badge.stage1-sa-same-badge.is-show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: stage1-sa-badge-pop 1s ease;
}

@keyframes stage1-sa-badge-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.85);
  }
  35% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.stage1-sa-bar-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.stage1-sa-bar-guide {
  position: relative;
  width: 360px;
}

.stage1-sa-half-marker {
  position: absolute;
  left: 50%;
  top: -6px;
  bottom: -6px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: rgba(120, 220, 255, 0.14);
  box-shadow: 0 0 0 rgba(120, 220, 255, 0);
  pointer-events: none;
  z-index: 2;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.stage1-sa-half-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: rgba(120, 220, 255, 0.22);
  box-shadow: 0 0 6px rgba(78, 212, 255, 0.2);
}

.stage1-sa-bar-guide.is-dim .stage1-sa-half-marker {
  opacity: 0.55;
}

.stage1-sa-bar-guide.is-half-on .stage1-sa-half-marker {
  background: rgba(140, 240, 255, 0.72);
  box-shadow: 0 0 14px rgba(78, 212, 255, 0.55);
}

.stage1-sa-bar-guide.is-half-on .stage1-sa-half-marker::after {
  background: rgba(180, 250, 255, 0.95);
  box-shadow: 0 0 10px rgba(78, 212, 255, 0.65);
}

.stage1-sa-bar-counter {
  color: rgba(150, 200, 225, 0.78);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.concept-slot.stage1-sa-concept-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 48px;
  margin-top: 6px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 1px solid rgba(105, 220, 255, 0.12);
  background: rgba(6, 22, 36, 0.42);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.concept-slot.stage1-sa-concept-slot.locked {
  opacity: 0.48;
  filter: saturate(0.65);
}

.concept-slot.stage1-sa-concept-slot.unlocked {
  opacity: 1;
  border-color: rgba(100, 230, 255, 0.42);
  background: rgba(8, 36, 52, 0.62);
  box-shadow:
    inset 0 0 16px rgba(78, 212, 255, 0.12),
    0 0 18px rgba(78, 212, 255, 0.14);
}

.stage1-sa-concept-item {
  color: rgba(190, 230, 250, 0.88);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.concept-slot.unlocked .stage1-sa-concept-item {
  color: rgba(210, 250, 255, 0.96);
}

.same-amount-panel.is-problem-clear .stage1-sa-bar-guide.is-half-on .stage1-sa-half-marker {
  animation: stage1-sa-half-glow 1.1s ease;
}

@keyframes stage1-sa-half-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.45);
  }
}

.stage1-sa-seg.is-fill.is-pulse,
.stage1-sa-bar .stage1-sa-seg.is-fill.is-pulse {
  animation: stage1-sa-seg-pulse 0.85s ease;
}

@keyframes stage1-sa-seg-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.4);
  }
}

.stage1-sa-row-label.activity-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage1-sa-col-title {
  margin: 0;
  color: #e8f8ff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
}

.stage1-sa-mark.is-ok {
  color: #9ef5c8;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.stage1-sa-row-target.target-fraction-wrap,
.stage1-sa-row-target {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage1-sa-row-target-empty {
  visibility: hidden;
  pointer-events: none;
}

.stage1-sa-target-frac.math-fraction,
.stage1-sa-target-frac.target-fraction {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.stage1-sa-target-frac .fraction-line,
.stage1-sa-target-frac .eq-fraction-line {
  width: 42px;
  height: 2px;
}

.stage1-sa-row-bar {
  display: flex;
  align-items: center;
}

.stage1-sa-row-side.write-row-side {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.write-row .fraction-input {
  margin-left: 0;
}

.stage1-sa-bar.fraction-strip {
  --seg-count: 4;
  --sa-bar-width: 360px;
  display: grid;
  grid-template-columns: repeat(var(--seg-count), 1fr);
  width: 360px;
  max-width: 360px;
  height: 58px;
  flex-shrink: 0;
  border: 2px solid rgba(200, 230, 255, 0.56);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 22, 36, 0.94);
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.34),
    0 0 14px rgba(78, 212, 255, 0.14);
}

.stage1-sa-bar.is-success {
  border-color: rgba(120, 230, 255, 0.9);
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(78, 212, 255, 0.4);
}

.stage1-sa-bar.is-flash {
  animation: stage1-sa-bar-flash 0.7s ease;
}

@keyframes stage1-sa-bar-flash {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.35);
  }
}

.stage1-sa-seg {
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 2px solid rgba(122, 145, 160, 0.48);
  border-radius: 0;
  background: #E5EBEE;
  box-shadow: none;
  cursor: default;
}

.stage1-sa-seg:last-child {
  border-right: 0;
}

button.stage1-sa-seg {
  cursor: pointer;
}

button.stage1-sa-seg:focus-visible {
  outline: 2px solid rgba(120, 230, 255, 0.95);
  outline-offset: -2px;
  z-index: 1;
}

.stage1-sa-seg.is-fill {
  background: linear-gradient(180deg, #8ef5ff 0%, #39a8ff 58%, #1f7fe6 100%);
  border-right-color: rgba(210, 250, 255, 0.72);
  box-shadow:
    inset 0 0 16px rgba(255, 255, 255, 0.42),
    0 0 14px rgba(78, 212, 255, 0.28);
}

.stage1-sa-frac-input.fraction-input {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.stage1-sa-frac-field {
  width: 62px;
  height: 48px;
  border: 2px solid rgba(170, 220, 245, 0.55);
  border-radius: 8px;
  background: rgba(8, 24, 38, 0.92);
  color: #eefbff;
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.28);
}

.stage1-sa-frac-field:focus {
  outline: none;
  border-color: rgba(120, 230, 255, 0.95);
}

.stage1-sa-frac-field.is-ok {
  border-color: rgba(90, 230, 160, 0.9);
}

.stage1-sa-frac-field.is-warn {
  border-color: rgba(255, 140, 130, 0.75);
  box-shadow: 0 0 10px rgba(255, 120, 110, 0.18);
}

.stage1-sa-frac-line.fraction-bar {
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: rgba(210, 245, 255, 0.92);
}

.stage1-sa-actions {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  z-index: 2;
}

.stage1-sa-next-btn {
  min-width: 132px;
}

.stage1-sa-actions .stage1-primary-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.stage1-same-amount-compact .stage1-primary-action {
  min-width: 128px;
  height: 44px;
  font-size: 15px;
}

/* Stage 1-1: 분수 막대 복구 — 미니멀 학습 카드 */
.stage1-play-layer.stage1-summary-amount:has(.stage1-same-amount-tutorial) {
  place-items: center;
  padding-top: 0;
  padding-bottom: 108px;
}

.stage1-seal-shell.stage1-same-amount-tutorial {
  width: 790px;
  height: 474px;
  max-height: 474px;
  transform: scale(1.2);
  transform-origin: center center;
}

.stage1-sa-panel.stage1-sa-tutorial {
  height: 100%;
  padding: 0;
  transition: opacity 0.38s ease;
}

.stage1-sa-panel.stage1-sa-tutorial.is-fading-out { opacity: 0; }
.stage1-sa-panel.stage1-sa-tutorial.is-fading-in { animation: stage1-sa-fade-in 0.42s ease; }

@keyframes stage1-sa-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.stage1-sa-recovery-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 24px 16px;
  gap: 8px;
  box-sizing: border-box;
}

.stage1-sa-tutorial .stage1-sa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0;
  border: 0;
}

.stage1-sa-tutorial .stage1-sa-compact-title:not(.edu-worksheet-title) {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  color: #edfaff;
}

.stage1-sa-tutorial .stage1-sa-problem-label {
  font-size: 14px;
  font-weight: 900;
  color: rgba(175, 228, 255, 0.9);
}

.stage1-sa-recovery-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

.stage1-sa-main-row {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  align-items: center;
  width: 100%;
  max-width: 640px;
}

.stage1-sa-main-row-write {
  grid-template-columns: 1fr 148px;
  max-width: 660px;
}

.stage1-sa-target-zone,
.stage1-sa-bar-zone,
.stage1-sa-write-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stage1-sa-bar-zone {
  position: relative;
}

.stage1-sa-sub-hint {
  color: rgba(140, 195, 225, 0.55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stage1-sa-mini-counter {
  position: absolute;
  top: -2px;
  right: 0;
  color: rgba(150, 210, 240, 0.5);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.stage1-sa-tutorial .stage1-sa-target-frac {
  font-size: 41px;
  color: #f6fdff;
}

.stage1-sa-tutorial .stage1-sa-target-frac .fraction-line,
.stage1-sa-tutorial .stage1-sa-target-frac .eq-fraction-line {
  width: 48px;
  height: 3px;
}

.stage1-sa-bar-frame {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.stage1-sa-tutorial .stage1-sa-bar.fraction-strip {
  --seg-size: 62px;
  --seg-height: 56px;
  display: grid;
  grid-template-columns: repeat(var(--seg-count), var(--seg-size));
  width: calc(var(--seg-count) * var(--seg-size));
  min-width: calc(var(--seg-count) * var(--seg-size));
  max-width: calc(var(--seg-count) * var(--seg-size));
  height: var(--seg-height);
  min-height: var(--seg-height);
  max-height: var(--seg-height);
  flex: 0 0 var(--seg-height);
  border: 2px solid rgba(165, 225, 255, 0.48);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5, 16, 28, 0.98);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.28), 0 0 12px rgba(56, 189, 248, 0.12);
}

.stage1-sa-tutorial .stage1-sa-seg {
  width: var(--seg-size);
  min-width: var(--seg-size);
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 2px solid rgba(122, 145, 160, 0.48);
  border-radius: 0;
  background: #E5EBEE;
  flex-shrink: 0;
}

.stage1-sa-tutorial .stage1-sa-seg:last-child { border-right: 0; }
.stage1-sa-tutorial button.stage1-sa-seg { cursor: pointer; }

.stage1-sa-tutorial button.stage1-sa-seg:hover:not(.is-fill) {
  background: #D8E3EA;
  box-shadow: inset 0 0 0 1px rgba(74, 159, 210, 0.28);
}

.stage1-sa-tutorial .stage1-sa-seg.is-fill {
  background: linear-gradient(180deg, #9ef8ff 0%, #3da8ff 55%, #1f7fe8 100%);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.38), 0 0 10px rgba(78, 212, 255, 0.32);
}

.stage1-sa-tutorial .stage1-sa-bar.is-success {
  border-color: rgba(120, 230, 255, 0.78);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.22), 0 0 18px rgba(78, 212, 255, 0.28);
}

.stage1-sa-write-zone {
  gap: 10px;
}

.stage1-sa-frac-input {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 4px;
}

.stage1-sa-tutorial .stage1-sa-frac-field:not(.edu-blank-input) {
  width: 56px;
  height: 48px;
  font-size: 28px;
  font-weight: 950;
  color: #f2fcff;
  border: 2px solid rgba(140, 210, 245, 0.4);
  border-radius: 8px;
  background: rgba(5, 18, 30, 0.94);
  text-align: center;
}

.stage1-sa-tutorial .stage1-sa-frac-field:not(.edu-blank-input)::placeholder {
  color: rgba(140, 190, 220, 0.35);
}

.stage1-sa-tutorial .stage1-sa-frac-line {
  display: block;
  width: 48px;
  height: 3px;
  background: rgba(130, 230, 255, 0.8);
  border-radius: 999px;
}

.stage1-sa-confirm-btn {
  min-width: 72px;
  height: 34px;
  border: 1px solid rgba(120, 215, 255, 0.45);
  border-radius: 8px;
  background: rgba(8, 30, 48, 0.9);
  color: #d8f4ff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.stage1-sa-confirm-btn:hover:not(:disabled) {
  border-color: rgba(130, 230, 255, 0.7);
  box-shadow: 0 0 12px rgba(78, 212, 255, 0.2);
}

.stage1-sa-confirm-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stage1-sa-summary-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(110, 210, 245, 0.28);
  background: rgba(5, 20, 34, 0.82);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.1);
  animation: stage1-sa-summary-rise 0.42s ease;
}

@keyframes stage1-sa-summary-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stage1-sa-count-pair {
  color: rgba(150, 210, 240, 0.72);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stage1-sa-mini-arrow {
  color: rgba(130, 220, 255, 0.7);
  font-size: 22px;
  font-weight: 900;
}

.stage1-sa-summary-frac {
  font-size: 38px;
}

.stage1-sa-footer {
  position: static;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 0;
}

.stage1-sa-next-btn {
  min-width: 45px;
  height: 27px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.stage1-sa-panel.is-problem-clear .stage1-sa-next-btn {
  box-shadow: 0 0 14px rgba(78, 212, 255, 0.24);
}

.stage1-sa-seg.is-spark {
  animation: stage1-sa-seg-spark 0.38s ease;
}

@keyframes stage1-sa-seg-spark {
  45% { filter: brightness(1.4); }
}

.stage1-scale-sections {
  display: none;
}

.stage1-scale-wrap {
  padding-bottom: 156px;
}

.stage1-scale-activity {
  display: grid;
  gap: 14px;
  margin-bottom: 8px;
}

.stage1-scale-step-chip {
  display: inline-flex;
  align-self: center;
  justify-self: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(12, 44, 72, 0.88);
  border: 1px solid rgba(126, 226, 255, 0.28);
  color: #8ef5ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.stage1-scale-section-title {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  color: #dffcff;
  letter-spacing: 0.02em;
}

.stage1-scale-problems {
  display: grid;
  gap: 18px;
  margin: 4px 0 6px;
}

.stage1-scale-problem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(126, 226, 255, 0.16);
  font-size: 18px;
  font-weight: 850;
  color: rgba(235, 250, 255, 0.94);
}

.stage1-scale-formula-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stage1-scale-paren {
  color: rgba(142, 245, 255, 0.82);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.stage1-scale-formula-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.stage1-scale-op {
  color: #8ef5ff;
  font-size: 18px;
  font-weight: 950;
}

.stage1-scale-blank-input {
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid rgba(118, 226, 255, 0.62);
  background: rgba(8, 24, 42, 0.92);
  color: #f4fdff;
  font-size: 20px;
  font-weight: 950;
  text-align: center;
  box-shadow:
    inset 0 0 10px rgba(36, 137, 255, 0.12),
    0 0 10px rgba(63, 202, 255, 0.12);
}

.stage1-scale-blank-input:focus-visible {
  outline: none;
  border-color: rgba(154, 240, 255, 0.92);
  box-shadow:
    0 0 0 2px rgba(72, 210, 255, 0.22),
    inset 0 0 12px rgba(36, 137, 255, 0.18);
}

.stage1-scale-blank-input.is-error {
  border-color: rgba(255, 96, 120, 0.92);
  box-shadow: 0 0 14px rgba(255, 72, 104, 0.28);
}

.stage1-scale-blank-input.is-correct {
  border-color: rgba(120, 255, 200, 0.9);
  background: rgba(10, 52, 58, 0.92);
}

.stage1-scale-feedback {
  min-height: 22px;
  margin: 0;
  color: #ffb4c2;
  font-size: 15px;
  font-weight: 850;
}

.stage1-scale-activity .stage1-primary-action {
  justify-self: center;
  min-width: 148px;
}

.stage1-scale-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 800;
  color: rgba(235, 250, 255, 0.92);
}

.stage1-scale-eq {
  color: rgba(126, 226, 255, 0.8);
  font-weight: 900;
}

.stage1-scale-formula-frac {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
  min-width: 52px;
}

.stage1-scale-num,
.stage1-scale-den {
  font-size: 15px;
  font-weight: 900;
  color: #dff9ff;
}

.stage1-scale-bar {
  width: 100%;
  height: 2px;
  background: rgba(142, 245, 255, 0.75);
}

.stage1-swipe-arena {
  position: relative;
  height: 372px;
  padding: 26px 34px 4px;
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
  overflow: hidden;
}

.stage1-swipe-arena::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 86px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(99, 231, 255, 0.86), transparent);
  box-shadow: 0 0 24px rgba(83, 220, 255, 0.58);
  opacity: 0.78;
  animation: stage1-swipe-scan 2.4s ease-in-out infinite;
}

.stage1-swipe-title {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  justify-items: center;
  color: rgba(229, 250, 255, 0.9);
  text-align: center;
}

.stage1-swipe-title span {
  color: #7de9ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.stage1-swipe-title strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(78, 226, 255, 0.54);
}

.stage1-swipe-reference {
  position: absolute;
  left: 26px;
  top: 26px;
  z-index: 3;
  width: 172px;
  min-height: 186px;
  padding: 14px 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background:
    radial-gradient(circle at 18% 0%, rgba(118, 235, 255, 0.22), transparent 58%),
    rgba(5, 18, 32, 0.78);
  border: 1px solid rgba(113, 225, 255, 0.42);
  box-shadow:
    0 0 22px rgba(63, 203, 255, 0.18),
    inset 0 0 20px rgba(43, 157, 255, 0.08);
}

.stage1-swipe-reference > span {
  color: #88ecff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.stage1-swipe-reference em {
  color: rgba(233, 251, 255, 0.76);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.stage1-reference-fraction {
  --fraction-line-gap: 0.18em;
  --fraction-line-height: 2px;
  --fraction-line-width: 1.28em;
  --fraction-number-line-height: 0.9;
  min-width: 108px;
  color: #ffffff;
  font-size: 92px;
  font-weight: 1000;
  margin: 10px 0 12px;
  transform: scale(1.55);
  transform-origin: center;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.38),
    0 0 20px rgba(126, 236, 255, 0.58);
}

.stage1-reference-fraction .fraction-numerator,
.stage1-reference-fraction .fraction-denominator,
.stage1-reference-fraction .eq-fraction-num,
.stage1-reference-fraction .eq-fraction-den {
  font-size: 1.5em;
  font-weight: 1000;
}

.stage1-reference-fraction .fraction-line,
.stage1-reference-fraction .eq-fraction-line {
  height: var(--fraction-line-height);
  width: var(--fraction-line-width);
  margin: var(--fraction-line-gap) 0;
}

.stage1-swipe-particles {
  position: absolute;
  inset: 34px 70px 18px;
  z-index: 0;
  pointer-events: none;
}

.stage1-swipe-particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(103, 228, 255, 0.78);
  box-shadow: 0 0 12px rgba(103, 228, 255, 0.72);
  animation: stage1-data-particle 2.8s linear infinite;
}

.stage1-swipe-particles i:nth-child(1) { left: 10%; top: 12%; animation-delay: 0s; }
.stage1-swipe-particles i:nth-child(2) { left: 82%; top: 18%; animation-delay: -0.7s; }
.stage1-swipe-particles i:nth-child(3) { left: 24%; top: 72%; animation-delay: -1.2s; }
.stage1-swipe-particles i:nth-child(4) { left: 72%; top: 78%; animation-delay: -1.8s; }
.stage1-swipe-particles i:nth-child(5) { left: 45%; top: 18%; animation-delay: -2.1s; }
.stage1-swipe-particles i:nth-child(6) { left: 58%; top: 66%; animation-delay: -2.5s; }

.stage1-swipe-gate {
  display: none;
}

.stage1-swipe-card-slot {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 292px;
  display: grid;
  place-items: center;
}

.stage1-swipe-card {
  position: relative;
  width: 244px;
  height: 286px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 251, 255, 0.98), rgba(167, 223, 247, 0.95)),
    radial-gradient(circle at 50% 0%, rgba(82, 221, 255, 0.36), transparent 46%);
  border: 1px solid rgba(170, 238, 255, 0.86);
  color: #08233e;
  box-shadow:
    0 24px 42px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(65, 207, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  touch-action: none;
  cursor: grab;
  overflow: hidden;
  animation: stage1-card-enter 0.34s ease both;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.stage1-swipe-card::before {
  content: "";
  position: absolute;
  left: -18%;
  right: -18%;
  top: 20%;
  height: 26px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  opacity: 0;
  animation: stage1-card-scan 0.9s ease 0.12s 1;
}

.stage1-swipe-card::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 6px;
  border: 1px solid rgba(12, 68, 102, 0.14);
  pointer-events: none;
}

.stage1-swipe-card > .stage1-card-label {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  color: #306581;
}

.stage1-swipe-card > .stage1-card-status {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  color: rgba(8, 35, 62, 0.72);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.stage1-card-fraction {
  --fraction-line-gap: 0.18em;
  --fraction-line-height: 4px;
  --fraction-line-width: 0.78em;
  --fraction-number-line-height: 0.88;
  position: relative;
  z-index: 1;
  display: inline-grid;
  grid-template-rows: auto auto auto;
  min-width: 1.1em;
  font-size: 68px;
  transform: none;
}

.stage1-card-fraction .fraction-numerator,
.stage1-card-fraction .fraction-denominator,
.stage1-card-fraction .eq-fraction-num,
.stage1-card-fraction .eq-fraction-den {
  font-size: 1em;
  line-height: var(--fraction-number-line-height);
}

.stage1-card-fraction .fraction-line,
.stage1-card-fraction .eq-fraction-line {
  height: var(--fraction-line-height);
  width: var(--fraction-line-width);
  margin: var(--fraction-line-gap) 0;
}

.stage1-swipe-card.dragging {
  cursor: grabbing;
  transition: none;
}

.stage1-swipe-card.toward-save {
  border-color: rgba(85, 222, 255, 0.96);
  box-shadow: 0 22px 42px rgba(0,0,0,0.38), 0 0 36px rgba(57, 204, 255, 0.56);
}

.stage1-swipe-card.toward-delete {
  border-color: rgba(255, 72, 104, 0.96);
  box-shadow: 0 22px 42px rgba(0,0,0,0.38), 0 0 36px rgba(255, 65, 95, 0.52);
}

.stage1-swipe-card.fly-save {
  transform: translate(360px, -150px) rotate(18deg) !important;
  opacity: 0;
  box-shadow: 0 0 42px rgba(69, 220, 255, 0.62);
}

.stage1-swipe-card.fly-delete {
  transform: translate(-360px, 150px) rotate(-18deg) !important;
  opacity: 0;
  filter: saturate(1.35);
  box-shadow: 0 0 42px rgba(255, 64, 96, 0.52);
}

.stage1-swipe-card.swipe-wrong {
  border-color: rgba(255, 78, 105, 0.96);
  animation: stage1-card-wrong 0.28s linear, stage1-card-glitch 0.32s ease;
}

.stage1-swipe-buttons {
  position: relative;
  z-index: 3;
  margin-top: -10px;
  display: flex;
  justify-content: center;
  gap: 26px;
}

.stage1-swipe-buttons .data-action-button {
  min-width: 136px;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 15px;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.stage1-swipe-buttons .data-action-button:hover {
  filter: brightness(1.1);
}

.stage1-swipe-buttons .data-action-button:active {
  transform: translateY(2px) scale(0.98);
}

.stage1-swipe-buttons .data-action-button.delete {
  border-color: rgba(255, 92, 119, 0.62);
  background: linear-gradient(180deg, #ff5874, #aa1733);
  box-shadow: 0 12px 24px rgba(95, 13, 28, 0.35), 0 0 18px rgba(255, 73, 104, 0.35);
}

.stage1-swipe-buttons .data-action-button.save {
  border-color: rgba(96, 226, 255, 0.62);
  background: linear-gradient(180deg, #5ee8ff, #2277f7);
  box-shadow: 0 12px 24px rgba(0, 74, 172, 0.35), 0 0 18px rgba(80, 220, 255, 0.36);
}

.stage1-swipe-buttons .data-action-button.delete.pulse {
  animation: dataButtonPulseDelete 1.1s ease-in-out 2;
}

.stage1-swipe-buttons .data-action-button.save.pulse {
  animation: dataButtonPulseSave 1.1s ease-in-out 2;
}

.stage1-pattern-board-wrap {
  position: relative;
  width: 560px;
  height: 460px;
  margin: 30px auto 0;
}

.stage1-pattern-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.stage1-pattern-line {
  stroke: #4cecff;
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(76, 236, 255, 0.56));
}

.stage1-pattern-board {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 116px);
  grid-template-rows: repeat(3, 116px);
  justify-content: center;
  align-content: center;
  gap: 36px;
}

.stage1-pattern-node {
  border-radius: 50%;
  border: 2px solid rgba(137, 223, 255, 0.34);
  background: radial-gradient(circle at 50% 35%, rgba(43, 96, 136, 0.96), rgba(8, 24, 42, 0.96));
  color: #e8fbff;
  box-shadow: inset 0 0 20px rgba(255,255,255,0.05), 0 0 22px rgba(43, 173, 255, 0.14);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.stage1-pattern-node.active {
  border-color: rgba(105, 245, 255, 0.95);
  background: radial-gradient(circle at 50% 35%, rgba(69, 218, 255, 0.98), rgba(26, 104, 205, 0.96));
  box-shadow: 0 0 28px rgba(72, 220, 255, 0.44);
}

.stage1-pattern-node.wrong {
  border-color: rgba(255, 79, 105, 0.96);
  background: radial-gradient(circle at 50% 35%, rgba(255, 83, 111, 0.96), rgba(90, 17, 32, 0.96));
  animation: stage1-card-wrong 0.28s linear;
}

.stage1-node-fraction {
  transform: scale(1.18);
}

.stage1-pattern-caption {
  margin: -6px 0 0;
  text-align: center;
  color: rgba(235, 250, 255, 0.78);
  font-size: 17px;
  font-weight: 850;
}

.stage1-final-door {
  position: relative;
  width: min(720px, calc(100% - 64px));
  min-height: 420px;
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  gap: 38px;
}

.stage1-open-door {
  position: relative;
  height: 370px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 0 26%, rgba(74, 213, 255, 0.38) 27% 30%, rgba(8, 18, 30, 0.98) 31% 100%);
  border: 1px solid rgba(116, 231, 255, 0.38);
  box-shadow: 0 0 42px rgba(70, 213, 255, 0.22), inset 0 0 34px rgba(0,0,0,0.5);
}

.stage1-open-door span {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 34px;
  font-weight: 950;
  text-shadow: 0 0 16px rgba(78, 225, 255, 0.7);
}

.stage1-blue-beam {
  position: absolute;
  left: 0;
  top: 50%;
  right: 28%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(89, 232, 255, 0.96), transparent);
  filter: blur(1px);
  box-shadow: 0 0 30px rgba(89, 232, 255, 0.8);
  animation: stage1-beam 1.2s ease-in-out infinite;
}

.stage1-final-copy h2 {
  font-size: 54px;
}

.stage1-final-copy p {
  margin: 0;
  color: rgba(236, 252, 255, 0.82);
  font-size: 22px;
  font-weight: 900;
}

.stage1-final-copy strong {
  display: block;
  margin-top: 18px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 950;
  text-shadow: 0 0 18px rgba(83, 225, 255, 0.52);
}

.stage1-action-toast {
  position: absolute;
  left: 50%;
  top: 49%;
  z-index: 20;
  pointer-events: none;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  border-radius: 6px;
  background: rgba(4, 18, 31, 0.92);
  border: 1px solid rgba(123, 231, 255, 0.42);
  color: #eaffff;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0.05em;
  animation: stage1-toast 0.9s ease forwards;
}

.stage1-action-toast.error {
  border-color: rgba(255, 83, 108, 0.58);
  color: #ffdbe1;
  text-shadow: 0 0 10px rgba(255, 62, 96, 0.52);
}

/* Unlock toast visuals live in style/ui.css (.stage-tool-unlock-toast).
   Do not reintroduce size/position rules here — they fought the shared toast. */

@keyframes stage1-toast {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(0.92); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1.04); }
}

@keyframes eq-overlay-bar-merge {
  from { opacity: 1; transform: translateX(var(--overlay-start-x, 0)); }
  to { opacity: var(--overlay-final-opacity, 1); transform: translateX(0); }
}

@keyframes eq-overlay-marker-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes stage1-swipe-scan {
  0% { transform: translateY(0); opacity: 0; }
  18% { opacity: 0.78; }
  50% { transform: translateY(184px); opacity: 1; }
  100% { transform: translateY(286px); opacity: 0; }
}

@keyframes stage1-data-particle {
  0% { opacity: 0; transform: translateY(-18px) scale(0.7); }
  24% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(86px) scale(1.35); }
}

@keyframes stage1-card-enter {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stage1-card-scan {
  0% { opacity: 0; transform: translateY(-84px) rotate(-6deg); }
  24% { opacity: 0.82; }
  100% { opacity: 0; transform: translateY(160px) rotate(-6deg); }
}

@keyframes stage1-card-wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-12px); }
  50% { transform: translateX(12px); }
  75% { transform: translateX(-8px); }
}

@keyframes stage1-card-glitch {
  0%, 100% { filter: none; }
  32% { filter: hue-rotate(-18deg) saturate(1.6); }
  62% { filter: contrast(1.4) saturate(1.8); }
}

@keyframes dataButtonPulseDelete {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 12px 24px rgba(95, 13, 28, 0.35), 0 0 10px rgba(255, 73, 104, 0.28);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 14px 26px rgba(95, 13, 28, 0.38), 0 0 26px rgba(255, 73, 104, 0.72);
  }
}

@keyframes dataButtonPulseSave {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 12px 24px rgba(0, 74, 172, 0.35), 0 0 10px rgba(80, 220, 255, 0.28);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 14px 26px rgba(0, 74, 172, 0.38), 0 0 26px rgba(80, 220, 255, 0.72);
  }
}

@keyframes stage1-uv-clue-wrong {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  24% { transform: translate(calc(-50% - 7px), -50%) scale(1.02); }
  52% { transform: translate(calc(-50% + 7px), -50%) scale(1.02); }
  76% { transform: translate(calc(-50% - 4px), -50%) scale(1.01); }
}

@keyframes stage1-beam {
  0%, 100% { opacity: 0.42; transform: translateX(-8px); }
  50% { opacity: 1; transform: translateX(18px); }
}

@media (max-aspect-ratio: 16 / 9) {
  body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-stage-intro {
    padding-right: calc(var(--eq-shell-gap, 24px) + var(--eq-door-width, 300px) + 16px);
  }

  .stage1-seal-hud strong {
    font-size: 24px;
  }
}

/* =========================
   STAGE 1 TABLET GAME CLEANUP
========================= */

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-bg {
  background-image: url("../assets/images/s1.png") !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.98) saturate(1) contrast(1.02);
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-vignette {
  background:
    radial-gradient(circle at 50% 42%, rgba(52, 171, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.24));
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-door-panel,
body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-seal-panel,
body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-stage-badge,
body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-error {
  display: none !important;
  pointer-events: none !important;
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-mission {
  max-width: 620px;
  min-height: 42px;
  padding: 0 18px;
  background: rgba(6, 16, 28, 0.7);
  border-color: rgba(132, 218, 255, 0.22);
  color: rgba(238, 250, 255, 0.96);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-mission::before {
  content: attr(data-stage-label);
}

body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-stage-intro {
  z-index: 18;
  align-items: center;
  justify-content: center;
  padding: 82px 120px 238px;
  pointer-events: none;
}

.stage1-play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.stage1-seal-shell {
  position: relative;
  width: 880px;
  height: 520px;
  min-height: 520px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 22, 39, 0.96), rgba(3, 10, 21, 0.97)),
    radial-gradient(circle at 50% 0%, rgba(69, 194, 255, 0.14), transparent 45%);
  border: 1px solid rgba(105, 222, 255, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(28, 93, 135, 0.54),
    inset 0 0 48px rgba(41, 154, 255, 0.08),
    0 28px 72px rgba(0, 0, 0, 0.48),
    0 0 36px rgba(54, 205, 255, 0.18);
  overflow: hidden;
  pointer-events: auto;
}

.stage1-seal-shell::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.28;
}

.stage1-seal-hud,
.stage1-hud-meters,
.stage1-hud-dots {
  display: none !important;
}

.stage1-hud-meters {
  display: none !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.stage1-hud-meters span {
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(229, 249, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

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

.stage1-hud-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(225, 241, 248, 0.68);
  letter-spacing: 0.08em;
}

.stage1-hud-dots span {
  padding: 0;
  border: 0;
  font-size: 13px;
}

.stage1-hud-dots .is-on {
  color: #72f7ff;
  text-shadow: 0 0 10px rgba(87, 231, 255, 0.74);
}

.stage1-seal-hud p,
.stage1-system-label {
  display: none;
}

.stage1-seal-body {
  height: 100%;
  min-height: 0;
}

.stage1-tablet-intro {
  height: 100%;
  padding: 42px;
  display: grid;
  place-items: center;
}

.stage1-tablet-boot {
  width: min(620px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.stage1-tablet-boot > span {
  display: block;
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stage1-tablet-boot h2 {
  margin: 14px 0 10px;
  color: #ffedf1;
  font-size: 58px;
  line-height: 1;
  text-shadow: 0 0 22px rgba(255, 74, 106, 0.42);
}

.stage1-tablet-boot p {
  margin: 0;
  color: rgba(230, 248, 255, 0.84);
  font-size: 20px;
  font-weight: 850;
}

.stage1-intro-seal-dots {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin: 24px 0 14px;
  color: #75ecff;
  font-size: 18px;
  text-shadow: 0 0 14px rgba(89, 224, 255, 0.64);
}

.stage1-boot-power {
  display: block;
  margin-bottom: 26px;
  color: rgba(148, 235, 255, 0.9);
  font-size: 15px;
  font-weight: 950;
}

.stage1-primary-action {
  min-width: 174px;
  padding: 12px 20px;
  border-radius: 6px;
}

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

.stage1-fixed-actions button {
  min-width: 86px;
  height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 15px;
  background:
    linear-gradient(180deg, rgba(13, 36, 61, 0.9), rgba(5, 19, 36, 0.94));
  border-color: rgba(115, 226, 255, 0.5);
}

.stage1-seal-shell.stage1-uv-game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.stage1-seal-shell.stage1-uv-game::before {
  display: none;
}

.stage1-uv-game .stage1-seal-body {
  height: 100%;
}

.stage1-uv-field {
  height: 100%;
  min-height: 0;
  background: transparent;
}

.stage1-classroom-silhouette {
  display: none;
}

.stage1-uv-overlay {
  background:
    radial-gradient(
      circle 120px at var(--uv-x) var(--uv-y),
      rgba(120, 230, 255, 0.32) 0%,
      rgba(120, 230, 255, 0.18) 35%,
      rgba(120, 230, 255, 0.06) 65%,
      rgba(0, 0, 0, 0) 100%
    ),
    rgba(0, 0, 0, 0.62);
  mix-blend-mode: multiply;
}

.stage1-uv-field::after {
  width: 240px;
  height: 240px;
}

.stage1-seal-shell.stage1-summary-scene:not(.stage1-summary-amount),
.stage1-seal-shell.stage1-chalkboard-analysis,
.stage1-seal-shell.stage1-swipe-game,
.stage1-seal-shell.stage1-lock-complete,
.stage1-seal-shell.stage1-final-clear {
  width: min(900px, calc(100% - 340px));
  height: clamp(480px, 50vh, 540px);
}

.stage1-seal-shell.stage1-summary-scene.stage1-summary-amount {
  width: 1300px;
  height: clamp(659px, 54.4vh, 736px);
  transform: none;
}

.stage1-seal-shell.stage1-summary-scene.stage1-summary-amount.stage1-same-amount-compact {
  width: 1040px;
  height: 460px;
  max-height: 460px;
}

/* Stage 1-1: Fraction bar recovery device */
.stage1-play-layer.stage1-same-amount-tutorial {
  display: grid;
  place-items: center;
  padding: 0 0 108px;
}

.stage1-seal-shell.stage1-summary-scene.stage1-summary-amount.stage1-same-amount-tutorial,
.stage1-seal-shell.stage1-same-amount-tutorial {
  width: 632px;
  height: 379px;
  min-height: 379px;
  max-height: 379px;
  transform: none;
  transform-origin: center center;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stage1-same-amount-tutorial .stage1-seal-shell::before,
.stage1-seal-shell.stage1-same-amount-tutorial::before {
  display: none;
}

.stage1-same-amount-tutorial .stage1-seal-body {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
}

.stage1-same-amount-tutorial .stage1-summary-wrap.stage1-sa-wrap {
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 0;
}

.stage1-same-amount-tutorial .stage1-summary-panel.stage1-sa-shell {
  width: 632px;
  height: 379px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.stage1-sa-panel.stage1-sa-tutorial {
  width: 100%;
  height: 100%;
  padding: 0;
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.stage1-sa-panel.stage1-sa-tutorial.is-fading-out {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
}

.stage1-sa-panel.stage1-sa-tutorial.is-fading-in {
  animation: stage1-sa-device-in 0.42s ease;
}

@keyframes stage1-sa-device-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stage1-sa-recovery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 16px 22px 14px;
  overflow: visible;
  border: 1px solid rgba(116, 229, 255, 0.48);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(5, 20, 36, 0.84), rgba(3, 12, 24, 0.92)),
    radial-gradient(circle at 50% 0%, rgba(80, 218, 255, 0.15), transparent 60%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -18px 40px rgba(0, 0, 0, 0.26),
    0 0 34px rgba(61, 214, 255, 0.18);
}

.stage1-sa-recovery-card::before,
.stage1-sa-recovery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage1-sa-recovery-card::before {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 9px
    );
  opacity: 0.16;
}

.stage1-sa-recovery-card::after {
  background:
    linear-gradient(115deg, transparent 0 45%, rgba(140, 238, 255, 0.08) 50%, transparent 58%),
    radial-gradient(circle at 16% 88%, rgba(74, 212, 255, 0.13), transparent 24%);
}

.stage1-sa-recovery-card > * {
  position: relative;
  z-index: 1;
}

.stage1-sa-tutorial .stage1-sa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
}

.stage1-sa-tutorial .stage1-sa-compact-title:not(.edu-worksheet-title) {
  margin: 0;
  color: #effcff;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.01em;
  text-shadow: 0 0 16px rgba(103, 225, 255, 0.28);
}

.stage1-sa-tutorial .stage1-sa-problem-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(127, 223, 255, 0.28);
  background: rgba(4, 22, 38, 0.72);
  color: rgba(200, 239, 255, 0.9);
  font-size: 14px;
  font-weight: 900;
}

.stage1-sa-recovery-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  overflow: visible;
  padding: 0;
}

.same-amount-panel.has-summary .stage1-sa-recovery-body {
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding-top: 0;
}

.same-amount-panel.has-summary .stage1-sa-recovery-card {
  padding-bottom: 16px;
}

.stage1-sa-link-stack {
  gap: 10px;
  width: 100%;
}

.stage1-sa-make-stack.stage1-sa-link-stack {
  gap: 10px;
}

.stage1-sa-device-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.stage1-sa-make-stack:not(.stage1-sa-link-stack) {
  gap: 10px;
}

.stage1-sa-write-stack {
  gap: 14px;
}

.stage1-sa-target-zone,
.stage1-sa-write-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stage1-sa-bar-block {
  width: 100%;
  display: flex;
  justify-content: center;
}

.stage1-sa-target-zone {
  gap: 4px;
  margin-top: 0;
  margin-bottom: 0;
  transform: translateY(-22px);
  width: 100%;
  display: flex;
  justify-content: center;
}

.stage1-sa-fraction-explain {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  max-width: 100%;
}

.stage1-sa-fraction-core-wrap {
  position: relative;
  display: inline-block;
  box-sizing: content-box;
}

.stage1-sa-fraction-core {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: #f7fdff;
  font-size: 41px;
  font-weight: 950;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(95, 221, 255, 0.24));
}

.stage1-sa-target-parts,
.stage1-sa-fraction-core.stage1-sa-target-parts {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 4px;
}

.stage1-sa-target-parts .stage1-sa-frac-barline,
.stage1-sa-fraction-core .stage1-sa-frac-barline,
.stage1-sa-target-parts .fraction-line,
.stage1-sa-target-parts .eq-fraction-line,
.stage1-sa-write-core .stage1-sa-frac-line {
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: rgba(230, 250, 255, 0.95);
}

.stage1-sa-frac-label {
  position: absolute;
  left: calc(100% + 4px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  pointer-events: none;
  white-space: nowrap;
}

.stage1-sa-link-stack.is-revealing .stage1-sa-frac-label {
  visibility: visible;
}

.stage1-sa-frac-label.is-num-label {
  top: 2px;
}

.stage1-sa-frac-label.is-den-label {
  bottom: 2px;
}

.stage1-sa-frac-hint-line {
  position: relative;
  display: block;
  width: 10px;
  height: 2px;
  flex-shrink: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(78, 212, 255, 0.35), rgba(140, 240, 255, 0.95));
  box-shadow: 0 0 6px rgba(78, 212, 255, 0.45);
}

.stage1-sa-frac-hint-line::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-top: 2px solid rgba(160, 244, 255, 0.98);
  border-left: 2px solid rgba(160, 244, 255, 0.98);
  transform: translateY(-50%) rotate(-45deg);
}

.stage1-sa-frac-hint-text {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 236, 255, 0.62);
  background: rgba(8, 36, 58, 0.96);
  color: rgba(244, 252, 255, 0.98);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.02em;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(78, 212, 255, 0.24);
}

.stage1-sa-link-stack.is-revealing .stage1-sa-frac-label.is-num-label {
  animation: stage1-sa-hint-in 0.38s ease 0.32s forwards;
}

.stage1-sa-link-stack.is-revealing .stage1-sa-frac-label.is-den-label {
  animation: stage1-sa-hint-in 0.38s ease 0.72s forwards;
}

@keyframes stage1-sa-hint-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.stage1-sa-fraction-core.is-linked .stage1-sa-frac-num,
.stage1-sa-fraction-core.is-linked .stage1-sa-frac-den {
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

.stage1-sa-link-stack.is-revealing .stage1-sa-fraction-core.is-linked .stage1-sa-frac-num {
  animation: stage1-sa-part-glow-num 0.55s ease 0.52s forwards;
}

.stage1-sa-link-stack.is-revealing .stage1-sa-fraction-core.is-linked .stage1-sa-frac-den {
  animation: stage1-sa-part-glow-den 0.55s ease 0.92s forwards;
}

@keyframes stage1-sa-part-glow-num {
  to {
    color: #9af8ff;
    text-shadow: 0 0 18px rgba(78, 212, 255, 0.65);
  }
}

@keyframes stage1-sa-part-glow-den {
  to {
    color: #b8ecff;
    text-shadow: 0 0 16px rgba(120, 210, 255, 0.55);
  }
}

.stage1-sa-tutorial .stage1-sa-target-frac {
  color: #f7fdff;
  font-size: 41px;
  font-weight: 950;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(95, 221, 255, 0.24));
}

.stage1-sa-tutorial .stage1-sa-target-frac .fraction-line,
.stage1-sa-tutorial .stage1-sa-target-frac .eq-fraction-line {
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: rgba(230, 250, 255, 0.95);
}

.stage1-sa-sub-hint {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(126, 226, 255, 0.24);
  background: rgba(6, 29, 48, 0.76);
  color: rgba(211, 246, 255, 0.86);
  font-size: 14px;
  font-weight: 850;
}

.stage1-sa-bar-frame {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.stage1-sa-tutorial .stage1-sa-bar.fraction-strip,
.stage1-sa-bar.fraction-strip {
  --seg-count: 4;
  display: grid;
  grid-template-columns: repeat(var(--seg-count), minmax(0, 1fr));
  width: 358px;
  min-width: 358px;
  max-width: 358px;
  height: 51px;
  min-height: 51px;
  max-height: 51px;
  flex: 0 0 51px;
  overflow: hidden;
  border: 2px solid rgba(116, 226, 255, 0.68);
  border-radius: 10px;
  background: rgba(2, 13, 25, 0.98);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(103, 221, 255, 0.12),
    0 0 20px rgba(73, 211, 255, 0.22);
}

.stage1-sa-tutorial .stage1-sa-seg,
.stage1-sa-seg {
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 2px solid rgba(122, 145, 160, 0.48);
  border-radius: 0;
  background: #E5EBEE;
  box-shadow: none;
  cursor: default;
}

.stage1-sa-tutorial .stage1-sa-seg:last-child,
.stage1-sa-seg:last-child {
  border-right: 0;
}

.stage1-sa-tutorial button.stage1-sa-seg,
button.stage1-sa-seg {
  cursor: pointer;
}

.stage1-sa-tutorial button.stage1-sa-seg:hover:not(.is-fill),
.stage1-sa-tutorial button.stage1-sa-seg:focus-visible:not(.is-fill) {
  background: #D8E3EA;
  box-shadow: inset 0 0 0 1px rgba(74, 159, 210, 0.28);
  outline: none;
}

.stage1-sa-tutorial .stage1-sa-seg.is-fill,
.stage1-sa-seg.is-fill {
  background: linear-gradient(180deg, #a8fbff 0%, #52c6ff 42%, #2393ff 100%);
  border-right-color: rgba(224, 252, 255, 0.82);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.42),
    inset 0 -10px 18px rgba(8, 86, 188, 0.3),
    0 0 18px rgba(78, 212, 255, 0.38);
}

.stage1-sa-seg.is-spark {
  animation: stage1-sa-cell-on 0.38s ease;
}

@keyframes stage1-sa-cell-on {
  0% {
    filter: brightness(0.95);
    transform: scale(0.96);
  }
  54% {
    filter: brightness(1.45);
    transform: scale(1.02);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

.stage1-sa-tutorial .stage1-sa-bar.is-success,
.stage1-sa-bar.is-success {
  border-color: rgba(139, 240, 255, 0.96);
  box-shadow:
    inset 0 0 16px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(112, 232, 255, 0.2),
    0 0 34px rgba(78, 212, 255, 0.42);
}

.stage1-sa-bar.is-flash {
  animation: stage1-sa-bar-flash 0.7s ease;
}

@keyframes stage1-sa-bar-flash {
  0%,
  100% {
    filter: brightness(1);
  }
  48% {
    filter: brightness(1.38);
  }
}

.stage1-sa-write-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.stage1-sa-write-fraction.is-answered .stage1-sa-frac-field,
.stage1-sa-link-stack.is-answered .stage1-sa-frac-field {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  color: #f7fdff;
}

.stage1-sa-confirm-btn.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.stage1-sa-frac-input {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 3px;
}

.stage1-sa-tutorial .stage1-sa-frac-field:not(.edu-blank-input),
.stage1-sa-frac-field:not(.edu-blank-input) {
  width: 66px;
  height: 45px;
  box-sizing: border-box;
  border: 2px solid rgba(132, 226, 255, 0.66);
  border-radius: 10px;
  background: rgba(3, 16, 28, 0.96);
  color: #f4fdff;
  font-size: 26px;
  font-weight: 950;
  text-align: center;
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.32),
    0 0 12px rgba(78, 212, 255, 0.13);
}

.stage1-sa-tutorial .stage1-sa-frac-field:not(.edu-blank-input):focus,
.stage1-sa-frac-field:not(.edu-blank-input):focus {
  outline: none;
  border-color: rgba(165, 246, 255, 0.96);
  box-shadow:
    inset 0 0 14px rgba(64, 190, 255, 0.16),
    0 0 20px rgba(78, 212, 255, 0.28);
}

.stage1-sa-frac-field.is-ok {
  border-color: rgba(112, 255, 194, 0.92);
}

.stage1-sa-frac-field.is-warn {
  border-color: rgba(255, 132, 142, 0.86);
  box-shadow: 0 0 16px rgba(255, 92, 112, 0.22);
}

.stage1-sa-tutorial .stage1-sa-frac-line,
.stage1-sa-frac-line {
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: rgba(225, 250, 255, 0.94);
}

.stage1-sa-confirm-btn {
  min-width: 72px;
  height: 38px;
  border: 1px solid rgba(126, 226, 255, 0.55);
  border-radius: 10px;
  background: linear-gradient(180deg, #7ceeff, #37afff);
  color: #061828;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(32, 148, 255, 0.24);
  flex-shrink: 0;
}

.stage1-sa-confirm-btn:hover:not(:disabled),
.stage1-sa-confirm-btn:focus-visible:not(:disabled) {
  filter: brightness(1.08);
  outline: none;
}

.stage1-sa-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.stage1-sa-tutorial button.stage1-sa-seg:disabled {
  cursor: default;
  opacity: 1;
}

/* Stage 1-1: 분수 막대 복구 — 분수 숫자 옆 라벨 */

.stage1-sa-footer {
  position: absolute;
  right: 22px;
  bottom: 12px;
  left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  margin: 0;
  z-index: 3;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.stage1-sa-recap-body {
  gap: 14px;
  padding: 8px 14px 44px;
  justify-content: center;
}

.stage1-sa-recap-lead {
  margin: 2px 0 0;
  color: rgba(198, 238, 255, 0.92);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  letter-spacing: -0.01em;
  max-width: 500px;
}

.stage1-sa-recap-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: auto;
  margin: 8px auto 0;
}

.stage1-sa-recap-row {
  display: grid;
  grid-template-columns: 76px 358px;
  align-items: center;
  column-gap: 18px;
}

.stage1-sa-recap-row .stage1-sa-fraction-explain.is-compact {
  justify-content: center;
  width: 76px;
}

.stage1-sa-recap-row .stage1-sa-fraction-explain.is-compact .stage1-sa-fraction-core,
.stage1-sa-recap-row .stage1-sa-fraction-explain.is-compact .tm-frac {
  font-size: var(--stage1-sa-frac-num-size, 30px);
  gap: 2px;
}

.stage1-sa-recap-row .stage1-sa-fraction-explain.is-compact .stage1-sa-frac-barline,
.stage1-sa-recap-row .stage1-sa-fraction-explain.is-compact .tm-bar {
  width: 34px;
  height: 3px;
}

.stage1-sa-recap-row .stage1-sa-bar.fraction-strip {
  width: 358px;
  min-width: 358px;
  max-width: 358px;
  justify-self: start;
}

.stage1-sa-recap-panel .stage1-sa-recovery-card {
  padding: 18px 24px 16px;
}

.stage1-sa-recap-panel .stage1-sa-header {
  min-height: 38px;
  margin-bottom: 6px;
}

.stage1-sa-recap-panel .stage1-sa-footer {
  bottom: 14px;
  right: 20px;
}

/* 문제 3 — 2/4·3/6 기준 맞추기 + 정리 */
.stage1-sa-p3-panel .stage1-sa-recovery-body {
  gap: 10px;
  padding: 4px 10px 42px;
}

.stage1-sa-match-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.stage1-sa-match-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: auto;
  margin: 4px auto 0;
}

.stage1-sa-match-row {
  display: grid;
  grid-template-columns: 88px 358px;
  grid-template-rows: auto;
  align-items: center;
  height: auto;
  min-height: 67px;
  max-height: none;
  column-gap: 18px;
}

.stage1-sa-match-row .stage1-sa-fraction-explain.is-compact,
.stage1-sa-match-row .stage1-sa-match-frac {
  justify-content: center;
  width: 88px;
  height: 67px;
  align-self: center;
}

.stage1-sa-match-row .stage1-sa-bar.fraction-strip {
  align-self: center;
}

.stage1-sa-match-row .stage1-sa-fraction-explain.is-compact .stage1-sa-fraction-core,
.stage1-sa-match-row .stage1-sa-match-frac .stage1-sa-fraction-core,
.stage1-sa-match-row .stage1-sa-fraction-explain.is-compact .tm-frac,
.stage1-sa-match-row .stage1-sa-match-frac .tm-frac {
  font-size: var(--stage1-sa-frac-num-size, 30px);
  gap: 1px;
  line-height: 1;
}

.stage1-sa-match-row .stage1-sa-fraction-explain.is-compact .stage1-sa-frac-barline,
.stage1-sa-match-row .stage1-sa-match-frac .stage1-sa-frac-barline,
.stage1-sa-match-row .stage1-sa-fraction-explain.is-compact .tm-bar,
.stage1-sa-match-row .stage1-sa-match-frac .tm-bar {
  width: 30px;
  height: 2px;
  margin: 0;
}

.stage1-sa-match-row .stage1-sa-match-write-core,
.stage1-sa-match-row .stage1-sa-match-write-core.tm-frac {
  display: grid;
  grid-template-rows: auto 2px auto;
  justify-items: center;
  align-content: center;
  gap: 1px;
  height: auto;
  min-height: 0;
}

.stage1-sa-match-row .stage1-sa-match-frac-field,
.stage1-sa-match-row .stage1-sa-match-frac-field.numerator-input,
.stage1-sa-match-row .stage1-sa-match-frac-field.denominator-input {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 2px solid rgba(132, 226, 255, 0.58);
  border-radius: 7px;
  background: rgba(3, 16, 28, 0.9);
  color: #9af8ff;
  font-size: var(--stage1-sa-frac-num-size, 30px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(78, 212, 255, 0.14);
}

.stage1-sa-match-row .stage1-sa-match-frac-field:focus-visible {
  outline: none;
  border-color: rgba(154, 240, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(72, 210, 255, 0.24),
    inset 0 0 10px rgba(36, 137, 255, 0.18);
}

.stage1-sa-match-row .stage1-sa-match-write-core .stage1-sa-frac-line,
.stage1-sa-match-row .stage1-sa-match-write-core .tm-bar {
  width: 40px;
  height: 2px;
  margin: 0;
  border-radius: 999px;
  background: rgba(210, 245, 255, 0.92);
}

.stage1-sa-match-row.is-fraction-complete .stage1-sa-match-frac-field {
  border-color: rgba(120, 255, 200, 0.9);
  background: rgba(10, 52, 58, 0.92);
  color: #9af8ff;
  opacity: 1;
  -webkit-text-fill-color: #9af8ff;
  box-shadow: 0 0 12px rgba(72, 220, 170, 0.24);
}

.stage1-sa-match-row .stage1-sa-frac-num.is-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 34px;
  height: 30px;
  min-width: 34px;
  min-height: 30px;
  border: 2px solid rgba(132, 226, 255, 0.58);
  border-radius: 7px;
  background: rgba(3, 16, 28, 0.9);
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(78, 212, 255, 0.14);
  color: transparent;
}

.stage1-sa-match-row.is-color-complete .stage1-sa-frac-num {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.stage1-sa-match-row .stage1-sa-bar.fraction-strip {
  width: 358px;
  min-width: 358px;
  max-width: 358px;
  justify-self: start;
}

.stage1-sa-match-row.is-interactive .stage1-sa-bar {
  border-color: rgba(139, 240, 255, 0.82);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(112, 232, 255, 0.16),
    0 0 22px rgba(78, 212, 255, 0.28);
}

.stage1-sa-match-row.is-interactive .stage1-sa-bar.is-active-bar {
  border-color: rgba(74, 200, 255, 0.72);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(74, 200, 255, 0.45),
    0 0 18px rgba(74, 200, 255, 0.45);
  animation: stage1-sa-active-bar-pulse 1.4s ease-in-out infinite;
}

@keyframes stage1-sa-active-bar-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

.stage1-sa-match-row.is-interactive .stage1-sa-bar.is-active-bar .stage1-sa-seg:not(.is-fill):hover {
  filter: brightness(1.15);
}

.stage1-sa-match-row.is-interactive.is-p3-success .stage1-sa-bar,
.stage1-sa-match-row.is-interactive.is-p3-success .stage1-sa-bar.is-p3-bar-glow {
  border-color: rgba(120, 255, 220, 0.78);
  box-shadow:
    inset 0 0 18px rgba(78, 212, 255, 0.18),
    0 0 0 2px rgba(72, 220, 170, 0.32),
    0 0 28px rgba(78, 212, 255, 0.42);
}

.stage1-sa-match-row .stage1-sa-match-frac-field.numerator-input,
.stage1-sa-match-row .stage1-sa-match-frac-field.denominator-input {
  width: 40px;
  height: 40px;
  font-size: var(--stage1-sa-frac-num-size, 30px);
}

.stage1-sa-match-row .stage1-sa-match-frac-field:not(:disabled) {
  color: #9af8ff;
  opacity: 1;
  -webkit-text-fill-color: #9af8ff;
}

.stage1-sa-match-row .stage1-sa-match-frac-field.is-ok,
.stage1-sa-match-row .stage1-sa-match-frac-field.correct,
.stage1-sa-match-row .stage1-sa-match-frac-field[readonly],
.stage1-sa-match-row .stage1-sa-match-frac-field.is-warn {
  opacity: 1;
  color: #9af8ff;
  -webkit-text-fill-color: #9af8ff;
}

.stage1-sa-match-row .stage1-sa-match-frac-field:disabled {
  opacity: 0.45;
  border-color: rgba(132, 226, 255, 0.28);
  background: rgba(3, 16, 28, 0.55);
  color: rgba(154, 248, 255, 0.42);
  -webkit-text-fill-color: rgba(154, 248, 255, 0.42);
  cursor: not-allowed;
  box-shadow: none;
}

.stage1-sa-match-row .stage1-sa-match-frac-field.is-shake {
  animation: stage1-sa-input-shake 0.42s ease-in-out;
}

@keyframes stage1-sa-input-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-7px);
  }
  30% {
    transform: translateX(7px);
  }
  45% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
  90% {
    transform: translateX(3px);
  }
}

.stage1-sa-match-row.is-interactive.is-color-complete .stage1-sa-frac-num {
  color: #9af8ff;
  text-shadow: 0 0 14px rgba(78, 212, 255, 0.55);
}

.stage1-sa-p3-panel .stage1-sa-footer {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage1-sa-p3-panel.is-p3-recap-ready .stage1-sa-p3-recap-footer {
  right: 20px;
  bottom: 14px;
  animation: stage1-sa-footer-in 0.38s ease forwards;
}

.stage1-sa-p3-panel:not(.is-p3-recap-ready) .stage1-sa-footer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.stage1-sa-p3-panel:not(.is-problem-clear) .stage1-sa-next-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.stage1-seal-shell.stage1-same-amount-tutorial.stage1-sa-p3-active,
.stage1-same-amount-tutorial .stage1-summary-panel.stage1-sa-shell.stage1-sa-shell--p3 {
  width: 720px;
  height: 432px;
  min-height: 432px;
  max-height: 432px;
}

/* 같은 양 찾기 정리 장면 — 박스만 약 14% 확대 */
.stage1-seal-shell.stage1-same-amount-tutorial.stage1-sa-recap-active,
.stage1-same-amount-tutorial .stage1-summary-panel.stage1-sa-shell.stage1-sa-shell--recap {
  width: 720px;
  height: 432px;
  min-height: 432px;
  max-height: 432px;
}

.same-amount-panel.is-problem-clear .stage1-sa-footer {
  animation: stage1-sa-footer-in 0.38s ease forwards;
  pointer-events: auto;
}

@keyframes stage1-sa-footer-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stage1-sa-next-btn {
  min-width: 45px;
  width: auto;
  height: 27px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.stage1-sa-panel.is-problem-clear .stage1-sa-next-btn {
  box-shadow: 0 0 10px rgba(78, 212, 255, 0.24);
}

.stage1-same-amount-tutorial .stage1-sa-next-btn,
.stage1-same-amount-tutorial .stage1-primary-action.stage1-sa-next-btn {
  min-width: 45px;
  width: auto;
  height: 27px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
}

/* 같은 양 찾기 정리 → 아이템 바 안내 */
.stage1-sa-item-guide-layer {
  position: absolute;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.stage1-sa-item-guide-dim {
  position: absolute;
  inset: 0;
  z-index: 1000;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.stage1-sa-item-guide-next {
  position: absolute;
  left: 36px;
  /* 5칸 아이템창(top:50% + translateY(-50%), 약 280px 높이) 바로 아래 */
  top: calc(50% + 146px);
  bottom: auto;
  transform: none;
  z-index: 1003;
  pointer-events: auto;
  width: calc(var(--eq-inventory-width, 68px) + 10px);
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 950;
  box-shadow:
    0 0 16px rgba(73, 211, 255, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.stage1-sa-item-guide-next.is-activity-locked,
.stage1-sa-item-guide-next[aria-disabled="true"] {
  opacity: 0.55;
  filter: grayscale(0.25);
  cursor: pointer;
  box-shadow:
    0 0 8px rgba(73, 211, 255, 0.2),
    0 6px 12px rgba(0, 0, 0, 0.2);
}

.stage1-sa-item-guide-next.is-activity-locked:hover,
.stage1-sa-item-guide-next[aria-disabled="true"]:hover {
  filter: grayscale(0.25);
  transform: none;
}

body.stage1-ui-active .eq-stage-screen.stage1-sa-item-guide-active .eq-tool-input-panel,
body.stage1-ui-active .eq-stage-screen.stage1-sa-item-guide-active .eq-tool-analysis-panel {
  z-index: 1005;
}

body.stage1-ui-active .eq-stage-screen.stage1-sa-item-guide-active .eq-toolbox.stage1-sa-item-bar-highlight {
  position: absolute;
  z-index: 1002;
  opacity: 1;
  filter: brightness(1.25);
  transform: translateY(-50%) scale(1.03);
  border-color: rgba(136, 237, 255, 0.82);
  box-shadow:
    0 0 20px rgba(80, 220, 255, 0.8),
    0 0 36px rgba(73, 211, 255, 0.45),
    0 18px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  pointer-events: auto;
}

body.stage1-ui-active .eq-stage-screen.stage1-sa-item-guide-active .eq-toolbox-title {
  color: #eafcff;
  text-shadow: 0 0 12px rgba(88, 220, 255, 0.45);
}

body.stage1-ui-active .eq-stage-screen.stage1-sa-item-guide-active .eq-tool-slot.stage1-sa-item-guide-focus {
  animation: stage1-sa-item-guide-pulse 1.1s ease-in-out infinite;
}

/* 분수 막대 복구 진입 — 로복 질문 단독 버튼 깜빡임 (레거시 툴박스 셀렉터 유지) */
body.stage1-ui-active .eq-toolbox .eq-tool-btn.stage1-sa-question-intro-focus,
#robok-ask-btn.stage1-sa-question-intro-focus {
  animation: stage1-sa-question-intro-blink 1.05s ease-in-out infinite;
  border-color: rgba(136, 237, 255, 0.88);
  filter: brightness(1.18);
}

@keyframes stage1-sa-question-intro-blink {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(122, 230, 255, 0.34),
      0 0 14px rgba(73, 211, 255, 0.55),
      0 10px 18px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
    opacity: 1;
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(160, 245, 255, 0.85),
      0 0 28px rgba(96, 228, 255, 0.95),
      0 12px 22px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
    opacity: 0.72;
  }
}

@keyframes stage1-sa-item-guide-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(122, 230, 255, 0.34),
      0 0 22px rgba(73, 211, 255, 0.82),
      0 12px 22px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(160, 245, 255, 0.72),
      0 0 34px rgba(96, 228, 255, 0.95),
      0 14px 26px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.stage1-sa-panel.is-item-guide-mode .stage1-sa-recovery-body,
.stage1-sa-panel.is-item-guide-mode .stage1-sa-header {
  opacity: 0.42;
  pointer-events: none;
}

.stage1-sa-panel.is-item-guide-mode .stage1-sa-footer {
  display: none;
}

.stage1-seal-shell.stage1-sa-item-guide-active {
  pointer-events: none;
}

body.stage1-ui-active .eq-stage-screen.stage1-sa-item-guide-active #stage-intro {
  pointer-events: none;
}

.stage1-swipe-arena {
  height: 354px;
  padding: 22px 26px 0;
}

.stage1-swipe-card-slot {
  min-height: 276px;
}

.stage1-swipe-card {
  width: 230px;
  height: 270px;
}

.stage1-swipe-buttons {
  margin-top: -8px;
  gap: 20px;
}

.stage1-swipe-buttons .data-action-button {
  min-width: 126px;
  height: 44px;
}

.stage1-pattern-board-wrap {
  width: 520px;
  height: 410px;
  margin-top: 20px;
}

.stage1-pattern-board {
  grid-template-columns: repeat(3, 106px);
  grid-template-rows: repeat(3, 106px);
  gap: 30px;
}

@media (max-aspect-ratio: 16 / 9) {
  body.stage1-ui-active .eq-stage-screen[data-object-kind="triple-seal"] .eq-stage-intro {
    padding: 76px 92px 228px;
  }

  .stage1-seal-hud {
    right: 92px;
  }
}
/* Larger Stage 1 tool panels for classroom display readability. */
body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel):not(.eq-question-tool-panel) {
  width: min(400px, calc(100% - 156px));
  max-width: 400px;
  padding: 12px 16px 16px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel):not(.eq-question-tool-panel) .eq-tool-panel-title-wrap strong {
  font-size: 23px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel):not(.eq-question-tool-panel) .fraction-input {
  width: 66px;
  height: 39px;
  border-radius: 10px;
  font-size: 21px;
  line-height: 39px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel):not(.eq-question-tool-panel) .fraction-input-line {
  width: 96px;
  height: 3px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel):not(.eq-question-tool-panel) .eq-tool-panel-submit {
  width: 156px;
  height: 45px;
  font-size: 17px;
}

body.stage1-ui-active .eq-question-tool-panel {
  width: min(400px, calc(100% - 156px));
  max-width: 400px;
  padding: 12px 16px 16px;
}

body.stage1-ui-active .eq-question-tool-panel .eq-tool-panel-title-wrap strong {
  font-size: 18px;
  white-space: normal;
}

body.stage1-ui-active .eq-question-tool-panel .eq-question-submit {
  width: 156px;
  max-width: 156px;
  height: 45px;
  font-size: 17px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel) .eq-tool-panel-preview {
  min-height: 150px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel) .eq-analysis-fraction-bar {
  width: 264px;
  height: 42px;
}

body.stage1-ui-active .eq-tool-input-panel:not(.eq-math-tool-panel) .eq-analysis-circle-model {
  width: 108px;
  height: 108px;
}

body.stage1-ui-active .eq-math-tool-panel {
  width: min(400px, calc(100% - 156px));
  max-width: 400px;
  padding: 12px 16px 16px;
}

body.stage1-ui-active .eq-math-tool-panel .eq-tool-panel-title-wrap strong {
  font-size: 23px;
}

body.stage1-ui-active .eq-math-tool-panel .eq-math-fraction-input > span:first-child {
  font-size: 15px;
}

body.stage1-ui-active .eq-math-tool-panel .fraction-input {
  width: 66px;
  height: 39px;
  border-radius: 10px;
  font-size: 21px;
  line-height: 39px;
}

body.stage1-ui-active .eq-math-tool-panel .fraction-input-line {
  width: 96px;
  height: 3px;
}

body.stage1-ui-active .eq-math-tool-panel .eq-math-result {
  min-height: 132px;
  margin-top: 12px;
  padding: 12px;
}

body.stage1-ui-active .eq-math-tool-panel .eq-math-result-title {
  font-size: 16px;
}

body.stage1-ui-active .eq-math-tool-panel .eq-math-result p,
body.stage1-ui-active .eq-math-tool-panel .eq-math-process {
  font-size: 15px;
}

body.stage1-ui-active .eq-math-tool-panel .eq-math-result .eq-fraction {
  min-width: 42px;
  font-size: 20px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="reduce"] .eq-math-inputs.single {
  width: 265px;
  margin-top: 10px;
  margin-right: auto;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="reduce"] .eq-math-submit {
  position: absolute;
  right: 58px;
  top: 134px;
  width: 156px;
  height: 45px;
  margin: 0 !important;
  font-size: 17px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="common"] .eq-math-inputs {
  grid-template-columns: 1fr 1fr;
  gap: 140px;
  margin-top: 10px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="common"] .eq-math-submit {
  position: absolute;
  left: 50%;
  top: 150px;
  width: 156px;
  height: 45px;
  margin: 0 !important;
  transform: translateX(-50%);
  font-size: 17px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="common"] .eq-math-result {
  margin-top: 72px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="common"] .eq-math-common-results {
  gap: 12px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="common"] .eq-math-common-results > div {
  padding: 10px;
}

body.stage1-ui-active .eq-math-tool-panel[data-tool-id="common"] .eq-math-common-results > div > span {
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════
   Stage 1-1 (stage=1-1): 밝은 교과서 카드형 문제 박스
   ═══════════════════════════════════════════════════════════ */

.stage1-seal-shell.stage1-summary-scene.stage1-summary-amount.stage1-same-amount-tutorial,
.stage1-seal-shell.stage1-same-amount-tutorial {
  width: 700px;
  height: 420px;
  min-height: 420px;
  max-height: 420px;
}

.stage1-same-amount-tutorial .stage1-summary-panel.stage1-sa-shell {
  width: 700px;
  height: 420px;
}

.stage1-same-amount-tutorial .stage1-sa-recovery-card {
  padding: 22px 28px 18px;
  color: var(--edu-worksheet-text-color);
  font-family: var(--edu-worksheet-font);
}

.stage1-same-amount-tutorial .stage1-sa-recovery-card::before,
.stage1-same-amount-tutorial .stage1-sa-recovery-card::after {
  display: none;
}

.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-header {
  min-height: 44px;
  padding: 0 2px;
  margin-bottom: 4px;
}

.stage1-same-amount-tutorial .stage1-sa-compact-title,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-compact-title.edu-worksheet-title {
  color: var(--edu-worksheet-title-color);
  font-size: var(--edu-worksheet-title-size);
  font-weight: var(--edu-worksheet-title-weight);
  letter-spacing: var(--edu-worksheet-title-letter-spacing);
  text-shadow: none;
}

.stage1-same-amount-tutorial .stage1-sa-problem-label {
  height: 32px;
  padding: 0 14px;
  background: rgba(235, 247, 255, 0.95);
  color: #0b5ea8;
  border: 1px solid rgba(120, 190, 240, 0.9);
  box-shadow: none;
}

.stage1-same-amount-tutorial .stage1-sa-guide-text {
  margin: 8px 0 0;
  padding: 0 8px;
  color: #20344f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  letter-spacing: -0.01em;
  max-width: 520px;
}

.stage1-same-amount-tutorial {
  --stage1-sa-frac-num-size: 30px;
}

.stage1-same-amount-tutorial .stage1-sa-target-zone {
  transform: translateY(-10px);
  gap: 2px;
}

.stage1-same-amount-tutorial .stage1-sa-fraction-core,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-target-frac {
  color: #0d1f35;
  filter: none;
  text-shadow: none;
}

.stage1-same-amount-tutorial .textbook-math,
.stage1-same-amount-tutorial .textbook-math.textbook-math--inherit,
.stage1-same-amount-tutorial .textbook-math.textbook-math--compact,
.stage1-same-amount-tutorial .textbook-math.textbook-math--worksheet {
  color: #0d1f35;
  font-size: var(--stage1-sa-frac-num-size, 30px);
  font-weight: 950;
  filter: none;
  text-shadow: none;
}

.stage1-same-amount-tutorial .textbook-math .tm-num,
.stage1-same-amount-tutorial .textbook-math .tm-den,
.stage1-same-amount-tutorial .textbook-math .tm-num.stage1-sa-frac-num,
.stage1-same-amount-tutorial .textbook-math .tm-den.stage1-sa-frac-den {
  color: #0d1f35;
  font-size: var(--stage1-sa-frac-num-size, 30px);
  font-weight: 950;
  text-shadow: none;
}

.stage1-same-amount-tutorial .textbook-math .tm-bar,
.stage1-same-amount-tutorial .textbook-math .tm-bar.stage1-sa-frac-barline {
  background: #0d1f35;
  opacity: 1;
}

.stage1-same-amount-tutorial .stage1-sa-frac-num,
.stage1-same-amount-tutorial .stage1-sa-frac-den,
.stage1-same-amount-tutorial .eq-fraction-num,
.stage1-same-amount-tutorial .eq-fraction-den,
.stage1-same-amount-tutorial .stage1-sa-fraction-core,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-answer-input {
  font-size: var(--stage1-sa-frac-num-size);
  line-height: 1;
}

.stage1-same-amount-tutorial .stage1-sa-frac-num,
.stage1-same-amount-tutorial .stage1-sa-frac-den,
.stage1-same-amount-tutorial .eq-fraction-num,
.stage1-same-amount-tutorial .eq-fraction-den {
  color: #0d1f35;
  text-shadow: none;
}

/* 문제1 목표 분수(.stage1-sa-target-zone)만 40px — tutorial 공통 규칙·textbook-math 뒤에 적용 */
.stage1-same-amount-tutorial .stage1-sa-target-zone .textbook-math.textbook-math--game {
  --math-fs: 40px;
  font-size: 40px;
}

.stage1-same-amount-tutorial .stage1-sa-target-zone .textbook-math.textbook-math--game .tm-num.stage1-sa-frac-num,
.stage1-same-amount-tutorial .stage1-sa-target-zone .textbook-math.textbook-math--game .tm-den.stage1-sa-frac-den,
.stage1-same-amount-tutorial .stage1-sa-target-zone .textbook-math.textbook-math--game .tm-num,
.stage1-same-amount-tutorial .stage1-sa-target-zone .textbook-math.textbook-math--game .tm-den {
  font-size: 40px;
}

.stage1-same-amount-tutorial .stage1-sa-frac-barline,
.stage1-same-amount-tutorial .stage1-sa-fraction-core .fraction-line,
.stage1-same-amount-tutorial .stage1-sa-fraction-core .eq-fraction-line,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-target-frac .fraction-line,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-target-frac .eq-fraction-line,
.stage1-same-amount-tutorial .stage1-sa-write-core .stage1-sa-frac-line {
  background: #0d1f35;
  box-shadow: none;
}

.stage1-same-amount-tutorial .stage1-sa-frac-hint-line {
  background: linear-gradient(90deg, rgba(14, 116, 178, 0.35), rgba(14, 165, 233, 0.95));
  box-shadow: none;
}

.stage1-same-amount-tutorial .stage1-sa-frac-hint-line::before {
  border-color: rgba(14, 165, 233, 0.95);
}

.stage1-same-amount-tutorial .stage1-sa-frac-hint-text {
  border: 1px solid rgba(120, 190, 240, 0.75);
  background: rgba(235, 247, 255, 0.98);
  color: #0b5ea8;
  box-shadow: 0 2px 8px rgba(14, 116, 178, 0.12);
}

.stage1-same-amount-tutorial .stage1-sa-link-stack.is-revealing .stage1-sa-fraction-core.is-linked .stage1-sa-frac-num {
  animation: stage1-sa-part-glow-num-light 0.55s ease 0.52s forwards;
}

.stage1-same-amount-tutorial .stage1-sa-link-stack.is-revealing .stage1-sa-fraction-core.is-linked .stage1-sa-frac-den {
  animation: stage1-sa-part-glow-den-light 0.55s ease 0.92s forwards;
}

@keyframes stage1-sa-part-glow-num-light {
  to {
    color: #0284c7;
    text-shadow: none;
  }
}

@keyframes stage1-sa-part-glow-den-light {
  to {
    color: #0369a1;
    text-shadow: none;
  }
}

.stage1-same-amount-tutorial .stage1-sa-bar.fraction-strip,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-bar.fraction-strip {
  background: rgba(235, 246, 255, 0.9);
  border: 2px solid rgba(58, 128, 172, 0.95);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    0 0 12px rgba(50, 140, 190, 0.28);
}

.stage1-same-amount-tutorial .stage1-sa-seg,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-seg {
  border-right: 1px solid rgba(100, 125, 142, 0.72);
  background: #E5EBEE;
  box-shadow: none;
}

.stage1-same-amount-tutorial button.stage1-sa-seg:hover:not(.is-fill),
.stage1-same-amount-tutorial button.stage1-sa-seg:focus-visible:not(.is-fill) {
  background: #D8E3EA;
  box-shadow: inset 0 0 0 1px rgba(74, 159, 210, 0.28);
}

.stage1-same-amount-tutorial .stage1-sa-seg.is-fill,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-seg.is-fill {
  background: linear-gradient(180deg, #7cecff 0%, #25bdf4 50%, #1499dd 100%);
  border-right-color: rgba(200, 240, 255, 0.85);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.55),
    0 0 14px rgba(70, 210, 255, 0.5);
}

.stage1-same-amount-tutorial .stage1-sa-bar.is-success,
.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-bar.is-success {
  border-color: rgba(56, 189, 248, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    0 0 20px rgba(70, 190, 255, 0.45);
}

.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-frac-field:not(.edu-blank-input) {
  color: #0d1f35;
  border: 2px solid rgba(120, 190, 240, 0.85);
  background: #ffffff;
}

.stage1-same-amount-tutorial .stage1-sa-tutorial .stage1-sa-frac-field:not(.edu-blank-input)::placeholder {
  color: rgba(100, 140, 180, 0.45);
}

.stage1-same-amount-tutorial .stage1-sa-confirm-btn {
  border: 1px solid rgba(120, 190, 240, 0.85);
  background: rgba(235, 247, 255, 0.95);
  color: #0b5ea8;
}

.stage1-same-amount-tutorial .stage1-sa-confirm-btn:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.95);
  background: #e0f2fe;
  box-shadow: 0 2px 10px rgba(70, 190, 255, 0.2);
}

.stage1-same-amount-tutorial .stage1-sa-sub-hint {
  border: 1px solid rgba(120, 190, 240, 0.55);
  background: rgba(235, 247, 255, 0.92);
  color: #20344f;
}

.stage1-same-amount-tutorial .stage1-sa-recap-lead {
  color: #20344f;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.numerator-input,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.denominator-input {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  font-size: var(--stage1-sa-frac-num-size);
  font-weight: 900;
  line-height: 1;
  color: #0d2744;
  border: 2px solid rgba(90, 180, 240, 0.95);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 8px rgba(80, 190, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field:not(:disabled) {
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.is-ok,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.correct,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field[readonly] {
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field:focus-visible {
  border-color: #35c9ff;
  box-shadow:
    0 0 0 3px rgba(53, 201, 255, 0.22),
    0 0 14px rgba(53, 201, 255, 0.35);
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-write-core .stage1-sa-frac-line {
  width: 40px;
  height: 2px;
  margin: 0;
  background: #0d2744;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-write-core,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-write-core.tm-frac {
  gap: 0;
  height: auto;
  min-height: 0;
  align-content: start;
  --near-bar-gap: 0;
  --blank-near-bar-gap: 0;
  --expr-near-bar-gap: 0;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-write-core.tm-frac .tm-num,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-write-core.tm-frac .tm-den {
  padding-top: 0;
  padding-bottom: 0;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.is-ok,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.correct {
  border-color: #45d8ff;
  background: rgba(230, 250, 255, 0.98);
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
  box-shadow:
    0 0 0 3px rgba(69, 216, 255, 0.2),
    0 0 18px rgba(69, 216, 255, 0.5);
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.is-warn {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(255, 251, 235, 0.98);
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.14),
    0 0 12px rgba(245, 158, 11, 0.18);
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.edu-blank-input,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.edu-blank-input.numerator-input,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac-field.edu-blank-input.denominator-input {
  box-sizing: border-box;
}

.stage1-same-amount-tutorial .stage1-sa-match-row.is-interactive .stage1-sa-match-frac-field.edu-blank-input:disabled:not([readonly]) {
  opacity: 0.45;
}

.stage1-same-amount-tutorial .stage1-sa-match-row.is-interactive .stage1-sa-bar.is-active-bar {
  border-color: rgba(53, 201, 255, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 0 0 2px rgba(74, 200, 255, 0.38),
    0 0 18px rgba(53, 201, 255, 0.38);
  animation: stage1-sa-active-bar-pulse 1.4s ease-in-out infinite;
}

.stage1-same-amount-tutorial .stage1-sa-match-row.is-interactive .stage1-sa-bar.is-active-bar .stage1-sa-seg:not(.is-fill):hover {
  filter: brightness(1.08);
  background: rgba(186, 230, 253, 0.95);
}

.stage1-same-amount-tutorial .stage1-sa-match-row.is-interactive.is-p3-success .stage1-sa-bar,
.stage1-same-amount-tutorial .stage1-sa-match-row.is-interactive.is-p3-success .stage1-sa-bar.is-p3-bar-glow {
  border-color: rgba(69, 216, 255, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 0 0 3px rgba(69, 216, 255, 0.22),
    0 0 24px rgba(53, 201, 255, 0.42);
}

.stage1-same-amount-tutorial .stage1-sa-p3-panel .stage1-sa-recovery-card.is-shake-wrong {
  animation: stage1-sa-card-shake 0.42s ease-in-out;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-frac-num.is-placeholder {
  border: 2px solid rgba(120, 190, 240, 0.75);
  background: #ffffff;
  color: #0d1f35;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-fraction-explain.is-compact .stage1-sa-fraction-core,
.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-frac .stage1-sa-fraction-core {
  font-size: var(--stage1-sa-frac-num-size);
}

.stage1-same-amount-tutorial .stage1-sa-match-row.is-fraction-complete .stage1-sa-match-frac-field {
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
}

.stage1-same-amount-tutorial .stage1-sa-recovery-body {
  gap: 14px;
  padding: 4px 0 8px;
}

.stage1-same-amount-tutorial .stage1-sa-device-stack {
  gap: 14px;
}

.stage1-same-amount-tutorial .stage1-sa-next-btn,
.stage1-same-amount-tutorial .stage1-primary-action.stage1-sa-next-btn {
  border: 1px solid rgba(120, 190, 240, 0.9);
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.stage1-same-amount-tutorial .stage1-sa-next-btn:hover:not(:disabled),
.stage1-same-amount-tutorial .stage1-primary-action.stage1-sa-next-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 100%);
}

/* ── Stage 1-1 레이아웃 통일 (header / content / action) ── */

.stage1-same-amount-tutorial .stage1-sa-recovery-card.fraction-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.stage1-same-amount-tutorial .fraction-card-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 0;
}

.stage1-same-amount-tutorial .stage-progress-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(214, 236, 252, 0.95);
  border: 1.5px solid rgba(14, 116, 178, 0.55);
  box-shadow: 0 2px 8px rgba(14, 90, 140, 0.12);
}

.stage1-same-amount-tutorial .progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(51, 85, 115, 0.55);
  box-shadow: inset 0 0 0 1px rgba(30, 58, 90, 0.4);
}

.stage1-same-amount-tutorial .progress-dot.filled,
.stage1-same-amount-tutorial .stage1-sa-progress-dot.is-on {
  width: 9px;
  height: 9px;
  background: #0284c7;
  border: 0;
  box-shadow:
    0 0 6px rgba(2, 132, 199, 0.55),
    0 0 10px rgba(14, 165, 233, 0.35);
}

.stage1-same-amount-tutorial .stage1-sa-problem-label {
  display: none !important;
}

.stage1-same-amount-tutorial .fraction-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 0 4px;
}

.stage1-same-amount-tutorial .fraction-card-action {
  position: relative;
  flex: 0 0 48px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 48px;
  padding: 4px 2px 0;
}

.stage1-same-amount-tutorial .stage1-sa-recovery-card {
  position: relative;
}

.stage1-same-amount-tutorial .stage1-sa-p3-recap-footer {
  position: absolute;
  right: 2px;
  bottom: 0;
  left: auto;
  width: auto;
  z-index: 4;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage1-same-amount-tutorial .fraction-card-action .stage1-sa-footer:not(.stage1-sa-p3-recap-footer) {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.stage1-same-amount-tutorial .fraction-card-action .stage1-sa-p3-recap-footer {
  position: absolute;
  right: 2px;
  bottom: 0;
  left: auto;
  width: auto;
  justify-content: flex-end;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage1-same-amount-tutorial .same-amount-panel.is-problem-clear .fraction-card-action .stage1-sa-footer:not(.stage1-sa-p3-recap-footer),
.stage1-same-amount-tutorial .fraction-card-action .stage1-sa-p3-recap-footer {
  animation: stage1-sa-footer-in 0.38s ease forwards;
  pointer-events: auto;
}

.stage1-same-amount-tutorial .stage1-sa-footer[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.stage1-same-amount-tutorial .stage1-sa-footer[aria-hidden="false"] {
  visibility: visible;
}

/* 말풍선 라벨 — 기본 숨김, 힌트·정답 후 표시 */
.stage1-same-amount-tutorial .stage1-sa-frac-label {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage1-same-amount-tutorial .same-amount-panel.show-frac-labels .stage1-sa-frac-label,
.stage1-same-amount-tutorial .stage1-sa-link-stack.is-revealing .stage1-sa-frac-label {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

/* 문제 1/3 — 분수·막대 확대 */
.stage1-same-amount-tutorial .stage1-sa-problem-make {
  gap: 18px;
  align-items: center;
}

.stage1-same-amount-tutorial .stage1-sa-p1-panel .stage1-sa-fraction-core {
  font-size: 51px;
  gap: 5px;
}

.stage1-same-amount-tutorial .stage1-sa-p1-panel .stage1-sa-frac-barline,
.stage1-same-amount-tutorial .stage1-sa-p1-panel .stage1-sa-fraction-core .fraction-line {
  width: 58px;
  height: 3px;
}

.stage1-same-amount-tutorial .stage1-sa-p1-panel .stage1-sa-bar.fraction-strip {
  width: 448px;
  min-width: 448px;
  max-width: 448px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  flex: 0 0 64px;
}

/* 문제 2/3 — 입력 그룹 (막대 아래 중앙) */
.stage1-same-amount-tutorial .stage1-sa-problem-write {
  gap: 20px;
  align-items: center;
  width: 100%;
}

.stage1-same-amount-tutorial .stage1-sa-problem-write .stage1-sa-bar-block {
  width: 100%;
  display: flex;
  justify-content: center;
}

.stage1-same-amount-tutorial .stage1-sa-problem-write .stage1-sa-write-zone {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: fit-content;
  margin: 0 auto;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: fit-content;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-answer-input {
  width: 57px;
  height: 57px;
  min-width: 57px;
  min-height: 57px;
  font-size: var(--stage1-sa-frac-num-size);
  line-height: 1;
  font-weight: 900;
  color: #0d2744;
  text-align: center;
  border-radius: 10px;
  border: 2px solid rgba(90, 180, 240, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 10px rgba(80, 190, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  outline: none;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field:focus,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-answer-input:focus {
  border-color: #35c9ff;
  box-shadow:
    0 0 0 3px rgba(53, 201, 255, 0.22),
    0 0 14px rgba(53, 201, 255, 0.35);
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-line,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-input-line {
  width: 57px;
  height: 3px;
  margin: 0;
  border-radius: 999px;
  background: #0d2744;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field.is-ok,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field.correct,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-answer-input.correct {
  border-color: #45d8ff;
  background: rgba(230, 250, 255, 0.98);
  box-shadow:
    0 0 0 3px rgba(69, 216, 255, 0.2),
    0 0 18px rgba(69, 216, 255, 0.5);
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field.is-warn,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-answer-input.is-warn {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(255, 251, 235, 0.98);
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.14),
    0 0 12px rgba(245, 158, 11, 0.18);
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field:disabled {
  opacity: 0.45;
  border-color: rgba(120, 190, 240, 0.35);
  background: rgba(240, 248, 255, 0.72);
  color: rgba(13, 39, 68, 0.38);
  -webkit-text-fill-color: rgba(13, 39, 68, 0.38);
  cursor: not-allowed;
  box-shadow: none;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field:not(:disabled),
.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field[readonly] {
  color: #0d2744;
  opacity: 1;
  -webkit-text-fill-color: #0d2744;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-frac-field.is-shake {
  animation: stage1-sa-input-shake 0.42s ease-in-out;
}

.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-recovery-card.is-shake-wrong {
  animation: stage1-sa-card-shake 0.42s ease-in-out;
}

@keyframes stage1-sa-card-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-9px);
  }
  30% {
    transform: translateX(9px);
  }
  45% {
    transform: translateX(-6px);
  }
  60% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-3px);
  }
  90% {
    transform: translateX(3px);
  }
}

/* 문제 3/3 */
.stage1-same-amount-tutorial .stage1-sa-problem-match {
  width: 100%;
  align-items: center;
}

.stage1-same-amount-tutorial .stage1-sa-p3-panel .stage1-sa-match-rows {
  gap: 16px;
  margin: 0 auto;
}

.stage1-same-amount-tutorial .stage1-sa-p3-panel .stage1-sa-match-row {
  height: 67px;
  min-height: 67px;
  max-height: 67px;
  align-items: center;
}

/* 버튼 크기 통일 */
.stage1-same-amount-tutorial .stage1-sa-next-btn,
.stage1-same-amount-tutorial .stage1-primary-action.stage1-sa-next-btn {
  min-width: 88px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}

.stage1-same-amount-tutorial .stage1-sa-guide-text {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   Stage 1-2 shared white worksheet (s11 fraction-card aligned)
   ═══════════════════════════════════════════════════════════ */

.stage1-summary-panel.stage1-white-worksheet.fraction-card,
.stage1-white-worksheet.s12-learning-panel,
.stage1-white-worksheet.s12-multiply-panel {
  overflow: hidden;
}

.stage1-white-worksheet.fraction-card::before,
.stage1-white-worksheet.fraction-card::after,
.stage1-white-worksheet.s12-learning-panel::before,
.stage1-white-worksheet.s12-multiply-panel::before {
  display: none;
}

.stage1-white-worksheet.s12-multiply-panel {
  text-align: center;
}

.stage1-white-worksheet .s12-activity-title,
.stage1-white-worksheet .s12-activity-title--summary,
.stage1-white-worksheet .s12-learning-title {
  /* see global.css --edu-worksheet-title-* */
}

.stage1-white-worksheet .s12-activity-header {
  /* see global.css .edu-worksheet-header */
  margin-bottom: 18px;
}

.stage1-white-worksheet .s12-activity-header--summary {
  text-align: left;
}

.stage1-white-worksheet .s12-multiply-circle-row {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.stage1-white-worksheet .s12-multiply-visual-block {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 4px 0 24px;
}

.stage1-white-worksheet .s12-multiply-circle-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(82, 182, 235, 0.32);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(30, 120, 180, 0.08);
}

.stage1-white-worksheet .s12-multiply-circle-card.is-target {
  background: rgba(226, 247, 255, 0.95);
  border: 2px solid rgba(58, 180, 235, 0.9);
  box-shadow:
    0 0 0 2px rgba(58, 180, 235, 0.1),
    0 0 18px rgba(58, 180, 235, 0.28);
}

.stage1-white-worksheet .s12-multiply-equation-wrap {
  flex: 0 0 auto;
  min-height: 150px;
  padding: 0;
}

.stage1-white-worksheet .s12-multiply-equation {
  width: min(760px, 100%);
  min-height: 142px;
  padding: 24px 28px;
  margin: 0 auto;
  border-radius: 14px;
}

.stage1-white-worksheet .s12-multiply-circle-card.is-target::after {
  display: none;
}

.stage1-white-worksheet .s12-multiply-circle-frac,
.stage1-white-worksheet .s12-multiply-circle-frac .eq-fraction-num,
.stage1-white-worksheet .s12-multiply-circle-frac .eq-fraction-den,
.stage1-white-worksheet .s12-multiply-circle-frac .fraction-numerator,
.stage1-white-worksheet .s12-multiply-circle-frac .fraction-denominator {
  color: #123044;
  font-size: 30px;
  line-height: 1;
}

.stage1-white-worksheet .s12-multiply-circle-frac .eq-fraction-line,
.stage1-white-worksheet .s12-multiply-circle-frac .fraction-line {
  background: #17384d;
}

.stage1-white-worksheet .s12-multiply-equation,
.stage1-white-worksheet .s12-blank-equation,
.stage1-white-worksheet .s12-principle-visual {
  background: #f7fbff;
  border: 1.5px solid #c8e6f3;
  border-radius: 14px;
  box-shadow: none;
}

.stage1-white-worksheet .s12-multiply-equation .textbook-math {
  --math-fs: 30px;
  --bar-h: 3px;
  --blank-near-bar-gap: 3px;
  --expr-near-bar-gap: 3px;
}

.stage1-white-worksheet .s12-multiply-equation .textbook-math.textbook-math--game .tm-line.stage1-scale-problem {
  align-items: flex-start;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-frac,
.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .stage1-scale-eq-frac {
  gap: 0;
  min-width: 0;
  font-size: 30px;
  line-height: 1;
  grid-template-rows: 37px var(--bar-h, 3px) 37px;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-num {
  align-items: flex-end;
  padding: 0 0 2px;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-den {
  align-items: flex-start;
  padding: 2px 0 0;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-expr.stage1-scale-formula-line {
  display: inline-flex;
  align-items: center;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  gap: 4px;
  line-height: 1;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-num .tm-expr.stage1-scale-formula-line {
  align-self: flex-end;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-den .tm-expr.stage1-scale-formula-line {
  align-self: flex-start;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-expr.stage1-scale-formula-line > span:not(.tm-op) {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-bar,
.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .stage1-scale-bar {
  height: var(--bar-h, 3px);
  min-height: var(--bar-h, 3px);
  max-height: var(--bar-h, 3px);
  align-self: center;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-blank,
.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .stage1-scale-blank-input {
  width: 36px;
  height: 30px;
  min-width: 36px;
  min-height: 30px;
  max-height: 30px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  box-sizing: border-box;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem {
  gap: 12px 14px;
  align-items: flex-start;
}

.stage1-white-worksheet .s12-multiply-equation .textbook-math.textbook-math--game .tm-line.stage1-scale-problem {
  align-items: flex-start;
}

/* 분수선: textbook-math 열 너비(콘텐츠)에 맞춤 — 고정 40px 금지 */
.stage1-white-worksheet .s12-multiply-equation .tm-frac {
  width: max-content;
  min-width: 0;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-formula-frac.tm-frac,
.stage1-white-worksheet .s12-multiply-equation .stage1-scale-eq-frac.tm-frac {
  min-width: 0;
  gap: 0;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .tm-op,
.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .stage1-scale-eq,
.stage1-white-worksheet .s12-multiply-equation .stage1-scale-problem .stage1-scale-paren {
  align-self: center;
}

.stage1-white-worksheet .s12-multiply-equation .tm-num:has(.stage1-scale-blank-input),
.stage1-white-worksheet .s12-multiply-equation .tm-den:has(.stage1-scale-blank-input) {
  min-width: 0;
  width: auto;
  display: flex;
  justify-content: center;
}

.stage1-white-worksheet .s12-multiply-equation .tm-bar {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 3px;
  margin: 0;
  background: #17384d;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-formula-line {
  gap: 6px;
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-blank-input {
  width: 40px;
  height: 34px;
  min-width: 40px;
  min-height: 34px;
  font-size: 30px;
  font-weight: 900;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-blank-input:focus-visible {
  box-shadow:
    0 0 0 2px rgba(53, 201, 255, 0.18),
    0 0 12px rgba(53, 201, 255, 0.22);
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-blank-input.is-correct {
  box-shadow: 0 0 0 2px rgba(79, 195, 232, 0.14);
}

.stage1-white-worksheet .s12-multiply-equation .stage1-scale-blank-input.is-error {
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.12),
    0 0 8px rgba(245, 158, 11, 0.14);
}

.stage1-white-worksheet .stage1-scale-blank-input {
  color: #123044;
  font-size: 30px;
  line-height: 1;
  background: #ffffff;
  border: 2px solid rgba(90, 180, 240, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.stage1-white-worksheet .stage1-scale-blank-input:focus-visible {
  border-color: #35c9ff;
  box-shadow:
    0 0 0 3px rgba(53, 201, 255, 0.22),
    0 0 14px rgba(53, 201, 255, 0.35);
}

.stage1-white-worksheet .stage1-scale-blank-input.is-correct {
  border-color: #4fc3e8;
  background: #e8f8ff;
  box-shadow: 0 0 0 3px rgba(79, 195, 232, 0.18);
}

.stage1-white-worksheet .stage1-scale-blank-input.is-error {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(255, 251, 235, 0.98);
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.14),
    0 0 12px rgba(245, 158, 11, 0.18);
}

.stage1-white-worksheet .stage1-scale-blank-input.is-error:focus-visible {
  border-color: rgba(245, 158, 11, 0.82);
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.18),
    0 0 12px rgba(245, 158, 11, 0.22);
}

.stage1-white-worksheet .s12-multiply-equation.is-shake-wrong,
.stage1-white-worksheet #s12-divide-equation.is-shake-wrong {
  animation: stage1-sa-card-shake 0.42s ease-in-out;
  background: rgba(255, 251, 235, 0.98) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.14),
    0 0 16px rgba(245, 158, 11, 0.16) !important;
}

.stage1-white-worksheet .stage1-scale-blank-input:disabled:not([readonly]) {
  opacity: 0.42;
  border-color: rgba(90, 180, 240, 0.35);
  background: rgba(248, 252, 255, 0.72);
  cursor: not-allowed;
}

.stage1-white-worksheet .s12-multiply-summary-stage,
.stage1-white-worksheet .s12-transform-card,
.stage1-white-worksheet .s12-blank-card {
  background: #ffffff;
  border: 1.5px solid #c8e6f3;
  box-shadow: none;
}

.stage1-white-worksheet .s12-transform-frac,
.stage1-white-worksheet .s12-transform-frac .eq-fraction-num,
.stage1-white-worksheet .s12-transform-frac .eq-fraction-den,
.stage1-white-worksheet .s12-frac-chain-frac {
  color: #123044;
}

.stage1-white-worksheet .s12-transform-frac .eq-fraction-line,
.stage1-white-worksheet .s12-transform-frac .fraction-line {
  background: #17384d;
}

.stage1-white-worksheet .s12-transform-eq,
.stage1-white-worksheet .s12-frac-chain-eq,
.stage1-white-worksheet .s12-principle-copy,
.stage1-white-worksheet .s12-blank-subprompt,
.stage1-white-worksheet .s12-divide-detail {
  color: #20344f;
}

/* Stage 1 워크시트·분수 막대 복구 — 빈칸·막대 폭만 (모양은 textbook-math.css) */
.stage1-sa-fraction-core.tm-frac .tm-num,
.stage1-sa-fraction-core.tm-frac .tm-den {
  width: auto;
  min-width: 0;
  justify-content: center;
}

.stage1-sa-fraction-core.tm-frac .tm-num .stage1-sa-frac-field,
.stage1-sa-fraction-core.tm-frac .tm-den .stage1-sa-frac-field,
.stage1-sa-fraction-core.tm-frac .tm-num .stage1-sa-match-frac-field,
.stage1-sa-fraction-core.tm-frac .tm-den .stage1-sa-match-frac-field {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.stage1-sa-fraction-core.tm-frac .tm-num .edu-blank-input--md,
.stage1-sa-fraction-core.tm-frac .tm-den .edu-blank-input--md {
  width: 57px;
  height: 57px;
  min-width: 57px;
  min-height: 57px;
}

.stage1-sa-fraction-core.tm-frac .tm-num .edu-blank-input--sm,
.stage1-sa-fraction-core.tm-frac .tm-den .edu-blank-input--sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
}

.stage1-sa-write-core.tm-frac,
.stage1-sa-match-write-core.tm-frac {
  width: fit-content;
  justify-items: center;
}

.stage1-sa-fraction-core.tm-frac .tm-bar.stage1-sa-frac-line,
.stage1-sa-fraction-core.tm-frac .tm-bar.stage1-sa-frac-barline {
  width: 57px;
  align-self: center;
}

.stage1-sa-match-write-core.tm-frac .tm-bar.stage1-sa-frac-line,
.stage1-sa-match-write-core.tm-frac .tm-bar.stage1-sa-frac-barline {
  width: 40px;
}

.stage1-same-amount-tutorial .stage1-sa-match-row .stage1-sa-match-write-core.tm-frac {
  gap: 0;
}

.stage1-same-amount-tutorial .stage1-sa-write-core.tm-frac,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .stage1-sa-write-core,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-input-group.tm-frac {
  gap: 0;
  --near-bar-gap: 0;
  --blank-near-bar-gap: 0;
  --expr-near-bar-gap: 0;
}

.stage1-same-amount-tutorial .stage1-sa-write-core.tm-frac .tm-num,
.stage1-same-amount-tutorial .stage1-sa-write-core.tm-frac .tm-den,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-input-group.tm-frac .tm-num,
.stage1-same-amount-tutorial .stage1-sa-p2-panel .fraction-input-group.tm-frac .tm-den {
  padding-top: 0;
  padding-bottom: 0;
}

.s12-transform-frac .tm-frac .tm-num,
.s12-transform-frac .tm-frac .tm-den {
  font-size: inherit;
}

.s12-transform-frac .tm-frac .tm-bar {
  background: currentColor;
}

.stage1-white-worksheet .s12-transform-frac .tm-frac .tm-bar {
  background: #17384d;
}
