/* ==========================================================================
   GEMBOX RUNNING | 젬박스 러닝 - Pixel Arcade Design System
   Google Student Ambassador 2026 – Team Gemini 명지대학교 인문캠퍼스
   ========================================================================== */

:root {
  --navy-dark: #071952;
  --navy-border: #0a2472;
  --royal-blue: #1352e8;
  --royal-bright: #2e7bff;
  --sky-accent: #56b4ff;
  --ice-bg: #f3f9ff;
  --ice-shadow: #cfe4ff;
  --purple-form: #6c42b8;
  --gold-text: #ffb300;
  --font-pixel-ko: "Galmuri11", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "Press Start 2P", "Black Han Sans", "Galmuri11", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #1673eb 0%, #1673eb 55%, #6d4131 55%, #6d4131 100%);
  font-family: var(--font-pixel-ko);
  color: var(--navy-dark);
  word-break: keep-all;
  overflow-wrap: break-word;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* 캔버스: 픽셀아트 선명도 유지 */
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 1;
}

/* ==========================================================================
   공통 씬 레이아웃
   ========================================================================== */
.scene {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 12px) 16px env(safe-area-inset-bottom, 12px);
  overflow-x: hidden;
  overflow-y: auto;
}

.scene.active {
  display: flex;
}

.scene-hud-only {
  pointer-events: none;
  align-items: stretch;
  justify-content: space-between;
  flex-direction: column;
  overflow: hidden;
}

.scene-inner {
  width: 100%;
  min-width: 0;
  max-width: min(920px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   공통 픽셀 카드 & 버튼 컴포넌트
   ========================================================================== */
.pixel-card {
  position: relative;
  background: rgba(246, 251, 255, 0.95);
  border: 3px solid var(--navy-border);
  border-radius: 14px;
  box-shadow:
    inset 0 3px 0 #ffffff,
    inset 0 -5px 0 var(--ice-shadow),
    0 6px 0 rgba(7, 25, 82, 0.36);
  padding: 20px 22px 16px;
}

.card-badge-header {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2d79ff 0%, #0e46c7 100%);
  color: #ffffff;
  border: 3px solid var(--navy-border);
  border-radius: 999px;
  padding: 4px 18px;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 rgba(7, 25, 82, 0.35);
}

.card-badge-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wide-badge {
  padding: 5px 22px;
}

.pixel-btn {
  appearance: none;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-pixel-ko);
  font-weight: 800;
  border: 3px solid var(--navy-dark);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: 1.05rem;
  line-height: 1.2;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}

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

.pixel-btn:active {
  transform: translateY(3px);
}

.btn-primary {
  background: linear-gradient(180deg, #3584ff 0%, #1352e8 52%, #0b3bb3 100%);
  color: #ffffff;
  text-shadow: 0 2px 0 var(--navy-dark);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(5, 20, 74, 0.45),
    0 5px 0 var(--navy-dark);
}

.btn-primary:active {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 var(--navy-dark);
}

.btn-white {
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 100%);
  color: var(--navy-dark);
  box-shadow:
    inset 0 2px 0 #ffffff,
    inset 0 -3px 0 #c6dfff,
    0 5px 0 var(--navy-dark);
}

.btn-white:active {
  box-shadow:
    inset 0 2px 0 #ffffff,
    0 2px 0 var(--navy-dark);
}

.accent-blue {
  color: var(--royal-blue);
  font-weight: 900;
}

.sparkle-dot {
  color: #ffb300;
}

/* ==========================================================================
   SCENE 01. 메인 화면 스타일 (시작 화면 레퍼런스 반영)
   ========================================================================== */
.main-layout {
  gap: 9px;
}

.logo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2px;
}

.logo-swoosh-top {
  width: min(240px, 55vw);
  height: 30px;
  margin-left: auto;
  margin-right: 8px;
  margin-bottom: -12px;
  z-index: 2;
  pointer-events: none;
}

