/* 겜블 NPC '럭키 박사' 무대(v4.51, QZ-1): 1920×1080 설계 틀(.qz-frame)을 화면에 맞게 줄이거나 키운다(quizView.js).
   배경은 사용자가 준 마법 아카데미 그림(assets/quiz/academy.webp: 공식·주기율표·성·바닥 마법진)이고,
   그 위에 마법공학 풍 유리 창(짙은 남색 유리, 하늘빛 룬 테두리, 금빛 장식)을 얹는다. 럭키박스는 바닥 마법진 위에서 열린다 */

.qz-stage {
  --qz-ink: #eaf2ff;
  --qz-dim: #a9b8dd;
  --qz-cyan: #6fe3ff;
  --qz-gold: #ffd36b;
  --qz-violet: #a98bff;
  --qz-red: #ff5a6e;
  --qz-amber: #ffaa3d;
  --qz-line: rgba(111, 227, 255, 0.45);
  --qz-glass: linear-gradient(160deg, rgba(24, 28, 74, 0.9), rgba(10, 12, 40, 0.9));
  --grade-mythic-color: #ff4f6e;
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #0b1030 url('/assets/quiz/academy.webp') center / cover no-repeat;
  font-family: var(--font-sans);
  color: var(--qz-ink);
  user-select: none;
}

.qz-stage[hidden] {
  display: none;
}

.qz-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 40, 0.5);
  backdrop-filter: blur(6px);
}

.qz-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  transform-origin: 0 0;
  box-shadow: 0 0 40px rgba(20, 30, 90, 0.5);
}

/* v4.52: 3D 럭키박스·럭키 박사·Unity 효과를 그리는 무대 캔버스(설계 크기 그대로, 창들 아래) */
.qz-canvas {
  position: absolute;
  pointer-events: none;
}

/* 빛 캔버스(상자 뒤·앞): 무대 그림에 더해 섞는다 */
.qz-glow {
  mix-blend-mode: screen;
  mix-blend-mode: plus-lighter;
}

/* 박사의 말풍선(무대 오른쪽 박사 머리 위, 꼬리는 아래 오른쪽) */
.qz-bubble {
  position: absolute;
  z-index: 4;
  left: 1590px;
  bottom: 400px;
  width: 300px;
  padding: 14px 18px;
  border: 2px solid var(--qz-gold);
  border-radius: 20px;
  background: rgba(255, 250, 236, 0.96);
  color: #3a2458;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 211, 107, 0.45);
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  transform-origin: 75% 100%;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1);
  pointer-events: none;
}

.qz-bubble::after {
  content: '';
  position: absolute;
  right: 92px;
  bottom: -14px;
  border: 14px solid transparent;
  border-top-color: rgba(255, 250, 236, 0.96);
  border-bottom: 0;
}

.qz-bubble.is-on {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 영웅 이상이 나오면 화면이 번쩍인다 */
.qz-frame.is-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at 50% 70%, rgba(255, 252, 230, 0.95), rgba(255, 214, 120, 0.45) 35%, transparent 70%);
  animation: qz-flash 0.8s ease-out forwards;
}

@keyframes qz-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

.qz-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.qz-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 8, 30, 0.72) 0%, rgba(6, 8, 30, 0.25) 22%, rgba(6, 8, 30, 0.1) 60%, rgba(6, 8, 30, 0.45) 100%),
    radial-gradient(ellipse at 50% 42%, rgba(6, 8, 30, 0.35), transparent 70%);
}

/* 럭키박스가 열리는 동안(v4.52): 무대를 어둡게 해 상자의 빛이 돋보이게 */
.qz-veil {
  transition: background-color 0.5s;
}

.qz-frame.is-reveal .qz-veil {
  background-color: rgba(8, 4, 30, 0.42);
}

[data-mode='question'] .qz-veil {
  background:
    linear-gradient(180deg, rgba(6, 8, 30, 0.8) 0%, rgba(6, 8, 30, 0.45) 30%, rgba(6, 8, 30, 0.35) 70%, rgba(6, 8, 30, 0.55) 100%);
}

/* ── 위 막대 ── */
.qz-top {
  position: absolute;
  /* 문제·결과 층(inset: 0)이 뒤에 오므로 위에 둔다(나가기 버튼이 눌리게, v4.52) */
  z-index: 5;
  top: 22px;
  left: 40px;
  right: 40px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.qz-title strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 40px;
  letter-spacing: 0.04em;
  color: var(--qz-gold);
  text-shadow: 0 0 18px rgba(255, 211, 107, 0.55), 0 2px 4px #000;
}

.qz-title span {
  font-size: 19px;
  color: var(--qz-dim);
}

.qz-top-gap {
  flex: 1;
}

.qz-chip {
  padding: 10px 22px;
  border: 1.5px solid var(--qz-line);
  border-radius: 999px;
  background: rgba(10, 14, 44, 0.78);
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(111, 227, 255, 0.25);
}

.qz-chip-gold {
  color: var(--qz-gold);
  border-color: rgba(255, 211, 107, 0.6);
}

/* ── 버튼 ── */
.qz-btn {
  font-family: inherit;
  color: var(--qz-ink);
  cursor: pointer;
  border: 1.5px solid var(--qz-line);
  border-radius: 14px;
  background: rgba(14, 20, 56, 0.85);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s, filter 0.12s;
}

.qz-btn:hover:not(:disabled) {
  border-color: var(--qz-cyan);
  box-shadow: 0 0 18px rgba(111, 227, 255, 0.45);
  transform: translateY(-1px);
}

.qz-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.qz-btn-ghost {
  padding: 12px 26px;
  font-size: 22px;
}

