* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Galmuri9', monospace, sans-serif;
  -webkit-tap-highlight-color: transparent;
  image-rendering: pixelated;
}

:root {
  --bg-dark: #090a0d;
  --card-bg: #131418;
  --btn-bg: #1c1d24;
  --btn-hover: #252730;
  --text-main: #f1f2f6;
  --text-sub: #8d909b;
  --text-muted: #6b6e7a;
  
  --wine-light: #b01e2c;
  --wine-main: #7a0f19;
  --wine-dark: #40050b;
  --wine-sub: rgba(122, 15, 25, 0.18);
  --wine-border: rgba(176, 30, 44, 0.42);

  --gold-light: #fbbf24;
  --gold-main: #d97706;
  --gold-sub: rgba(245, 158, 11, 0.14);
  --gold-border: rgba(245, 158, 11, 0.45);

  --cyan-light: #38bdf8;
  --cyan-main: #0284c7;
  --cyan-sub: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.45);

  --accent-green: #4ade80;
  --accent-pink: #f472b6;
  --accent-red: #ef4444;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card, .color-card, .door-card, .rps-card, .zener-card, .start-accent-btn, .action-btn, .lang-btn, .game-btn, .game-btn-advanced, .omr-row, .accordion-trigger {
  touch-action: manipulation;
}

.star-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.5;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.12; }
}

#celebration-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* ========================================================
   포탈 폭발(Warp Explosion) & 빛 플래시 연출
======================================================== */
.portal-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portal-flash.flash-active {
  opacity: 0.88;
}

#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #050608;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.6s ease;
}

.orb-stage {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), filter 0.65s ease, opacity 0.65s ease;
}

.orb-stage.warp-explode {
  transform: scale(4.2);
  filter: blur(14px) brightness(2.2);
  opacity: 0;
}

.mystic-crystal-orb {
  position: absolute;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.3) 0%, rgba(176, 30, 44, 0.25) 32%, rgba(40, 5, 11, 0.45) 70%, rgba(9, 10, 13, 0.85) 100%);
  box-shadow: 
    inset 0 0 35px rgba(255, 157, 165, 0.25),
    inset 0 0 15px rgba(255, 255, 255, 0.35),
    0 0 50px rgba(176, 30, 44, 0.45),
    0 0 100px rgba(122, 15, 25, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 157, 165, 0.22);
  animation: orbPulse 4s infinite ease-in-out;
  z-index: 1;
}

.mystic-crystal-orb::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 42px;
  width: 60px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.5) 0%, transparent 80%);
  transform: rotate(-32deg);
  filter: blur(1.5px);
}