.swoosh-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-banner {
  background: linear-gradient(180deg, #0f48cf 0%, #092b8a 100%);
  border: 3px solid #ffffff;
  outline: 3px solid var(--navy-dark);
  padding: 11px 28px 11px 22px;
  transform: skewX(-13deg);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 7px 0 rgba(7, 25, 82, 0.42);
}

.speed-stripes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.speed-stripes span {
  display: block;
  height: 4px;
  background: #ffffff;
}
.speed-stripes span:nth-child(1) { width: 34px; }
.speed-stripes span:nth-child(2) { width: 28px; }
.speed-stripes span:nth-child(3) { width: 32px; }
.speed-stripes span:nth-child(4) { width: 24px; }

.logo-title {
  margin: 0;
  font-family: "Black Han Sans", "Press Start 2P", var(--font-pixel-ko);
  font-size: clamp(1.55rem, 4.4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow:
    3px 3px 0 #061b61,
    0 0 12px rgba(96, 179, 255, 0.55);
  white-space: nowrap;
}

.main-copy-pill {
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid var(--navy-border);
  border-radius: 999px;
  padding: 8px 26px;
  font-size: clamp(0.96rem, 2.2vw, 1.25rem);
  font-weight: 800;
  box-shadow:
    inset 0 -3px 0 var(--ice-shadow),
    0 4px 0 rgba(7, 25, 82, 0.28);
  text-align: center;
}

.sub-copy-text {
  margin: 0 0 6px;
  font-size: clamp(0.84rem, 1.8vw, 1rem);
  font-weight: 800;
  color: #ffffff;
  text-shadow:
    -2px -2px 0 var(--navy-dark),
    2px -2px 0 var(--navy-dark),
    -2px 2px 0 var(--navy-dark),
    2px 2px 0 var(--navy-dark),
    0 3px 0 var(--navy-dark);
  text-align: center;
}

.chevrons {
  color: #aee0ff;
  margin: 0 4px;
}

.prize-card {
  width: 100%;
  max-width: 540px;
  padding-top: 22px;
  padding-bottom: 12px;
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}

.prize-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 4px;
  border-right: 2px solid #d7e7ff;
}

.prize-item:last-child {
  border-right: none;
}

.medal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--navy-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 2px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
}
.medal-gold { background: #ffd54f; color: #6d4000; }
.medal-silver { background: #dfe8f2; color: #34495e; }
.medal-bronze { background: #ffab73; color: #5d2906; }
.medal-ribbon { background: #ffe066; color: #8c1d18; }

.prize-rank {
  font-size: 0.85rem;
  color: var(--navy-dark);
}

.prize-naver {
  font-size: 0.7rem;
  color: #3f598a;
  font-weight: 700;
}

.prize-amount {
  font-size: clamp(0.82rem, 1.9vw, 0.98rem);
  font-weight: 900;
  color: var(--navy-dark);
}

.prize-total-row {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 2px dashed #c8defc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 800;
}

.prize-participation-row {
  background: #eaf3ff;
  border: 2px solid #bed8ff;
  border-radius: 10px;
  padding: 7px 12px;
  margin-top: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.bonus-pill {
  background: linear-gradient(180deg, #ffb300 0%, #f57c00 100%);
  color: #ffffff;
  border: 2px solid var(--navy-dark);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(7, 25, 82, 0.5);
  white-space: nowrap;
}

.bonus-pill.compact-pill {
  font-size: 0.73rem;
  padding: 2px 8px;
}

.bonus-desc {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.38;
}

.bonus-desc strong {
  color: var(--royal-blue);
  font-weight: 900;
}

.main-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin-top: 2px;
}

.btn-game-start {
  flex: 1 1 250px;
  font-size: clamp(1.12rem, 2.4vw, 1.38rem);
  letter-spacing: 0.03em;
  padding: 14px 24px;
}

.tri {
  font-size: 0.82em;
  opacity: 0.92;
}

.btn-signup-main {
  flex: 1 1 250px;
  padding: 10px 18px;
  gap: 12px;
  text-align: left;
}

.google-g-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.signup-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.84rem;
  font-weight: 800;
}

.signup-btn-copy strong {
  font-size: 0.95rem;
  color: var(--navy-dark);
}

.signup-btn-copy span {
  color: var(--royal-blue);
}

.ext-arrow {
  font-style: normal;
  font-weight: 900;
}

.bottom-capture-pill {
  background: rgba(244, 250, 255, 0.95);
  border: 3px solid var(--navy-border);
  border-radius: 999px;
  padding: 7px 20px;
  font-size: clamp(0.8rem, 1.8vw, 0.94rem);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 0 rgba(7, 25, 82, 0.3);
  text-align: center;
}

/* ==========================================================================
   SCENE 02. 시작 전 안내 화면
   ========================================================================== */
.center-modal-layout {
  max-width: 470px;
}

.ready-card {
  width: 100%;
  text-align: center;
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ready-title {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 3.6vw, 1.85rem);
  font-weight: 900;
  color: var(--navy-dark);
}

.ready-desc {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #27447e;
  line-height: 1.45;
}

.controls-box {
  width: 100%;
  background: #e7f2ff;
  border: 2px solid #9ec5ff;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 800;
}

.device-tag {
  background: var(--royal-blue);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  min-width: 58px;
  text-align: center;
}

.mobile-tag {
  background: #0d7a5f;
}

kbd {
  background: #ffffff;
  border: 2px solid var(--navy-border);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  color: var(--navy-dark);
}

.ready-capture-alert {
  width: 100%;
  background: #fff8db;
  border: 2px solid #f0b429;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #6b4400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-wide {
  width: 100%;
  max-width: 320px;
  font-size: 1.15rem;
  padding: 14px 24px;
}

/* ==========================================================================
   SCENE 03. 게임 플레이 HUD (플레이화면 레퍼런스 반영)
   ========================================================================== */
.play-hud {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 6px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hud-badge {
  background: linear-gradient(180deg, rgba(16, 54, 146, 0.92) 0%, rgba(9, 29, 88, 0.94) 100%);
  border: 2px solid #9fd2ff;
  outline: 3px solid var(--navy-dark);
  border-radius: 12px;
  color: #ffffff;
  box-shadow: 0 4px 0 rgba(7, 25, 82, 0.45);
}

.hud-score-badge {
  padding: 6px 20px 8px 16px;
  display: flex;
  flex-direction: column;
  min-width: 168px;
}

.hud-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #9fd2ff;
  letter-spacing: 0.06em;
}

.hud-value {
  font-family: "Press Start 2P", var(--font-pixel-ko);
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 2px 2px 0 #041246;
  margin-top: 3px;
}

.hud-time-badge {
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hud-time-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #9fd2ff;
}

.hud-time-value {
  font-family: "Press Start 2P", var(--font-pixel-ko);
  font-size: clamp(0.88rem, 2vw, 1.08rem);
  color: #ffffff;
  text-shadow: 2px 2px 0 #041246;
}

.touch-hint {
  margin: auto auto 14px;
  background: rgba(7, 25, 82, 0.78);
  color: #ffffff;
  border: 2px solid rgba(159, 210, 255, 0.75);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: opacity 0.45s ease;
}

.touch-hint.fade-out {
  opacity: 0;
}

/* ==========================================================================
   SCENE 04. GAME OVER 화면 (캡처 최적화 + 레퍼런스 반영)
   ========================================================================== */
.gameover-layout {
  max-width: 540px;
  gap: 10px;
}

.gameover-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mini-logo-badge {
  background: linear-gradient(180deg, #1352e8 0%, #092c8a 100%);
  color: #ffffff;
  border: 2px solid #ffffff;
  outline: 2px solid var(--navy-dark);
  padding: 4px 16px;
  transform: skewX(-12deg);
  font-weight: 900;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gameover-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gameover-title {
  margin: 0;
  font-family: "Press Start 2P", "Black Han Sans", var(--font-pixel-ko);
  font-size: clamp(1.65rem, 5vw, 2.55rem);
  color: #ffffff;
  letter-spacing: 0.04em;
  text-shadow:
    -3px -3px 0 var(--navy-dark),
    3px -3px 0 var(--navy-dark),
    -3px 3px 0 var(--navy-dark),
    3px 3px 0 var(--navy-dark),
    0 6px 0 #092b8a;
}

.checker-flag {
  font-size: clamp(1.3rem, 3.2vw, 1.8rem);
}

.score-capture-card {
  width: 100%;
  text-align: center;
  padding: 18px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.capture-game-tag {
  font-size: 0.74rem;
  font-weight: 900;
  color: var(--royal-blue);
  background: #e1eeff;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.your-score-label {
  font-family: "Press Start 2P", var(--font-pixel-ko);
  font-size: 0.85rem;
  color: #1c3a78;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.score-laurel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 2px 0;
}

.laurel {
  font-size: 1.75rem;
  filter: hue-rotate(-18deg) saturate(1.8);
}

.laurel-right {
  transform: scaleX(-1);
}

.final-score-num {
  font-family: "Press Start 2P", "Black Han Sans", var(--font-pixel-ko);
  font-size: clamp(2rem, 6.5vw, 3.05rem);
  color: var(--navy-dark);
  text-shadow: 0 3px 0 #c6dcff;
  letter-spacing: 0.03em;
}

.record-id-pill {
  background: #dfeeff;
  border: 2px solid #96beff;
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #163675;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.record-id-pill strong {
  color: var(--royal-blue);
  letter-spacing: 0.03em;
}

.record-id-pill.compact {
  padding: 4px 12px;
  font-size: 0.78rem;
}

.gameover-Mascot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

#gameover-char-canvas {
  width: 92px;
  height: 80px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.capture-speech-bubble {
  position: relative;
  background: #ffffff;
  border: 3px solid var(--navy-border);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: clamp(0.85rem, 2.1vw, 0.98rem);
  font-weight: 900;
  color: var(--navy-dark);
  box-shadow: 0 4px 0 rgba(7, 25, 82, 0.28);
}

.gameover-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.btn-gameover-action {
  flex: 1 1 200px;
  padding: 13px 18px;
}

/* ==========================================================================
   SCENE 05. 이벤트 참여 안내 화면 (레퍼런스 2단 레이아웃 지원)
   ========================================================================== */
.event-layout {
  max-width: 900px;
  gap: 12px;
}

.event-top-bar {
  display: flex;
  justify-content: center;
}

.event-two-col {
  width: 100%;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  align-items: stretch;
}

.event-score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 18px 14px;
}

.event-score-num {
  font-family: "Press Start 2P", var(--font-pixel-ko);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  color: var(--navy-dark);
  margin: 4px 0;
}

.side-capture-tip {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #365694;
  line-height: 1.4;
}

.pixel-link-btn {
  margin-top: 4px;
  background: transparent;
  border: none;
  color: var(--royal-blue);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.event-main-panel {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.step-box {
  background: #ffffff;
  border: 2px solid #9dc3ff;
  border-radius: 12px;
  padding: 16px 14px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
}

.step-pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--royal-blue);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 999px;
  border: 2px solid var(--navy-dark);
}

.step-body {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.step-icon-wrap {
  flex-shrink: 0;
}

.step-text {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.42;
  color: var(--navy-dark);
}

.step-arrow {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--royal-blue);
}

.btn-step-blue {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  background: linear-gradient(180deg, #2d7cff 0%, #114ce0 100%);
  color: #ffffff;
  box-shadow: 0 4px 0 var(--navy-dark);
}

.btn-step-purple {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  background: linear-gradient(180deg, #8658d6 0%, #5e35b1 100%);
  color: #ffffff;
  box-shadow: 0 4px 0 #2e1563;
}

.event-reward-box {
  background: #edf5ff;
  border: 2px solid #b7d4ff;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.event-reward-header {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--navy-border);
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.event-reward-header strong {
  color: #ffe066;
}

.event-reward-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--navy-dark);
}

.event-participation-row {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 2px dashed #c6ddff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--navy-dark);
}

.event-participation-row strong {
  color: var(--royal-blue);
}

.event-reward-footnote {
  margin: 6px 0 0;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--royal-blue);
}

.event-bottom-cta {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   안내 모달
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 17, 58, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
}

.modal-message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-line;
  color: #213c75;
  font-weight: 700;
}

/* ==========================================================================
   반응형 미디어 쿼리 (모바일 세로 / 가로 작은 화면 완벽 대응)
   ========================================================================== */
@media (max-width: 780px) {
  .event-two-col {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .event-score-side {
    padding: 12px 14px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .side-capture-tip {
    display: none;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step-arrow {
    display: none;
  }

  .event-reward-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .scene {
    padding: 10px 12px;
  }

  .logo-wrap {
    max-width: 100%;
  }

  .logo-banner {
    max-width: calc(100vw - 32px);
    padding: 8px 14px;
    gap: 8px;
    transform: skewX(-9deg);
  }

  .logo-title {
    font-size: clamp(1.08rem, 5.8vw, 1.48rem);
  }

  .speed-stripes span:nth-child(1) { width: 16px; }
  .speed-stripes span:nth-child(2) { width: 12px; }
  .speed-stripes span:nth-child(3) { width: 14px; }
  .speed-stripes span:nth-child(4) { width: 10px; }

  .main-copy-pill {
    max-width: 100%;
    padding: 7px 14px;
    font-size: 0.9rem;
  }

  .prize-card {
    padding: 20px 10px 10px;
  }

  .prize-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 6px;
  }

  .prize-item {
    border-right: none;
    background: #eef6ff;
    border-radius: 8px;
    padding: 6px 4px;
  }

  .prize-naver {
    display: none;
  }

  .prize-total-row {
    font-size: 0.78rem;
    flex-wrap: wrap;
  }

  .main-cta-row {
    gap: 9px;
  }

  .btn-game-start,
  .btn-signup-main {
    flex: 1 1 100%;
    min-width: 0;
  }

  .bottom-capture-pill {
    max-width: 100%;
    padding: 7px 12px;
    font-size: 0.76rem;
  }

  .hud-score-badge {
    min-width: 132px;
    padding: 5px 12px 7px;
  }

  .hud-time-badge {
    padding: 7px 11px;
  }

  .score-laurel-wrap {
    gap: 6px;
  }

  .final-score-num {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .gameover-Mascot-row {
    gap: 8px;
  }

  #gameover-char-canvas {
    width: 72px;
    height: 62px;
  }
}

/* 모바일 가로 모드(높이가 낮은 화면) 컴팩트 조정 */
@media (max-height: 520px) {
  .scene-inner {
    gap: 6px;
  }
  .logo-swoosh-top {
    display: none;
  }
  .logo-banner {
    padding: 6px 16px;
  }
  .prize-card {
    padding: 16px 14px 8px;
  }
  .pixel-btn {
    padding: 9px 16px;
  }
}