.qz-btn-main {
  width: 100%;
  height: 76px;
  font-size: 32px;
  font-weight: 800;
  color: #2a1600;
  border: 2px solid #fff1c4;
  background: linear-gradient(180deg, #ffe7a0, #ffc23d 55%, #e48c1c);
  box-shadow: 0 0 24px rgba(255, 196, 70, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.qz-btn-main:hover:not(:disabled) {
  border-color: #fff;
  box-shadow: 0 0 34px rgba(255, 210, 90, 0.85), inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.qz-btn-main.is-busy {
  filter: grayscale(0.4) brightness(0.85);
}

.qz-btn-chip {
  padding: 8px 18px;
  font-size: 20px;
  border-radius: 999px;
}

/* ── 유리 창 ── */
.qz-panel {
  position: absolute;
  border: 2px solid var(--qz-line);
  border-radius: 24px;
  background: var(--qz-glass);
  box-shadow:
    inset 0 0 0 1px rgba(255, 211, 107, 0.22),
    inset 0 0 40px rgba(111, 227, 255, 0.08),
    0 0 40px rgba(111, 227, 255, 0.22),
    0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

/* 룬 장식: 모서리 금빛 마름모 */
.qz-panel::before,
.qz-panel::after {
  content: '';
  position: absolute;
  top: -9px;
  width: 16px;
  height: 16px;
  background: var(--qz-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(255, 211, 107, 0.9);
}

.qz-panel::before {
  left: 40px;
}

.qz-panel::after {
  right: 40px;
}

.qz-label {
  margin: 4px 0 10px;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--qz-cyan);
  text-shadow: 0 0 10px rgba(111, 227, 255, 0.6);
}

/* ── 고르기 ── */
.qz-menu {
  /* v4.52: 오른쪽에 럭키 박사가 서도록 왼쪽으로 */
  left: 110px;
  top: 128px;
  width: 1480px;
  padding: 28px 36px 30px;
  display: grid;
  grid-template-columns: 1fr 350px;
  column-gap: 32px;
}

.qz-menu[hidden],
.qz-quest[hidden],
.qz-result[hidden] {
  display: none;
}

.qz-menu > * {
  grid-column: 1;
}

.qz-menu > .qz-history {
  grid-column: 2;
  grid-row: 1 / span 9;
  padding-left: 28px;
  border-left: 1px solid rgba(111, 227, 255, 0.25);
}

.qz-row {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.qz-btn-toggle {
  width: 200px;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qz-btn-toggle b {
  font-size: 28px;
}

.qz-btn-toggle small {
  font-size: 15px;
  color: var(--qz-dim);
}

.qz-btn-toggle.is-on,
.qz-tier.is-on {
  border: 2.5px solid var(--qz-gold);
  background: linear-gradient(180deg, rgba(74, 58, 140, 0.95), rgba(28, 22, 70, 0.95));
  box-shadow: 0 0 22px rgba(255, 211, 107, 0.5);
}

.qz-tier {
  flex: 1;
  min-height: 170px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  font-size: 19px;
  color: var(--qz-dim);
}

.qz-tier-name {
  font-family: var(--font-serif);
  font-size: 34px;
  color: var(--qz-ink);
}

.qz-tier-elementary .qz-tier-name {
  color: #8ff0c0;
}

.qz-tier-middle .qz-tier-name {
  color: #c7b2ff;
}

.qz-tier-high .qz-tier-name {
  color: #ffc86b;
}

.qz-tier-lucky {
  color: var(--qz-gold);
}

.qz-tier small {
  font-size: 15px;
}

/* 참가비(v4.57): 고른 난이도의 참가비와 럭키박스 확률 */
.qz-menu:focus {
  outline: none;
}

.qz-tier-fee {
  color: var(--qz-ink);
  font-weight: 700;
}

.qz-fee {
  margin-bottom: 10px;
}

.qz-fee-amount {
  display: inline-block;
  min-width: 260px;
  padding: 8px 22px;
  font-size: 34px;
  font-weight: 800;
  text-align: right;
  color: var(--qz-gold);
  background: rgba(6, 8, 30, 0.9);
  border: 2px solid rgba(255, 211, 107, 0.6);
  border-radius: 14px;
}

.qz-fee-preview {
  margin-top: 10px;
  font-size: 20px;
  color: #b9f2ff;
}

.qz-fee-preview.is-bad {
  color: var(--qz-red);
}

.qz-odds {
  margin: 8px 0 6px;
  font-size: 17px;
  color: var(--qz-dim);
}

.qz-message {
  min-height: 30px;
  margin-bottom: 8px;
  font-size: 20px;
  color: var(--qz-cyan);
}

.qz-message.is-bad {
  color: var(--qz-red);
}

.qz-history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(111, 227, 255, 0.14);
  font-size: 17px;
  color: var(--qz-dim);
}

.qz-history-row b {
  grid-column: 1 / span 2;
  font-size: 18px;
  color: var(--qz-ink);
}

.qz-history-row.is-correct b {
  color: #8ff0a8;
}

.qz-history-row.is-wrong b,
.qz-history-row.is-timeout b,
.qz-history-row.is-forfeit b {
  color: #ff9aa8;
}

.qz-history-empty {
  font-size: 17px;
  color: var(--qz-dim);
}

/* ── 문제 ── */
.qz-quest {
  position: absolute;
  inset: 0;
}

.qz-quest::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 180px rgba(255, 40, 60, 0.75);
  transition: opacity 0.3s;
}

.qz-quest.is-panic::before {
  opacity: 1;
  animation: qz-panic 0.5s ease-in-out infinite alternate;
}

.qz-tags {
  position: absolute;
  top: 132px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.qz-tag {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--qz-line);
  background: rgba(10, 14, 44, 0.82);
  font-size: 21px;
  font-weight: 700;
}

.qz-tag-elementary {
  color: #8ff0c0;
}

.qz-tag-middle {
  color: #c7b2ff;
}

.qz-tag-high {
  color: #ffc86b;
}

.qz-tag-topic {
  color: var(--qz-dim);
  font-weight: 400;
}

.qz-tag-bet {
  color: var(--qz-gold);
  border-color: rgba(255, 211, 107, 0.6);
}

.qz-timer {
  position: absolute;
  top: 196px;
  left: 50%;
  width: 1200px;
  height: 44px;
  transform: translateX(-50%);
}

.qz-timer-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid var(--qz-line);
  border-radius: 999px;
  background: rgba(6, 8, 30, 0.85);
}

.qz-timer-fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #3fd0ff, #8ff0ff);
  box-shadow: 0 0 20px rgba(111, 227, 255, 0.8);
  transition: background 0.3s;
}

.qz-timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8);
}

.qz-timer.is-amber .qz-timer-fill {
  background: linear-gradient(90deg, #ff8a2a, #ffcf5a);
  box-shadow: 0 0 20px rgba(255, 170, 61, 0.85);
}

.qz-timer.is-red .qz-timer-fill,
.qz-timer.is-panic .qz-timer-fill {
  background: linear-gradient(90deg, #ff2d4a, #ff7a6a);
  box-shadow: 0 0 24px rgba(255, 60, 80, 0.95);
}

.qz-timer.is-panic {
  animation: qz-shake 0.35s linear infinite;
}

.qz-timer.is-panic .qz-timer-text {
  color: #ffe1e5;
  font-size: 30px;
}

.qz-question {
  top: 280px;
  left: 50%;
  width: 1360px;
  min-height: 250px;
  transform: translateX(-50%);
  padding: 44px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qz-question-text {
  font-size: 48px;
  line-height: 1.5;
  font-weight: 700;
  text-align: center;
  word-break: keep-all;
  text-shadow: 0 0 16px rgba(111, 227, 255, 0.35), 0 2px 4px #000;
  user-select: none;
}

.qz-question-text.is-long {
  font-size: 40px;
}

/* ── O/X 카드(v4.72, QZ-5): 문제 아래 O(푸른 고리)·X(붉은 엇갈린 막대) 두 장. 누르거나 키보드 O·X(←·→) ──
   표시는 그림 파일 없이 CSS로: O는 두꺼운 빛 고리, X는 둥근 막대 둘. 고르면 그 카드가 빛나고 다른 카드는 흐려진다 */
.qz-ox {
  position: absolute;
  top: 560px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 420px 120px 420px;
  align-items: center;
}

.qz-ox {
  /* 읽는 시간 배지(v4.85)가 카드 위 가운데에 뜬다 */
  isolation: isolate;
}

.qz-read-badge {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.qz-read-badge b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  border: 4px solid #ffd66e;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 24, 80, 0.95), rgba(14, 8, 36, 0.95));
  box-shadow: 0 0 30px rgba(255, 214, 110, 0.7);
  color: #ffe9a8;
  font-size: 84px;
  font-weight: 900;
  text-shadow: 0 2px 6px #000;
}

.qz-read-badge span {
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(10, 8, 30, 0.85);
  color: #fff3c8;
  font-size: 24px;
  font-weight: 800;
}

.qz-ox.is-reading {
  pointer-events: none;
}

.qz-ox.is-reading .qz-read-badge {
  display: flex;
}

.qz-ox.is-reading .qz-ox-card,
.qz-ox.is-reading .qz-ox-vs {
  filter: grayscale(0.7) brightness(0.55);
}

.qz-timer.is-reading .qz-timer-fill {
  background: linear-gradient(90deg, #9b7bff, #d4c4ff);
  box-shadow: 0 0 18px rgba(170, 140, 255, 0.8);
}

.qz-ox.is-busy,
.qz-ox.is-picked {
  pointer-events: none;
}

.qz-ox.is-shake {
  animation: qz-shake 0.4s;
}

.qz-ox-vs {
  justify-self: center;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 211, 107, 0.7);
  background: radial-gradient(circle at 35% 30%, rgba(80, 64, 20, 0.95), rgba(20, 16, 6, 0.95));
  color: var(--qz-gold);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 0 22px rgba(255, 196, 70, 0.45);
  transition: opacity 0.25s;
}

.qz-ox.is-picked .qz-ox-vs {
  opacity: 0.25;
}

.qz-ox-card {
  --c1: #57e3ff;
  --c2: #2f7bff;
  --glow: rgba(87, 200, 255, 0.55);
  position: relative;
  width: 420px;
  height: 320px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 34px;
  background:
    linear-gradient(165deg, rgba(20, 30, 84, 0.94), rgba(8, 10, 38, 0.96)) padding-box,
    linear-gradient(150deg, var(--c1), var(--c2) 55%, rgba(255, 255, 255, 0.35)) border-box;
  box-shadow: 0 0 34px var(--glow), 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(255, 255, 255, 0.04);
  transition: transform 0.18s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.2s, opacity 0.25s, filter 0.25s;
  animation: qz-ox-float 2.6s ease-in-out infinite;
}

.qz-ox-card.is-x {
  --c1: #ff7a8e;
  --c2: #ff2d55;
  --glow: rgba(255, 70, 100, 0.5);
  background:
    linear-gradient(165deg, rgba(70, 18, 44, 0.94), rgba(30, 8, 22, 0.96)) padding-box,
    linear-gradient(150deg, var(--c1), var(--c2) 55%, rgba(255, 255, 255, 0.35)) border-box;
  animation-delay: -1.3s;
}

/* 바닥에서 오르는 옅은 색 빛 */
.qz-ox-card::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--glow), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}

/* 지나가는 반짝임 */
.qz-ox-shine {
  position: absolute;
  top: -20%;
  left: -60%;
  width: 40%;
  height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: qz-ox-shine 3.4s ease-in-out infinite;
}

.qz-ox-card.is-x .qz-ox-shine {
  animation-delay: -1.7s;
}

.qz-ox-card:hover,
.qz-ox-card:focus-visible {
  transform: translateY(-12px) scale(1.04);
  box-shadow: 0 0 60px var(--glow), 0 0 0 4px rgba(255, 255, 255, 0.18), 0 26px 50px rgba(0, 0, 0, 0.6);
  outline: none;
  animation-play-state: paused;
}

.qz-ox-card:active {
  transform: translateY(-4px) scale(0.98);
}

/* 표시: --m 크기 기준(카드 170px, 결과 표 64px) */
.qz-ox-mark {
  --m: 150px;
  position: relative;
  width: var(--m);
  height: var(--m);
  flex: none;
  filter: drop-shadow(0 0 14px var(--glow)) drop-shadow(0 4px 4px rgba(0, 0, 0, 0.6));
}

.is-o .qz-ox-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: calc(var(--m) * 0.16) solid transparent;
  background: linear-gradient(160deg, #c9f6ff, var(--c1, #57e3ff) 35%, var(--c2, #2f7bff)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
}

.is-o .qz-ox-mark i {
  display: none;
}

.is-x .qz-ox-mark i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--m) * 1.08);
  height: calc(var(--m) * 0.18);
  margin: calc(var(--m) * -0.09) 0 0 calc(var(--m) * -0.54);
  border-radius: calc(var(--m) * 0.09);
  background: linear-gradient(180deg, #ffd0d7, var(--c1, #ff7a8e) 40%, var(--c2, #ff2d55));
  transform: rotate(45deg);
}