.astral-ring {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  border: 1px dashed rgba(229, 144, 152, 0.25);
  animation: ringRotate 24s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.astral-ring::before {
  content: "✦";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #fde68a;
  text-shadow: 0 0 8px #fbbf24;
}

@keyframes orbPulse {
  0%, 100% {
    transform: scale(0.97);
    box-shadow: inset 0 0 30px rgba(255, 157, 165, 0.2), 0 0 40px rgba(176, 30, 44, 0.35);
  }
  50% {
    transform: scale(1.03);
    box-shadow: inset 0 0 45px rgba(255, 157, 165, 0.35), 0 0 70px rgba(176, 30, 44, 0.6), 0 0 120px rgba(122, 15, 25, 0.4);
  }
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.typing-line {
  font-family: "Silkscreen", "Galmuri9", monospace;
  font-size: 2.1rem;
  font-weight: 700;
  margin: 3px 0;
  min-height: 3rem;
  letter-spacing: 0px;
  text-align: center;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: break-word;
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #ffffff 0%, #ffc5cb 45%, #e59098 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 14px rgba(176, 30, 44, 0.5));
}

.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 450px;
  height: 60px;
  background: rgba(9, 10, 13, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.brand-box {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.brand-title {
  font-family: "Silkscreen", "Galmuri9", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  display: inline-block;
  background: linear-gradient(180deg, #f3f4f6 0%, #cbd5e1 50%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.brand-desc {
  font-size: 0.72rem;
  color: var(--text-sub);
  margin-top: 3px;
  letter-spacing: 0;
}

.language-selector {
  display: flex;
  background: #15161c;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.2s ease;
}

.language-selector.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: #252732;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#main-content {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  width: 100%;
  max-width: 450px;
  min-height: calc(100vh - 60px);
  min-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  padding: 0 12px 16px 12px;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.spacer-top {
  flex: 1;
  min-height: 10px;
}

.main-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.spacer-bottom {
  flex: 3;
  min-height: 24px;
}

.section-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 26px;
  padding: 24px 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
  overflow: hidden;
  position: relative;
}

/* ========================================================
   첫 화면(Intro Hero) 콤팩트 임팩트 UI
======================================================== */
.intro-hero-card {
  padding: 34px 18px 24px 18px;
  background: radial-gradient(circle at 50% 10%, rgba(122, 15, 25, 0.22) 0%, rgba(19, 20, 24, 0.98) 75%);
  border: 1px solid rgba(176, 30, 44, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-badge-wrap {
  display: flex;
  justify-content: center;
}

.hero-badge {
  font-family: "Silkscreen", monospace;
  font-size: 0.76rem;
  letter-spacing: 1.5px;
  color: #ff9da5;
  background: rgba(122, 15, 25, 0.35);
  border: 1px solid var(--wine-border);
  padding: 5px 14px;
  border-radius: 20px;
  text-shadow: 0 0 10px rgba(176, 30, 44, 0.5);
}

.hero-core-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.hero-sparkle-icon {
  font-size: 1.7rem;
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
  animation: pulseGlow 2.2s infinite ease-in-out;
}

.hero-provocative-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
  word-break: keep-all;
  letter-spacing: -0.5px;
}

.hero-provocative-title .gradient-text {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.4));
}

.hero-minimal-sub {
  font-family: "Pretendard", sans-serif;
  font-size: 0.86rem;
  color: #9ca3af;
  line-height: 1.6;
  word-break: keep-all;
  max-width: 320px;
}

.hero-start-btn {
  max-width: 320px;
  height: 56px;
  padding: 0 28px;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  box-shadow: 0 8px 30px rgba(176, 30, 44, 0.6), inset 0 0 14px rgba(255, 255, 255, 0.2);
}

.hero-start-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 36px rgba(176, 30, 44, 0.8), inset 0 0 18px rgba(255, 255, 255, 0.3);
}

.btn-arrow-icon {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.hero-start-btn:hover .btn-arrow-icon {
  transform: translateX(4px);
}

/* ========================================================
   명언 아코디언 컴포넌트 스타일
======================================================== */
.accordion-container {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(18, 19, 24, 0.7);
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-container:hover {
  border-color: rgba(176, 30, 44, 0.35);
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-main);
  text-align: left;
}

.acc-badge {
  font-family: "Silkscreen", monospace;
  font-size: 0.65rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.acc-title {
  font-size: 0.82rem;
  color: #d1d5db;
  flex: 1;
}

.acc-chevron {
  font-size: 0.72rem;
  color: #8d909b;
  transition: transform 0.3s ease;
}

.accordion-container.is-open .acc-chevron {
  transform: rotate(180deg);
  color: var(--gold-light);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-inner {
  padding: 6px 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-accordion-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.quote-accordion-card .quote-en {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
  color: #f1f2f6;
  margin-bottom: 6px;
  word-break: keep-all;
}

.quote-accordion-card .quote-author-line {
  font-size: 0.76rem;
  color: #e59098;
  margin-bottom: 6px;
}

.quote-accordion-card .quote-kr {
  font-family: "Pretendard", "Galmuri9", sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #9ca3af;
  word-break: keep-all;
}

/* 5교시 타임어택 긴급 테두리 */
.section-card.panic-border {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.5) !important;
  animation: retroPanic 0.8s infinite alternate;
}

@keyframes retroPanic {
  0% { transform: scale(1); }
  100% { transform: scale(1.015); }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 16px;
  padding: 0 2px;
}

/* 모드 선택 헤더 */
.mode-step-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.mode-header-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 0 4px;
}

.mode-header-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(122, 15, 25, 0.3);
  border: 1px solid var(--wine-border);
  color: #ff9da5;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.mode-header-guide {
  font-size: 0.96rem;
  color: #ffffff;
  letter-spacing: 0;
}

.mode-selection-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.game-grid-top {
  display: grid;
  gap: 12px;
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
}

.game-btn {
  background: var(--btn-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 10px 18px 10px;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.game-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
  border-color: var(--wine-border);
  box-shadow: 0 8px 20px rgba(122, 15, 25, 0.25);
}

.game-btn:active {
  transform: scale(0.97);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.icon-box svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: #d66d77;
}

.game-label {
  font-size: 0.84rem;
  color: var(--text-main);
  text-align: center;
  letter-spacing: 0;
  line-height: 1.35;
  word-break: keep-all;
}

/* 마스터 직감 테스트 (골드 테마) */
.game-btn-advanced {
  background: linear-gradient(135deg, rgba(38, 30, 20, 0.88) 0%, rgba(22, 22, 28, 0.96) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 0 18px rgba(245, 158, 11, 0.1);
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.game-btn-advanced:hover {
  background: linear-gradient(135deg, rgba(48, 38, 22, 0.96) 0%, rgba(28, 28, 36, 0.98) 100%);
  transform: translateY(-2px);
  border-color: var(--gold-light);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.25), inset 0 0 22px rgba(245, 158, 11, 0.16);
}

.game-btn-advanced:active {
  transform: scale(0.98);
}

.game-btn-advanced .icon-box {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: var(--gold-sub);
}

.game-btn-advanced .icon-box svg {
  stroke: var(--gold-light);
}

.advanced-left {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.advanced-info-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.advanced-tag {
  font-size: 0.7rem;
  color: #fde68a;
  background: var(--gold-sub);
  border: 1px solid var(--gold-border);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
  letter-spacing: 0;
}

.advanced-title {
  font-size: 0.96rem;
  color: #ffffff;
  letter-spacing: 0;
}

.advanced-sub {
  font-size: 0.74rem;
  color: #d1d5db;
  line-height: 1.4;
  letter-spacing: 0;
}

.advanced-arrow {
  font-size: 1.15rem;
  color: var(--gold-light);
  padding-left: 6px;
  transition: transform 0.2s ease;
}

.game-btn-advanced:hover .advanced-arrow {
  transform: translateX(3px);
}

/* 스페셜 게임 (사이버 사이언 테마) */
.game-btn-advanced.special-exam {
  background: linear-gradient(135deg, rgba(14, 30, 48, 0.9) 0%, rgba(15, 20, 32, 0.96) 100%);
  border: 1px solid var(--cyan-border);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 0 18px rgba(56, 189, 248, 0.12);
}

.game-btn-advanced.special-exam:hover {
  background: linear-gradient(135deg, rgba(18, 42, 68, 0.96) 0%, rgba(20, 26, 42, 0.98) 100%);
  border-color: var(--cyan-light);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.25), inset 0 0 22px rgba(56, 189, 248, 0.18);
}

.special-tag {
  color: #bae6fd !important;
  background: var(--cyan-sub) !important;
  border-color: var(--cyan-border) !important;
}

.special-icon {
  border: 1px solid var(--cyan-border) !important;
  background: var(--cyan-sub) !important;
}

.special-icon svg {
  stroke: var(--cyan-light) !important;
}

.special-arrow {
  color: var(--cyan-light) !important;
}

/* 모의고사 전용 컴포넌트 스타일 */
.special-tag-badge {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--cyan-light);
  background: var(--cyan-sub);
  border: 1px solid var(--cyan-border);
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.exam-main-title {
  font-size: 1.25rem;
  color: #fbbf24;
  margin-bottom: 14px;
  line-height: 1.45;
}

.exam-intro-desc {
  font-family: "Pretendard", "Galmuri9", sans-serif;
  font-size: 0.84rem;
  color: #d1d5db;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  line-height: 1.65;
  text-align: left;
  margin-bottom: 18px;
  word-break: keep-all;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
  text-align: left;
}

.info-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
}

.info-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.info-val {
  font-size: 0.8rem;
  color: #fbbf24;
}

.start-accent-btn.exam-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 55%, #0c4a6e 100%);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

.start-accent-btn.exam-btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 55%, #0369a1 100%);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.55);
}

/* 모의고사 문제 화면 */
.exam-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
}

.exam-stage-tag {
  font-size: 0.85rem;
  color: var(--cyan-light);
}

.exam-timer-tag {
  font-size: 0.78rem;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 8px;
  border-radius: 6px;
}

.exam-timer-tag.panic {
  color: var(--accent-red) !important;
  border-color: var(--accent-red) !important;
  animation: blink 0.8s infinite alternate;
}

@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}

.exam-question-wrap {
  text-align: left;
  margin-bottom: 16px;
}

.exam-q-number {
  font-size: 1rem;
  color: #fbbf24;
  margin-bottom: 8px;
}

.exam-q-passage {
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid var(--cyan-light);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  font-size: 0.86rem;
  color: #ffffff;
  line-height: 1.55;
  margin-bottom: 10px;
  word-break: keep-all;
}

.exam-q-prompt {
  font-size: 0.84rem;
  color: #d1d5db;
  line-height: 1.45;
  word-break: keep-all;
}

.omr-guide-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.omr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.omr-row {
  background: rgba(22, 24, 34, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.omr-row:hover {
  background: #25283a;
  border-color: var(--cyan-light);
}

.omr-idx {
  width: 24px;
  height: 24px;
  background: #2563eb;
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.omr-label {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.35;
  word-break: keep-all;
}

.omr-row.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4) !important;
}

.omr-row.correct .omr-idx {
  background: #10b981 !important;
  color: #000 !important;
}

.omr-row.wrong {
  border-color: #ef4444 !important;
  opacity: 0.5 !important;
}

.omr-row.wrong .omr-idx {
  background: #ef4444 !important;
  color: #fff !important;
}

/* 모의고사 성적표 */
.result-box {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.4);
}

.res-stamp {
  font-size: 2.8rem;
  margin-bottom: 6px;
}

.res-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.res-badge.grade-1 { background: #fbbf24; color: #000; }
.res-badge.grade-2 { background: var(--cyan-light); color: #000; }
.res-badge.grade-3 { background: var(--accent-pink); color: #000; }

.res-title {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 4px;
}

.res-sub {
  font-size: 0.82rem;
  color: var(--cyan-light);
  margin-bottom: 14px;
}

.res-table {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  text-align: left;
}

.res-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.res-row:last-child {
  border-bottom: none;
}

.res-row .lbl { color: var(--text-muted); }
.res-row .val { color: #fbbf24; }

.res-comment {
  font-family: "Pretendard", "Galmuri9", sans-serif;
  font-size: 0.82rem;
  color: #d1d5db;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #fbbf24;
  border-radius: 0 8px 8px 0;
  padding: 12px;
  line-height: 1.6;
  text-align: left;
  word-break: keep-all;
}

/* 전체 게임 공통 정답 / 오답 하이라이트 효과 */
.card-correct {
  border-color: #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.55), inset 0 0 14px rgba(16, 185, 129, 0.25) !important;
  transform: translateY(-4px) scale(1.04) !important;
  z-index: 10 !important;
}

.card.card-correct .card-face-back {
  border: 2.5px solid #10b981 !important;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.6) !important;
  color: #065f46 !important;
}

.card-wrong {
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
  opacity: 0.55 !important;
}

.card.card-wrong .card-face-back {
  border: 2px solid #ef4444 !important;
  color: #991b1b !important;
  opacity: 0.5 !important;
}

.card-dimmed {
  opacity: 0.35 !important;
  filter: grayscale(40%) !important;
  transform: scale(0.96) !important;
  transition: all 0.3s ease !important;
}

/* 스토리 카드 */
.story-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 8px 18px 8px;
  text-align: left;
  box-shadow: none;
}

.story-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: #e59098;
  background: var(--wine-sub);
  border: 1px solid var(--wine-border);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  letter-spacing: 0;
}

.story-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.story-icon {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.04);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-title-box strong {
  display: block;
  font-size: 0.92rem;
  color: #ffffff;
  letter-spacing: 0;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.story-title-box span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.story-desc {
  font-family: "Pretendard", "Galmuri9", sans-serif;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #b8bccb;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-align: center;
}

.start-accent-btn {
  background: linear-gradient(135deg, #a71d2a 0%, #730a13 55%, #420207 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 17px 32px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 0;
  box-shadow: 0 8px 26px rgba(115, 10, 19, 0.55), 0 0 14px rgba(66, 2, 7, 0.4);
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  white-space: nowrap;
}

.start-accent-btn:hover {
  background: linear-gradient(135deg, #b92634 0%, #870f19 55%, #52050b 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(115, 10, 19, 0.65), 0 0 18px rgba(66, 2, 7, 0.5);
}

.start-accent-btn:active {
  transform: scale(0.98);
}

.action-btn {
  background: linear-gradient(135deg, #373945, #22232c);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 36px;
  border-radius: 30px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0;
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.action-btn:hover {
  background: #444756;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-bottom: 18px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #b01e2c, #f59e0b);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-badge {
  display: inline-block;
  font-size: 1.05rem;
  padding: 6px 18px;
  border-radius: 22px;
  background: var(--wine-sub);
  color: #ff9da5;
  border: 1px solid var(--wine-border);
  margin-bottom: 14px;
  letter-spacing: 0;
}

.question-text {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 24px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  letter-spacing: 0;
}

.cards-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 20px 0 24px 0;
  flex-wrap: wrap;
  max-width: 420px;
}

/* 3D 카드 플립 */
.card {
  width: 76px;
  height: 112px;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  cursor: pointer;
  position: relative;
  user-select: none;
  background: transparent;
  border: none;
}

.card:hover { transform: translateY(-4px) scale(1.03); }

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.card.is-flipped .card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-face-front {
  background-color: #171116;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(122, 15, 25, 0.35) 0%, transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 8px);
  border: 1.5px solid var(--wine-border);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.6);
  transform: rotateY(0deg);
  -webkit-transform: rotateY(0deg);
  z-index: 2;
}

.card-face-front::after {
  content: "✦";
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border: 1px solid rgba(176, 30, 44, 0.4);
  border-radius: 12px;
  font-size: 1.2rem;
  color: #e59098;
  text-shadow: 0 0 10px rgba(176, 30, 44, 0.6);
  box-shadow: inset 0 0 10px rgba(122, 15, 25, 0.25);
}

.card-face-back {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #111215;
  font-size: 1.7rem;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* 색상 오브 */
.color-card {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  user-select: none;
  background: radial-gradient(circle at 35% 30%, #2a2c36 0%, #15161c 65%, #0d0e12 100%);
  border: 2px solid rgba(176, 30, 44, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.15), inset 0 -4px 8px rgba(0, 0, 0, 0.7);
  position: relative;
}

.color-card:not(.revealed)::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 144, 152, 0.4) 0%, transparent 70%);
  box-shadow: 0 0 12px rgba(176, 30, 44, 0.5);
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.85; }
}

.color-card:hover { 
  transform: translateY(-3px) scale(1.06); 
  border-color: rgba(229, 144, 152, 0.7);
  box-shadow: 0 12px 28px rgba(122, 15, 25, 0.35);
}

.color-card.revealed {
  border: 3px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* 아치형 도어 */
.door-card {
  width: 90px;
  height: 132px;
  border-radius: 20px;
  background: linear-gradient(145deg, #1f1419 0%, #0d0e12 100%);
  border: 1.5px solid var(--wine-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.5), inset 0 0 16px rgba(122, 15, 25, 0.2);
  transition: all 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  padding: 10px 8px;
}

.door-card:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: #ff9da5;
  box-shadow: 0 14px 32px rgba(176, 30, 44, 0.38), inset 0 0 20px rgba(176, 30, 44, 0.3);
}

.door-card svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: all 0.3s ease;
}

/* 가위바위보 카드 */
.rps-card {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #1c1d24;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.rps-card:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--wine-border);
}

/* 제너 심볼 카드 */
.zener-card {
  width: 74px;
  height: 108px;
  border-radius: 18px;
  background: linear-gradient(145deg, #181920 0%, #0e0f14 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), inset 0 0 14px rgba(245, 158, 11, 0.08);
  transition: all 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  font-size: 2rem;
  color: #94a3b8;
  user-select: none;
}

.zener-card:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--gold-light);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.zener-card.revealed {
  border: 2px solid var(--gold-light);
  color: #fde68a;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.7);
}

/* 대전 결과 표시 */
.result-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 18px 0;
}

.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-sub);
}

.result-image {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: #1c1d24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

/* 결과 메시지 */
.result-msg {
  font-size: 0.98rem;
  margin: 22px 0 16px 0;
  padding: 18px 18px;
  border-radius: 18px;
  line-height: 1.65;
  display: none;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  letter-spacing: 0;
}

.success {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.failure {
  background: rgba(122, 15, 25, 0.22);
  color: #ff9da5;
  border: 1px solid var(--wine-border);
}

.draw {
  background: rgba(122, 15, 25, 0.16);
  color: #e59098;
  border: 1px solid var(--wine-border);
}

/* 오늘의 조언 카드 */
.advice-header-tag {
  display: inline-block;
  font-size: 0.92rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 20px;
  word-break: keep-all;
  overflow-wrap: break-word;
  letter-spacing: 0;
}

.advice-quote-box {
  background: linear-gradient(145deg, rgba(28, 20, 24, 0.85) 0%, rgba(18, 19, 24, 0.95) 100%);
  border: 1px solid var(--wine-border);
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.advice-quote-text {
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1.6;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

.advice-desc {
  font-family: "Pretendard", "Galmuri9", sans-serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #c9ccd6;
  margin-bottom: 26px;
  padding: 0 8px;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

.btn-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 25px;
  font-size: 0.84rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  backdrop-filter: blur(8px);
  animation: fadeInOut 2.5s ease forwards;
  pointer-events: none;
  letter-spacing: 0;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

.hidden { display: none !important; }

/* ========================================================
   [신규] 캡처 이미지 롱프레스 모달 스타일
======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.25s ease;
}

.modal-content {
  background: #14151b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  width: 100%;
  max-width: 380px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: modalScaleUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fbbf24;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.modal-guide {
  font-family: "Pretendard", sans-serif;
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 14px;
  border-radius: 12px;
  width: 100%;
  word-break: keep-all;
}

.modal-guide strong {
  color: #fbbf24;
}

.captured-img-container {
  width: 100%;
  max-height: 52vh;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 16px;
  background: #090a0d;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.6);
  -webkit-overflow-scrolling: touch;
}

.captured-img-container img {
  width: 100%;
  display: block;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default; /* iOS 롱프레스 사진 저장 메뉴 활성화 */
}

.modal-btn {
  width: 100%;
  background: #252732;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px;
  border-radius: 16px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn:hover {
  background: #333644;
}

/* 캡처 박스 및 워터마크 스타일 */
.capture-target-box {
  width: 100%;
  padding: 8px 4px 12px 4px;
  border-radius: 18px;
  background: transparent;
}

.watermark-sign {
  font-family: "Silkscreen", monospace;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 10px;
  letter-spacing: 0.5px;
}

@media (max-width: 480px) {
  .orb-stage { width: 270px; height: 270px; }
  .mystic-crystal-orb { width: 230px; height: 230px; }
  .astral-ring { width: 260px; height: 260px; }
  .typing-line { font-size: 1.7rem; min-height: 2.5rem; }
  .hero-provocative-title { font-size: 1.3rem; }
  .card { width: 68px; height: 102px; }
  .color-card { width: 62px; height: 62px; }
  .door-card { width: 80px; height: 120px; }
  .zener-card { width: 68px; height: 98px; font-size: 1.8rem; }
  .rps-card { width: 72px; height: 72px; font-size: 32px; }
  .question-text { font-size: 1.05rem; }
  .result-msg { font-size: 0.9rem; }
  .advanced-title { font-size: 0.9rem; }
  .advanced-sub { font-size: 0.72rem; }
  .advice-quote-text { font-size: 1.02rem; }
}

@keyframes cardDeal {
  0% { opacity: 0; transform: translateY(24px) scale(0.88); }
  70% { transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.card, .color-card, .door-card, .rps-card, .zener-card {
  animation: cardDeal 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}