.is-x .qz-ox-mark i + i {
  transform: rotate(-45deg);
}

.qz-ox-word {
  position: relative;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 0 16px var(--glow), 0 3px 4px #000;
}

.qz-ox-key {
  position: relative;
  padding: 4px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  font-size: 18px;
  color: #dfe8ff;
}

/* 골랐다: 그 카드는 크게 빛나며 고동치고, 다른 카드는 흐려진다 */
.qz-ox.is-picked .qz-ox-card {
  opacity: 0.32;
  filter: grayscale(0.7) brightness(0.7);
  animation: none;
}

.qz-ox.is-picked .qz-ox-card.is-picked {
  opacity: 1;
  filter: none;
  transform: translateY(-14px) scale(1.08);
  animation: qz-ox-picked 0.7s ease-in-out infinite alternate;
}

.qz-quest.is-panic .qz-ox-card:not(.is-picked) {
  animation-duration: 0.9s;
}

@keyframes qz-ox-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@keyframes qz-ox-shine {
  0%, 55% { left: -60%; }
  100% { left: 130%; }
}

@keyframes qz-ox-picked {
  from { box-shadow: 0 0 50px var(--glow), 0 0 0 4px rgba(255, 255, 255, 0.35), 0 26px 50px rgba(0, 0, 0, 0.6); }
  to { box-shadow: 0 0 110px var(--glow), 0 0 0 8px rgba(255, 255, 255, 0.55), 0 26px 50px rgba(0, 0, 0, 0.6); }
}

.qz-answer-hint {
  position: absolute;
  top: 912px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 22px;
  border-radius: 999px;
  background: rgba(6, 8, 30, 0.72);
  white-space: nowrap;
  font-size: 19px;
  color: #c9d6f5;
}

.qz-giveup {
  position: absolute;
  top: 970px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
}

/* 결과: 정답·내 선택 표와 해설(v4.72) */
.qz-ox-result {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 4px;
}

.qz-ox-badge {
  --c1: #57e3ff;
  --c2: #2f7bff;
  --glow: rgba(87, 200, 255, 0.55);
  position: relative;
  width: 118px;
  height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 24px;
  border: 2.5px solid var(--c1);
  background: rgba(8, 10, 38, 0.9);
  box-shadow: 0 0 26px var(--glow);
  animation: qz-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.qz-ox-badge.is-x {
  --c1: #ff7a8e;
  --c2: #ff2d55;
  --glow: rgba(255, 70, 100, 0.5);
}

.qz-ox-badge small {
  font-size: 17px;
  font-weight: 700;
  color: var(--qz-dim);
  text-shadow: none;
}

.qz-ox-badge .qz-ox-mark {
  --m: 60px;
}

.qz-ox-badge.is-answer {
  border-color: var(--qz-gold);
  box-shadow: 0 0 34px rgba(255, 211, 107, 0.6);
}

.qz-ox-badge.is-answer small {
  color: var(--qz-gold);
}

.qz-ox-badge.is-mine.is-wrong {
  opacity: 0.8;
}

.qz-ox-badge.is-mine.is-wrong::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(-20deg);
  box-shadow: 0 0 8px #000;
}

.qz-ox-none {
  padding: 10px 22px;
  border-radius: 16px;
  border: 1.5px dashed rgba(169, 184, 221, 0.6);
  color: var(--qz-dim);
  font-size: 22px;
}

.qz-explain {
  max-width: 1180px;
  margin-top: 6px;
  padding: 12px 26px;
  display: flex;
  gap: 14px;
  align-items: baseline;
  border-radius: 18px;
  border: 1.5px solid var(--qz-line);
  background: rgba(8, 12, 44, 0.86);
  font-size: 24px;
  line-height: 1.45;
  text-align: left;
  word-break: keep-all;
}

.qz-explain b {
  flex: none;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.16);
  color: var(--qz-gold);
  font-size: 20px;
}

/* ── 결과 ── */
.qz-result {
  position: absolute;
  inset: 0;
}

.qz-verdict {
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 120px;
  font-weight: 800;
  letter-spacing: 0.06em;
  animation: qz-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.qz-verdict.is-correct {
  color: #ffe08a;
  text-shadow: 0 0 30px rgba(255, 196, 70, 0.95), 0 0 70px rgba(255, 140, 40, 0.6), 0 4px 6px #000;
}

.qz-verdict.is-wrong,
.qz-verdict.is-timeout,
.qz-verdict.is-forfeit {
  color: #ff8a98;
  text-shadow: 0 0 26px rgba(255, 60, 80, 0.85), 0 4px 6px #000;
}

.qz-verdict.is-void {
  color: var(--qz-dim);
}

.qz-result-lines {
  position: absolute;
  top: 272px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  color: var(--qz-ink);
  text-shadow: 0 2px 4px #000;
}

.qz-result-main {
  font-size: 30px;
  font-weight: 800;
  color: var(--qz-gold);
}

/* 럭키박스: 바닥 마법진 가운데(그림의 원 가운데 설계 약 x 960, y 900) 위에 선다 */
.qz-box {
  position: absolute;
  left: 860px;
  top: 640px;
  width: 200px;
  height: 200px;
  display: none;
}

.qz-box.is-on {
  display: block;
  animation: qz-drop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

/* 3D 상자를 무대 캔버스에 그리는 동안 CSS 상자는 상태만 들고 숨는다 */
.qz-box.is-3d {
  visibility: hidden;
}

.qz-box-body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  height: 120px;
  border-radius: 10px 10px 16px 16px;
  border: 3px solid #ffe7a0;
  background:
    linear-gradient(90deg, transparent 44%, #ffd36b 44%, #ffd36b 56%, transparent 56%),
    linear-gradient(180deg, #8b5cf6, #4c1d95);
  box-shadow: 0 0 30px rgba(169, 139, 255, 0.8), inset 0 -10px 20px rgba(0, 0, 0, 0.35);
}

.qz-box-body b {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #3a1b00;
  background: radial-gradient(circle at 35% 30%, #fff8d8, #ffcf4a 60%, #c27c10);
  box-shadow: 0 0 16px rgba(255, 220, 120, 0.95);
}

.qz-box-lid {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 128px;
  height: 46px;
  border-radius: 14px 14px 6px 6px;
  border: 3px solid #ffe7a0;
  background:
    linear-gradient(90deg, transparent 44%, #ffd36b 44%, #ffd36b 56%, transparent 56%),
    linear-gradient(180deg, #a78bfa, #6d28d9);
  box-shadow: 0 0 22px rgba(169, 139, 255, 0.8);
  transform-origin: 20% 100%;
}

.qz-box-lid i {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 36px;
  height: 22px;
  margin-left: -18px;
  border: 4px solid #ffd36b;
  border-bottom: none;
  border-radius: 20px 20px 0 0;
}

.qz-box-glow {
  position: absolute;
  left: -60px;
  right: -60px;
  bottom: -30px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(169, 139, 255, 0.75), transparent 70%);
  animation: qz-breathe 1.2s ease-in-out infinite alternate;
}

.qz-box-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 760px;
  height: 760px;
  margin: -420px 0 0 -380px;
  border-radius: 50%;
  opacity: 0;
  background: repeating-conic-gradient(rgba(255, 230, 150, 0.55) 0 8deg, transparent 8deg 22deg);
  mask-image: radial-gradient(circle, #000 18%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 65%);
}

.qz-box.is-shake {
  animation: qz-box-shake 0.18s linear infinite;
}

.qz-box.is-shake .qz-box-glow {
  background: radial-gradient(ellipse, rgba(255, 220, 140, 0.95), transparent 70%);
}

.qz-box.is-open .qz-box-lid {
  animation: qz-lid 0.7s ease-out forwards;
}

.qz-box.is-open .qz-box-rays {
  opacity: 1;
  animation: qz-spin 6s linear infinite, qz-fade-in 0.4s ease-out;
}

.qz-box.is-open.kind-exp .qz-box-rays {
  background: repeating-conic-gradient(rgba(120, 230, 255, 0.55) 0 8deg, transparent 8deg 22deg);
}

.qz-box.is-open.kind-gold .qz-box-rays {
  background: repeating-conic-gradient(rgba(255, 210, 90, 0.65) 0 8deg, transparent 8deg 22deg);
}

.qz-box.is-open.grade-epic .qz-box-rays {
  background: repeating-conic-gradient(rgba(190, 120, 255, 0.65) 0 8deg, transparent 8deg 22deg);
}

.qz-box.is-open.grade-legendary .qz-box-rays {
  background: repeating-conic-gradient(rgba(255, 150, 50, 0.75) 0 8deg, transparent 8deg 22deg);
}

.qz-box.is-open.grade-mythic .qz-box-rays {
  background: repeating-conic-gradient(rgba(255, 80, 120, 0.8) 0 6deg, rgba(120, 200, 255, 0.6) 6deg 12deg, transparent 12deg 22deg);
}

.qz-reward {
  position: absolute;
  top: 380px;
  left: 0;
  right: 0;
  display: none;
  justify-content: center;
}

/* 3D 상자가 크게 서므로 보상 카드는 상자 왼쪽에서 튀어나온다 */
.qz-box.is-3d ~ .qz-reward {
  top: 570px; /* v4.72: 위의 정답·해설 줄과 겹치지 않게 */
  left: 190px;
  right: auto;
  width: 540px;
}

.qz-box.is-3d ~ .qz-reward .qz-reward-card {
  min-width: 0;
  width: 100%;
  animation: qz-fly-out 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes qz-fly-out {
  from { transform: translate(420px, 160px) scale(0.2); opacity: 0; }
  to { transform: translate(0, 0) scale(1); opacity: 1; }
}

.qz-reward.is-on {
  display: flex;
}

.qz-reward-card {
  min-width: 460px;
  padding: 22px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 2.5px solid var(--qz-gold);
  border-radius: 22px;
  background: var(--qz-glass);
  box-shadow: 0 0 40px rgba(255, 211, 107, 0.55);
  animation: qz-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.qz-reward-card b {
  font-size: 40px;
  color: var(--qz-gold);
  text-shadow: 0 0 16px rgba(255, 196, 70, 0.7);
}

.qz-reward-card span {
  font-size: 22px;
  color: var(--qz-dim);
}

.qz-reward-icon {
  font-size: 72px;
  line-height: 1;
}

.qz-reward-item .item-icon {
  width: 110px;
  height: 110px;
  font-size: 64px;
}

/* 시작 창(v4.58): 출제 문제 칸은 누르지 않는 안내, 럭키박스 확률 카드는 종류마다 색 */
.qz-cats .qz-btn-toggle {
  cursor: default;
}

.qz-cats .qz-mixed {
  min-width: 380px;
}

.qz-odds-dud .qz-tier-name {
  color: #c9c6d6;
}

.qz-odds-exp .qz-tier-name {
  color: #8fe8ff;
}

.qz-odds-item .qz-tier-name {
  color: #ffc86b;
}

.qz-tiers .qz-tier .qz-tier-fee {
  font-size: 30px;
}

/* 꽝(v4.57): 회색 카드, 상자는 열리지 않고 잿빛 */
.qz-reward-card.is-dud {
  border-color: #8d8a9c;
  box-shadow: 0 0 30px rgba(140, 135, 160, 0.45);
}

.qz-reward-card.is-dud b {
  color: #d6d3e0;
  text-shadow: none;
}

.qz-box.is-dud {
  filter: grayscale(0.85) brightness(0.75);
  animation: qz-dud-squash 0.45s ease-out;
}

@keyframes qz-dud-squash {
  0% { transform: scale(1); }
  35% { transform: scale(1.06, 0.86); }
  100% { transform: scale(1); }
}

.qz-reward-card.is-exp {
  border-color: var(--qz-cyan);
  box-shadow: 0 0 40px rgba(111, 227, 255, 0.55);
}

.qz-reward-card.is-exp b {
  color: #b9f4ff;
}

.qz-reward-card.grade-common b { color: var(--grade-common); }
.qz-reward-card.grade-uncommon b { color: var(--grade-uncommon); }
.qz-reward-card.grade-rare b { color: var(--grade-rare); }
.qz-reward-card.grade-epic b { color: var(--grade-epic); }
.qz-reward-card.grade-legendary b { color: var(--grade-legendary); }
.qz-reward-card.grade-mythic b { color: var(--grade-mythic-color); }

.qz-reward-card.grade-epic { border-color: var(--grade-epic); box-shadow: 0 0 40px rgba(163, 94, 224, 0.6); }
.qz-reward-card.grade-legendary { border-color: var(--grade-legendary); box-shadow: 0 0 50px rgba(224, 138, 46, 0.75); }
.qz-reward-card.grade-mythic { border-color: var(--grade-mythic-color); box-shadow: 0 0 60px rgba(255, 79, 110, 0.85); }

.qz-reward-grade {
  font-weight: 700;
}

.qz-result-buttons {
  position: absolute;
  bottom: 50px;
  left: 50%;
  width: 980px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 200px 200px;
  gap: 16px;
}

/* ── 알림 ── */
.qz-toast {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 200px;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1.5px solid var(--qz-line);
  background: rgba(8, 10, 34, 0.92);
  font-size: 22px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.qz-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.qz-toast.bad {
  color: #ffb3bd;
  border-color: rgba(255, 90, 110, 0.7);
}

.qz-toast.warn {
  color: #ffd9a0;
  border-color: rgba(255, 170, 61, 0.7);
}

/* ── 움직임 ── */
@keyframes qz-shake {
  0%, 100% { translate: 0 0; }
  25% { translate: -6px 0; }
  75% { translate: 6px 0; }
}

@keyframes qz-panic {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@keyframes qz-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes qz-drop {
  from { transform: translateY(-160px) scale(0.7); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes qz-box-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg) translateY(-3px); }
  75% { transform: rotate(6deg) translateY(-3px); }
}

@keyframes qz-lid {
  to { transform: translate(-60px, -150px) rotate(-38deg); opacity: 0; }
}

@keyframes qz-spin {
  to { transform: rotate(360deg); }
}

@keyframes qz-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes qz-breathe {
  from { opacity: 0.6; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1.05); }
}

/* 럭키박스 장비 판매가 안내(v4.86) */
.qz-reward .qz-reward-lucky {
  color: #f0a8ff;
  font-size: 22px;
  font-weight: 700;
}

/* ── 도전 골든벨(v5.16): 시작 창의 도전 고르기, 원소기호 입력칸, 정답 표시 ── */
.qz-cats .qz-mode {
  cursor: pointer;
  width: auto;
  min-width: 320px;
  height: 84px;
  padding: 0 26px;
}

.qz-cats .qz-mode:not(.is-on) {
  opacity: 0.72;
}

.qz-mode-goldenbell.is-on {
  border-color: #ffd36b;
  background: linear-gradient(180deg, rgba(120, 86, 20, 0.95), rgba(58, 38, 8, 0.95));
  box-shadow: 0 0 26px rgba(255, 200, 80, 0.6);
}

.qz-odds-golden {
  border-color: rgba(255, 79, 110, 0.8);
  box-shadow: 0 0 18px rgba(255, 79, 110, 0.35);
}

.qz-odds-golden .qz-tier-name {
  color: #ff7f9a;
}

.qz-text-answer {
  position: absolute;
  top: 600px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  align-items: center;
}

.qz-text-answer[hidden],
.qz-ox[hidden] {
  display: none;
}

.qz-text-input {
  width: 520px;
  height: 120px;
  padding: 0 28px;
  border: 3px solid #ffd36b;
  border-radius: 22px;
  background: rgba(10, 8, 30, 0.88);
  color: #fff6d8;
  font: 700 64px/1 var(--font-sans, sans-serif);
  text-align: center;
  letter-spacing: 0.08em;
  box-shadow: 0 0 34px rgba(255, 211, 107, 0.45), inset 0 0 18px rgba(255, 211, 107, 0.18);
  outline: none;
}

.qz-text-input::placeholder {
  font-size: 34px;
  letter-spacing: 0;
  color: rgba(255, 246, 216, 0.4);
}

.qz-text-input:focus {
  box-shadow: 0 0 50px rgba(255, 211, 107, 0.75), inset 0 0 18px rgba(255, 211, 107, 0.25);
}

.qz-text-input:disabled {
  opacity: 0.45;
}

.qz-text-submit {
  height: 120px;
  min-width: 200px;
  font-size: 40px;
}

.qz-text-answer.is-reading .qz-text-submit {
  opacity: 0.45;
  pointer-events: none;
}

.qz-text-answer.is-picked .qz-text-input {
  border-color: #8ff0c0;
}

.qz-text-answer.is-shake {
  animation: qz-shake 0.4s;
}

.qz-text-result {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 6px;
}

.qz-text-badge {
  padding: 10px 26px;
  border-radius: 16px;
  border: 2px solid #6fe3ff;
  background: rgba(10, 20, 50, 0.85);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.qz-text-badge.is-answer {
  border-color: #ffd36b;
  color: #ffe9a8;
}

.qz-text-badge.is-right {
  border-color: #8ff0c0;
  color: #b9ffe0;
}

.qz-text-badge.is-wrong {
  border-color: #ff5a6e;
  color: #ffb3bd;
  text-decoration: line-through;
}

.qz-reward-golden {
  font-weight: 800;
  color: #ffe27a;
  text-shadow: 0 0 12px rgba(255, 200, 80, 0.9);
}

/* ── 휴대폰 세로 무대(v4.82, MO-3): 폭 720 설계 틀(높이 --stage-h, render/mobileStage.js fitStage). 배율 약 0.54라 글자는 22px 이상.
   위 막대(제목·나가기 / 골드·오늘) → 창. 박사는 오른쪽 아래에 작게(캔버스, luckyStage.setLayout), 말풍선은 시작 창에서만 ── */
html.is-mobile .qz-frame {
  width: 720px;
  box-shadow: none;
}

html.is-mobile .qz-top {
  top: 14px;
  left: 18px;
  right: 18px;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px 10px;
  align-items: center;
}

html.is-mobile .qz-title {
  grid-column: 1 / 3;
  grid-row: 1;
  min-width: 0;
}

html.is-mobile .qz-title strong {
  font-size: 38px;
  white-space: nowrap;
}

html.is-mobile .qz-title span,
html.is-mobile .qz-top-gap {
  display: none;
}

html.is-mobile .qz-exit {
  grid-column: 3;
  grid-row: 1;
  padding: 12px 20px;
  font-size: 26px;
  white-space: nowrap;
}

html.is-mobile .qz-chip {
  grid-row: 2;
  min-width: 0;
  padding: 8px 12px;
  font-size: 23px;
  text-align: center;
  white-space: nowrap;
}

html.is-mobile .qz-chip-gold {
  grid-column: 1;
}

html.is-mobile .qz-chip:not(.qz-chip-gold) {
  grid-column: 2 / 4;
}

html.is-mobile .qz-btn-ghost {
  padding: 14px 22px;
  font-size: 26px;
}

html.is-mobile .qz-btn-main {
  height: 84px;
  font-size: 34px;
}

/* 시작 창: 한 열, 최근 도전은 아래 */
html.is-mobile .qz-menu {
  left: 18px;
  right: 18px;
  top: 176px;
  width: auto;
  padding: 22px 22px 22px;
  grid-template-columns: minmax(0, 1fr);
}

html.is-mobile .qz-menu > .qz-history {
  grid-column: 1;
  grid-row: auto;
  max-height: 250px;
  overflow: hidden;
  margin-top: 16px;
  padding: 12px 0 0;
  border-left: 0;
  border-top: 1px solid rgba(111, 227, 255, 0.25);
}

html.is-mobile .qz-label {
  margin: 2px 0 8px;
  font-size: 22px;
}

html.is-mobile .qz-row {
  gap: 10px;
  margin-bottom: 14px;
}

html.is-mobile .qz-cats .qz-mixed {
  width: 100%;
  min-width: 0;
  height: 80px;
}

html.is-mobile .qz-btn-toggle b {
  font-size: 28px;
}

html.is-mobile .qz-btn-toggle small {
  font-size: 22px;
}

html.is-mobile .qz-tier {
  min-width: 0;
  min-height: 0;
  padding: 12px 12px;
  font-size: 22px;
  border-radius: 16px;
}

html.is-mobile .qz-tier-name {
  font-size: 30px;
}

html.is-mobile .qz-tier-lucky {
  font-size: 22px;
  line-height: 1.3;
  word-break: keep-all;
}

html.is-mobile .qz-fee-amount {
  min-width: 0;
  font-size: 34px;
}

html.is-mobile .qz-fee-preview,
html.is-mobile .qz-odds,
html.is-mobile .qz-message,
html.is-mobile .qz-history-row,
html.is-mobile .qz-history-row b,
html.is-mobile .qz-history-empty {
  font-size: 22px;
  line-height: 1.35;
  word-break: keep-all;
}

/* 문제: 태그·타이머·문제·O·X 카드(나란히, 크게)·안내·포기 */
html.is-mobile .qz-tags {
  top: 178px;
  left: 18px;
  right: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

html.is-mobile .qz-tag {
  padding: 6px 16px;
  font-size: 22px;
}

html.is-mobile .qz-timer {
  top: 236px;
  width: 680px;
  height: 52px;
}

html.is-mobile .qz-timer-text,
html.is-mobile .qz-timer.is-panic .qz-timer-text {
  font-size: 28px;
}

html.is-mobile .qz-question {
  top: 312px;
  width: 684px;
  min-height: 270px;
  padding: 30px 28px;
}

html.is-mobile .qz-question-text {
  font-size: 40px;
  line-height: 1.45;
}

html.is-mobile .qz-question-text.is-long {
  font-size: 34px;
}

html.is-mobile .qz-ox {
  top: 620px;
  grid-template-columns: 312px 60px 312px;
}

html.is-mobile .qz-ox-card {
  width: 312px;
  height: 300px;
  border-radius: 30px;
}

html.is-mobile .qz-ox-vs {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

html.is-mobile .qz-ox-word {
  font-size: 34px;
}

html.is-mobile .qz-ox-key {
  display: none;
}

html.is-mobile .qz-answer-hint {
  top: 950px;
  font-size: 22px;
}

html.is-mobile .qz-giveup {
  top: 1012px;
  min-width: 200px;
}

html.is-mobile .qz-quest.is-panic::before {
  box-shadow: inset 0 0 120px rgba(255, 40, 60, 0.75);
}

/* 결과: 판정·정답과 내 선택·해설 → 보상 카드 → 상자(캔버스, 단추 바로 위) → 단추 */
html.is-mobile .qz-verdict {
  top: 168px;
  font-size: 92px;
}

html.is-mobile .qz-result-lines {
  top: 292px;
  left: 18px;
  right: 18px;
  font-size: 24px;
}

html.is-mobile .qz-result-main {
  font-size: 28px;
  text-align: center;
}

html.is-mobile .qz-ox-result {
  gap: 18px;
}

html.is-mobile .qz-ox-badge {
  width: 112px;
  height: 112px;
}

html.is-mobile .qz-ox-badge small,
html.is-mobile .qz-ox-none {
  font-size: 22px;
}

html.is-mobile .qz-explain {
  max-width: 684px;
  padding: 12px 18px;
  font-size: 24px;
}

html.is-mobile .qz-explain b {
  font-size: 22px;
}

/* CSS 상자(3D 그림을 못 받았을 때): 단추 바로 위 가운데 */
html.is-mobile .qz-box {
  left: 260px;
  top: calc(var(--stage-h, 1500px) - 460px);
}

html.is-mobile .qz-reward,
html.is-mobile .qz-box.is-3d ~ .qz-reward {
  top: max(640px, calc(var(--stage-h, 1500px) - 720px));
  left: 18px;
  right: 18px;
  width: auto;
}

html.is-mobile .qz-reward-card,
html.is-mobile .qz-box.is-3d ~ .qz-reward .qz-reward-card {
  width: 100%;
  min-width: 0;
  padding: 16px 22px;
}

html.is-mobile .qz-reward-card b {
  font-size: 36px;
  text-align: center;
}

html.is-mobile .qz-reward-card span {
  font-size: 22px;
  text-align: center;
}

html.is-mobile .qz-reward-icon {
  font-size: 60px;
}

html.is-mobile .qz-reward-item .item-icon {
  width: 92px;
  height: 92px;
}

html.is-mobile .qz-result-buttons {
  bottom: 28px;
  width: 684px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

html.is-mobile .qz-result-buttons .qz-btn-main {
  grid-column: 1 / -1;
}

/* 알림은 위 막대 아래 */
html.is-mobile .qz-toast {
  top: 168px;
  bottom: auto;
  width: max-content;
  max-width: 680px;
  font-size: 24px;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
}

/* 말풍선: 박사(오른쪽 아래) 위, 시작 창에서만(문제·결과 동안은 카드·보상 카드를 가리지 않게) */
html.is-mobile .qz-bubble {
  left: auto;
  right: 16px;
  bottom: 430px;
  width: 300px;
  font-size: 24px;
}

html.is-mobile .qz-bubble::after {
  right: 70px;
}

html.is-mobile [data-mode='question'] .qz-bubble,
html.is-mobile [data-mode='result'] .qz-bubble {
  display: none;
}

/* 도전 골든벨(v5.16) 휴대폰 */
html.is-mobile .qz-cats .qz-mode {
  flex: 1;
  min-width: 0;
  height: 96px;
  padding: 0 10px;
}

html.is-mobile .qz-text-answer {
  top: 640px;
  flex-direction: column;
  gap: 14px;
}

html.is-mobile .qz-text-input {
  width: 600px;
  height: 110px;
  font-size: 56px;
}

html.is-mobile .qz-text-submit {
  width: 600px;
  height: 90px;
  font-size: 36px;
}

html.is-mobile .qz-text-badge {
  font-size: 30px;
  padding: 8px 18px;
}
