/* ==========================================================================
   PlayLab (플레이랩) — 감각·두뇌·생존 종합 놀이터 디자인 시스템
   ========================================================================== */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f3fa;
  --text: #161a2d;
  --text-sub: #5b627a;
  --text-muted: #8a92aa;
  --border: #e5e8f2;

  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-soft: #eef2ff;
  --coral: #ff5a5f;
  --coral-soft: #fff1f2;
  --emerald: #10b981;
  --emerald-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --pink: #ec4899;
  --pink-soft: #fdf2f8;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(22, 26, 45, 0.05);
  --shadow-md: 0 10px 30px rgba(22, 26, 45, 0.08);
  --shadow-glow: 0 12px 32px rgba(79, 70, 229, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, a {
  font-family: inherit;
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 247, 251, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 232, 242, 0.8);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #818cf8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.15;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-pill:hover {
  border-color: #c7d2fe;
  color: var(--primary);
}

.icon-pill:active {
  transform: scale(0.95);
}

.icon-pill.active {
  background: var(--primary-soft);
  border-color: #c7d2fe;
  color: var(--primary);
}

/* Main Container */
.main-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* Hero Spotlight Card */
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 52%, #6366f1 100%);
  color: #ffffff;
  padding: 28px 24px;
  box-shadow: var(--shadow-glow);
  margin-bottom: 22px;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
  pointer-events: none;
}

.hero-card::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-desc {
  margin: 0 0 20px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero-pill {
  background: rgba(15, 23, 42, 0.22);
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

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

.btn-hero {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  font-size: 16px;
  padding: 15px 26px;
}

.btn-hero:hover {
  background: #f8fafc;
}

.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.26);
}

.btn-soft {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

/* Best Record Strip */
.best-record-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.best-record-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.best-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--amber-soft);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.best-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.best-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.best-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-chip {
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

/* Section Heading */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 28px 0 14px;
}

.section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Individual Mini-game Quick Launch Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: var(--shadow-md);
}

.quick-card:active {
  transform: scale(0.98);
}

.quick-emoji {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.quick-emoji.eye { background: #eef2ff; }
.quick-emoji.reflex { background: #ecfdf5; }
.quick-emoji.memory { background: #fff1f2; }

.quick-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.quick-desc {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0;
}

.quick-meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* Hub Roadmap Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.hub-card.is-live {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
}

.hub-card.is-live:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.hub-card.is-soon {
  opacity: 0.86;
}

.hub-order-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--surface-soft);
}

.hub-card.accent-indigo .hub-order-icon { background: var(--primary-soft); }
.hub-card.accent-coral .hub-order-icon { background: var(--coral-soft); }
.hub-card.accent-pink .hub-order-icon { background: var(--pink-soft); }
.hub-card.accent-emerald .hub-order-icon { background: var(--emerald-soft); }
.hub-card.accent-amber .hub-order-icon { background: var(--amber-soft); }

.hub-body {
  flex: 1;
  min-width: 0;
}

.hub-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.hub-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

.hub-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-sub);
}

.hub-card.is-live .hub-status-pill {
  background: var(--primary);
  color: #ffffff;
}

.hub-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.hub-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

/* ==========================================================================
   GAME STAGE (모바일 앱 집중 모드, max-width 500px)
   ========================================================================== */
.game-shell {
  max-width: 500px;
  margin: 0 auto;
}

.stage-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
}

.course-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.step-dot.done {
  background: var(--emerald-soft);
  border-color: #a7f3d0;
  color: #047857;
}

.stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  box-shadow: var(--shadow-md);
}

.stage-header {
  text-align: center;
  margin-bottom: 16px;
}

.stage-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.stage-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.stage-hint {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
}

/* HUD Bar */
.hud-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.hud-box {
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}

.hud-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
}

.hud-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hud-value.danger {
  color: var(--coral);
}

/* Timer Progress */
.timer-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
  margin-bottom: 16px;
}

.timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  transition: width 0.1s linear, background 0.2s ease;
}

.timer-fill.low {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

/* Color Vision Grid */
.color-board {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f1f3fa;
  border-radius: 18px;
  padding: 10px;
  display: grid;
  gap: 8px;
  user-select: none;
}

.color-tile {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s ease;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.color-tile:active {
  transform: scale(0.93);
}

.color-board.shake {
  animation: shakeX 0.28s ease;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-5px); }
}

/* Reaction Pad */
.reaction-pad {
  width: 100%;
  min-height: 290px;
  border-radius: 20px;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
  user-select: none;
  transition: background 0.12s ease, transform 0.08s ease;
}

.reaction-pad:active {
  transform: scale(0.99);
}

.reaction-pad.state-ready {
  background: linear-gradient(135deg, #3730a3, #4f46e5);
}

.reaction-pad.state-wait {
  background: linear-gradient(135deg, #1e293b, #334155);
}

.reaction-pad.state-go {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.22);
}

.reaction-pad.state-early {
  background: linear-gradient(135deg, #dc2626, #f43f5e);
}

.reaction-pad.state-result {
  background: linear-gradient(135deg, #0284c7, #3b82f6);
}

.reaction-icon {
  font-size: 46px;
  line-height: 1;
}

.reaction-big {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.reaction-sub {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 600;
}

.trial-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.trial-chip {
  flex: 1;
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.trial-chip.filled {
  background: var(--emerald-soft);
  color: #047857;
}

/* Memory Flash Grid */
.memory-board {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f1f3fa;
  border-radius: 18px;
  padding: 10px;
  display: grid;
  gap: 9px;
  user-select: none;
}

.memory-cell {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.14s ease, border-color 0.14s ease;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  color: transparent;
}

.memory-cell:active {
  transform: scale(0.94);
}

.memory-cell.lit {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: #4f46e5;
  color: #ffffff;
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.34);
}

.memory-cell.correct {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #059669;
  color: #ffffff;
}

.memory-cell.wrong {
  background: linear-gradient(135deg, #dc2626, #f43f5e);
  border-color: #dc2626;
  color: #ffffff;
}

.memory-status-banner {
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.memory-status-banner.go {
  background: var(--emerald-soft);
  color: #047857;
}

.memory-status-banner.err {
  background: var(--coral-soft);
  color: #be123c;
}

/* Round Transition Card */
.transition-box {
  text-align: center;
  padding: 22px 10px;
}

.transition-emoji {
  font-size: 54px;
  margin-bottom: 10px;
  display: block;
}

.transition-score {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  margin: 10px 0 14px;
}

/* ==========================================================================
   RESULT VIEW & CANVAS CARD
   ========================================================================== */
.result-hero {
  text-align: center;
  padding: 8px 0 18px;
}

.result-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber-soft);
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.result-age-big {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #312e81, #4f46e5, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 4px 0 6px;
}

.result-persona {
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 8px;
}

.result-comment {
  margin: 0 auto;
  max-width: 380px;
  font-size: 14px;
  color: var(--text-sub);
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 22px;
}

.stat-item {
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 13px 15px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
}

.stat-detail {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.stat-track {
  height: 9px;
  border-radius: 999px;
  background: #dfe4f2;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-fill.eye { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.stat-fill.reflex { background: linear-gradient(90deg, #059669, #34d399); }
.stat-fill.memory { background: linear-gradient(90deg, #e11d48, #fb7185); }

.card-preview-wrap {
  background: #f1f3fa;
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.card-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#resultCanvas {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(22, 26, 45, 0.14);
  display: block;
  margin: 0 auto;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   SEO GUIDE & FAQ (애드센스 콘텐츠 품질 확보)
   ========================================================================== */
.guide-section {
  margin-top: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
}

.guide-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.guide-section h3 {
  margin: 22px 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.guide-section p, .guide-section li {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.guide-box {
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 16px;
}

.guide-box strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fafbfe;
}

.faq-item summary {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
}

.faq-item p {
  margin: 8px 0 0;
}

/* Ad Slot Container (Hidden when placeholder is off & no ad loaded) */
.ad-slot-wrap {
  margin: 20px 0;
  text-align: center;
}

.ad-slot-wrap:empty {
  display: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 18px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #161a2d;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Static legal page layout */
.legal-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 30px 24px;
  box-shadow: var(--shadow-sm);
}

.legal-card h1 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 900;
}

.legal-card h2 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 800;
}

.legal-card p, .legal-card li {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* Responsive */
@media (max-width: 720px) {
  .quick-grid,
  .hub-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 24px 18px;
  }

  .btn-hero {
    width: 100%;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .result-actions-row {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   2번 게임: 월급 250 서울 생존 시뮬레이터 전용 UI
   ========================================================================== */
.hero-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.hero-card.hero-coral {
  background: linear-gradient(135deg, #9f1239 0%, #e11d48 52%, #f97316 100%);
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.24);
  margin-bottom: 0;
}

.hero-dual-grid .hero-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.hero-dual-grid .hero-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-dual-grid .hero-cta-row {
  margin-top: auto;
}

.surv-top-hud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.surv-stat-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.surv-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  margin-bottom: 5px;
}

.surv-stat-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.surv-stat-val.danger {
  color: #dc2626;
}

.surv-stat-val.good {
  color: #059669;
}

.surv-mini-track {
  height: 6px;
  border-radius: 999px;
  background: #dfe4f2;
  overflow: hidden;
}

.surv-mini-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.surv-mini-fill.money { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.surv-mini-fill.mental { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.surv-mini-fill.health { background: linear-gradient(90deg, #059669, #34d399); }
.surv-mini-fill.rep { background: linear-gradient(90deg, #e11d48, #fb7185); }

.surv-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #ffffff;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.surv-month-title {
  font-size: 16px;
  font-weight: 900;
}

.surv-month-meta {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.88;
}

.surv-buff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.surv-buff-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #b45309;
  border: 1px solid #fde68a;
}

.surv-event-box {
  background: #fafbfe;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 14px;
}

.surv-event-emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
  line-height: 1.1;
}

.surv-event-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: #be123c;
  margin-bottom: 8px;
}

.surv-event-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.surv-event-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.65;
}

.surv-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.surv-choice-btn {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 15px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.surv-choice-btn:hover {
  border-color: #f43f5e;
  background: #fff8f9;
  box-shadow: var(--shadow-sm);
}

.surv-choice-btn:active {
  transform: scale(0.98);
}

.surv-choice-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.surv-choice-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.surv-outcome-box {
  background: var(--surface-soft);
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.surv-deltas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 6px;
}

.delta-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
}

.delta-pill.up {
  background: var(--emerald-soft);
  color: #047857;
}

.delta-pill.down {
  background: var(--coral-soft);
  color: #be123c;
}

.delta-pill.neutral {
  background: #e2e8f0;
  color: #475569;
}

/* 집 선택 카드 */
.house-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.house-card {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 15px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.house-card:hover {
  border-color: var(--primary);
  background: #f8f9ff;
}

.house-card:active {
  transform: scale(0.98);
}

.house-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.house-name {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.house-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
  margin: 2px 0;
}

.house-desc {
  font-size: 12px;
  color: var(--text-sub);
}

/* 엔딩 도감 그리드 */
.codex-wrap {
  margin-top: 16px;
  background: #fafbfe;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.codex-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.codex-title {
  font-size: 15px;
  font-weight: 900;
}

.codex-count {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

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

.codex-item {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
}

.codex-item.locked {
  background: var(--surface-soft);
  color: var(--text-muted);
  opacity: 0.72;
}

.codex-item strong {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .hero-dual-grid {
    grid-template-columns: 1fr;
  }
  .codex-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   3번 게임: 내 피부·추구미 셀프 진단기 전용 UI
   ========================================================================== */
.hero-tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.hero-tri-grid .hero-card {
  margin-bottom: 0;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
}

.hero-tri-grid .hero-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-tri-grid .hero-title {
  font-size: clamp(20px, 2.5vw, 24px);
}

.hero-tri-grid .hero-desc {
  font-size: 13.5px;
  margin-bottom: 16px;
}

.hero-tri-grid .hero-cta-row {
  margin-top: auto;
}

.hero-tri-grid .btn-hero {
  width: 100%;
  padding: 13px 16px;
  font-size: 14.5px;
}

.hero-card.hero-pink {
  background: linear-gradient(135deg, #831843 0%, #db2777 52%, #ec4899 100%);
  box-shadow: 0 12px 32px rgba(219, 39, 119, 0.24);
}

.beauty-progress-wrap {
  margin-bottom: 16px;
}

.beauty-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--pink);
  margin-bottom: 6px;
}

.beauty-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--pink-soft);
  overflow: hidden;
}

.beauty-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #db2777, #f472b6);
  transition: width 0.28s ease;
}

.beauty-q-card {
  background: #fff9fc;
  border: 1px solid #fbcfe8;
  border-radius: 18px;
  padding: 20px 16px;
  margin-bottom: 14px;
  text-align: center;
}

.beauty-q-part {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fce7f3;
  color: #be185d;
  margin-bottom: 10px;
}

.beauty-q-text {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.4;
}

.beauty-opt-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.beauty-opt-btn {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 15px;
  padding: 14px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.beauty-opt-btn:hover {
  border-color: #ec4899;
  background: #fff5f9;
}

.beauty-opt-btn:active {
  transform: scale(0.98);
}

.beauty-opt-emoji {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--pink-soft);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.beauty-prev-row {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

.beauty-routine-card {
  background: #fff9fc;
  border: 1px solid #fbcfe8;
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.beauty-routine-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
  color: #9d174d;
}

.beauty-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.beauty-ing-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #f9a8d4;
  color: #be185d;
}

.beauty-step-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
}

.beauty-curation-box {
  background: linear-gradient(135deg, #fdf2f8 0%, #eef2ff 100%);
  border: 1.5px solid #f9a8d4;
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 18px;
}

.beauty-curation-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
}

.beauty-curation-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

.beauty-pros-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--text);
}

.beauty-curation-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-pink {
  background: linear-gradient(135deg, #db2777, #ec4899);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(219, 39, 119, 0.25);
}

.affiliate-disclosure {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 820px) {
  .hero-tri-grid {
    grid-template-columns: 1fr;
  }
  .beauty-curation-btns {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   전체 화면 애니메이션 아케이드 대개편 + 4번·5번 전용 UI
   ========================================================================== */

/* 1. 살아 움직이는 오로라 배경 & 부유 파티클 */
body {
  background: linear-gradient(125deg, #eef2ff 0%, #fdf2f8 35%, #ecfdf5 70%, #fffbeb 100%);
  background-size: 300% 300%;
  animation: auroraShift 14s ease infinite;
}

@keyframes auroraShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-floater {
  position: absolute;
  font-size: 28px;
  opacity: 0.22;
  filter: drop-shadow(0 6px 12px rgba(79, 70, 229, 0.18));
  animation: driftFloat 12s ease-in-out infinite;
}

.bg-floater.f1 { top: 10%; left: 5%; animation-duration: 11s; font-size: 32px; }
.bg-floater.f2 { top: 22%; right: 7%; animation-duration: 14s; animation-delay: -3s; font-size: 34px; }
.bg-floater.f3 { top: 52%; left: 3%; animation-duration: 13s; animation-delay: -6s; font-size: 28px; }
.bg-floater.f4 { top: 68%; right: 5%; animation-duration: 10s; animation-delay: -2s; font-size: 36px; }
.bg-floater.f5 { bottom: 12%; left: 16%; animation-duration: 15s; animation-delay: -5s; font-size: 30px; }
.bg-floater.f6 { bottom: 18%; right: 18%; animation-duration: 12s; animation-delay: -8s; font-size: 28px; }

@keyframes driftFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  33% { transform: translate3d(18px, -28px, 0) rotate(12deg) scale(1.12); }
  66% { transform: translate3d(-14px, 16px, 0) rotate(-10deg) scale(0.94); }
}

.site-header, .main-wrap, .site-footer {
  position: relative;
  z-index: 1;
}

/* 2. 살아 움직이는 아케이드 마스코트 환영 배너 */
.arcade-welcome {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(120deg, #1e1b4b 0%, #4338ca 45%, #db2777 100%);
  background-size: 200% 200%;
  animation: auroraShift 9s ease infinite;
  color: #ffffff;
  padding: 22px 22px 18px;
  margin-bottom: 18px;
  box-shadow: 0 16px 38px rgba(67, 56, 202, 0.28);
}

.arcade-welcome-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mascot-wrap {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  animation: mascotBob 2.4s ease-in-out infinite;
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}

.mascot-eye {
  transform-origin: center;
  animation: eyeBlink 3.6s ease-in-out infinite;
}

@keyframes eyeBlink {
  0%, 44%, 50%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(0.1); }
}

.arcade-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 6px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.6; }
}

.arcade-headline {
  margin: 0 0 4px;
  font-size: clamp(21px, 4.4vw, 29px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.arcade-sub {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
}

/* 마퀴 티커 */
.arcade-ticker {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.25);
  padding: 7px 0;
  white-space: nowrap;
}

.arcade-ticker-track {
  display: inline-flex;
  gap: 24px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fde68a;
  animation: tickerScroll 18s linear infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 3. 5종 애니메이션 게임 아케이드 카드 그리드 */
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.arcade-card {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 24px;
  padding: 20px 18px;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-column: span 2;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  animation: cardPopIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.arcade-card.span-3 {
  grid-column: span 3;
}

.arcade-card:hover {
  transform: translateY(-6px) scale(1.015);
}

.arcade-card:active {
  transform: scale(0.96);
}

/* 빛이 스윽 지나가는 글로시 쉬머 애니메이션 */
.arcade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.24) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: cardShimmer 5.5s ease-in-out infinite;
  pointer-events: none;
}

.arcade-card:nth-child(2)::before { animation-delay: 1.1s; }
.arcade-card:nth-child(3)::before { animation-delay: 2.2s; }
.arcade-card:nth-child(4)::before { animation-delay: 3.3s; }
.arcade-card:nth-child(5)::before { animation-delay: 4.4s; }

@keyframes cardShimmer {
  0%, 62% { left: -120%; }
  100% { left: 160%; }
}

@keyframes cardPopIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.arcade-card.theme-indigo {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #818cf8 100%);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}
.arcade-card.theme-coral {
  background: linear-gradient(135deg, #9f1239 0%, #e11d48 55%, #fb7185 100%);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.28);
}
.arcade-card.theme-pink {
  background: linear-gradient(135deg, #831843 0%, #db2777 55%, #f472b6 100%);
  box-shadow: 0 12px 28px rgba(219, 39, 119, 0.26);
}
.arcade-card.theme-emerald {
  background: linear-gradient(135deg, #065f46 0%, #059669 55%, #34d399 100%);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}
.arcade-card.theme-amber {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 55%, #fbbf24 100%);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

.arcade-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.arcade-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.arcade-anim-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  font-size: 30px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* 카드별 고유 모션 애니메이션 */
.anim-eye { animation: animEye 2.4s ease-in-out infinite; }
.anim-run { animation: animRun 1.3s ease-in-out infinite; }
.anim-sparkle { animation: animSparkle 2.2s ease-in-out infinite; }
.anim-coin { animation: animCoin 2.6s ease-in-out infinite; }
.anim-spin { animation: animSpin 4.5s linear infinite; }

@keyframes animEye {
  0%, 100% { transform: scale(1) translateX(0); }
  25% { transform: scale(1.12) translateX(-3px); }
  75% { transform: scale(1.12) translateX(3px); }
}
@keyframes animRun {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(6deg); }
}
@keyframes animSparkle {
  0%, 100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
  50% { transform: scale(1.18) rotate(12deg); filter: brightness(1.25); }
}
@keyframes animCoin {
  0%, 100% { transform: rotateY(0deg) translateY(0); }
  50% { transform: rotateY(180deg) translateY(-5px); }
}
@keyframes animSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.arcade-card-title {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.arcade-card-desc {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}

.arcade-card-cta {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #161a2d;
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}

/* 게임 스테이지 전환 팝 애니메이션 */
.stage-card {
  animation: stagePopIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes stagePopIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 플로팅 텍스트 FX */
.fx-float-text {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
  animation: fxFloatUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fxFloatUp {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.8); }
  40% { opacity: 1; transform: translate(-50%, -28px) scale(1.18); }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(0.95); }
}

/* 4번: 2027 연봉·지원금 성적표 UI */
.year-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.year-pill {
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-sub);
  border-radius: 14px;
  padding: 11px 10px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.year-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.24);
}

.money-live-card {
  background: linear-gradient(135deg, #065f46, #059669);
  color: #ffffff;
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.24);
}

.money-live-label {
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.9;
}

.money-live-val {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
  font-variant-numeric: tabular-nums;
}

.money-live-sub {
  font-size: 12px;
  opacity: 0.92;
  line-height: 1.6;
}

.money-diff-chip {
  display: inline-block;
  margin-top: 5px;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.money-rank-strip {
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.22);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13px;
}

.money-slider-box, .money-check-box {
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.money-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 10px;
}

.money-slider-head strong {
  font-size: 18px;
  color: var(--primary);
}

#mAnnualRange {
  width: 100%;
  accent-color: var(--emerald);
  cursor: pointer;
}

.money-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mini-preset {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-sub);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mini-preset:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.money-check-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}

.money-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.check-chip {
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--text-sub);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.check-chip.on {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: #047857;
}

.deduct-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.deduct-cell {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.deduct-cell strong {
  color: #be123c;
}

.subsidy-list-card {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}

.subsidy-list-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 900;
  color: #065f46;
}

.subsidy-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #ffffff;
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 8px;
}

.subsidy-item:last-child { margin-bottom: 0; }

.subsidy-icon {
  font-size: 22px;
  line-height: 1.1;
}

.subsidy-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.subsidy-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: #047857;
}

.subsidy-desc {
  font-size: 12.5px;
  color: var(--text-sub);
}

/* 5번: 무지개 룰렛 & 폭탄 돌리기 UI */
.wheel-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 16px;
}

.wheel-pointer {
  font-size: 28px;
  color: #e11d48;
  line-height: 1;
  margin-bottom: -10px;
  z-index: 2;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

#wheelCanvas {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(22, 26, 45, 0.16));
}

.wheel-winner-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  color: #92400e;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
  animation: stagePopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wheel-editor {
  margin-top: 16px;
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 14px;
}

.wheel-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.wheel-input-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.wheel-input-row input:focus {
  border-color: var(--primary);
}

.wheel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wheel-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 700;
}

.wheel-tag-chip button {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  padding: 0 2px;
}

.bomb-arena {
  border-radius: 22px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #ffffff;
  padding: 28px 18px;
  text-align: center;
  margin-bottom: 16px;
  transition: background 0.25s ease;
}

.bomb-arena.active {
  background: linear-gradient(135deg, #312e81, #4f46e5);
}

.bomb-arena.danger {
  background: linear-gradient(135deg, #9f1239, #e11d48);
  animation: shakeX 0.3s ease infinite;
}

.bomb-arena.exploded {
  background: linear-gradient(135deg, #dc2626, #f97316);
  animation: stagePopIn 0.35s ease;
}

.bomb-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.bomb-visual {
  font-size: 96px;
  line-height: 1.1;
  margin: 8px 0 16px;
  display: inline-block;
  transition: transform 0.08s ease;
}

.bomb-visual.pulse {
  animation: bombPulse 0.18s ease;
}

@keyframes bombPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.26) rotate(-6deg); }
  100% { transform: scale(1); }
}

.bomb-fuse-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  margin-bottom: 12px;
}

.bomb-fuse-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #ef4444);
}

.bomb-count {
  font-size: 15px;
  font-weight: 800;
}

.btn-coral {
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.28);
}

@media (max-width: 820px) {
  .arcade-grid {
    grid-template-columns: 1fr;
  }
  .arcade-card,
  .arcade-card.span-3 {
    grid-column: span 1;
  }
  .arcade-welcome-row {
    flex-direction: column;
    text-align: center;
  }
}


/* ==========================================================================
   고퀄리티 웹툰·K-뷰티 포스터 카드 & 결과 일러스트 & 크로스 추천 UI
   ========================================================================== */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.poster-card {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 26px;
  min-height: 290px;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #ffffff;
  grid-column: span 2;
  background: #161a2d;
  box-shadow: 0 14px 32px rgba(22, 26, 45, 0.18);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  animation: cardPopIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.poster-card.span-3 {
  grid-column: span 3;
  min-height: 320px;
}

.poster-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 22px 42px rgba(22, 26, 45, 0.26);
}

.poster-card:active {
  transform: scale(0.97);
}

.poster-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.6s ease;
  animation: kenBurns 14s ease-in-out infinite alternate;
}

.poster-card:nth-child(2) .poster-bg { animation-delay: -3s; }
.poster-card:nth-child(3) .poster-bg { animation-delay: -6s; }
.poster-card:nth-child(4) .poster-bg { animation-delay: -9s; }
.poster-card:nth-child(5) .poster-bg { animation-delay: -12s; }

@keyframes kenBurns {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.09) translateY(-6px); }
}

.poster-card:hover .poster-bg {
  transform: scale(1.11);
}

.poster-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: inherit;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.25) 0%,
    rgba(15, 23, 42, 0.14) 38%,
    rgba(15, 23, 42, 0.86) 76%,
    rgba(15, 23, 42, 0.96) 100%
  );
}

.poster-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.poster-pill {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
}

.poster-pill.hot {
  background: linear-gradient(135deg, #e11d48, #f97316);
  border-color: rgba(255, 255, 255, 0.45);
}

.poster-pill.pink {
  background: linear-gradient(135deg, #db2777, #ec4899);
  border-color: rgba(255, 255, 255, 0.45);
}

.poster-pill.emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: rgba(255, 255, 255, 0.45);
}

.poster-bottom {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.poster-hook {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.poster-sub {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.poster-cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: #161a2d;
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* 게임 시작 배너 & 결과 대형 일러스트 아바타 */
.stage-art-banner {
  width: 100%;
  height: 170px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(22, 26, 45, 0.14);
}

.stage-art-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  animation: kenBurns 12s ease-in-out infinite alternate;
}

.result-art-frame {
  width: 156px;
  height: 156px;
  margin: 4px auto 12px;
  border-radius: 36px;
  padding: 4px;
  background: linear-gradient(135deg, #4f46e5, #ec4899, #10b981);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
  animation: stagePopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
  display: block;
}

/* 결과 화면 하단 크로스 추천 (체류시간 2~3배 증폭) */
.next-reco-wrap {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1.5px dashed var(--border);
}

.next-reco-title {
  margin: 0 0 10px;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text);
}

.next-reco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.next-reco-card {
  border: 1.5px solid var(--border);
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.next-reco-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.next-reco-card img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.next-reco-body {
  padding: 9px 10px;
}

.next-reco-body strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 2px;
}

.next-reco-body span {
  font-size: 11.5px;
  color: var(--text-sub);
}

@media (max-width: 820px) {
  .poster-grid {
    grid-template-columns: 1fr;
  }
  .poster-card,
  .poster-card.span-3 {
    grid-column: span 1;
    min-height: 270px;
  }
}


/* ==========================================================================
   실시간 Three.js 3D WebGL 히어로 스테이지 & 3D 홀로그램 카드 틸트
   ========================================================================== */
.stage-3d-hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 350px;
  margin-bottom: 20px;
  background: radial-gradient(circle at 25% 20%, #312e81 0%, #0f172a 58%, #020617 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.42);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.36), inset 0 0 60px rgba(79, 70, 229, 0.25);
}

#scene3dMount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#scene3dMount canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.stage-3d-overlay {
  position: relative;
  z-index: 2;
  min-height: 350px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.stage-3d-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-3d-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(165, 180, 252, 0.4);
  color: #e0e7ff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 800;
}

.stage-3d-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.78) 60%, rgba(15, 23, 42, 0.92) 100%);
  margin: 0 -20px -18px;
  padding: 28px 20px 20px;
}

.stage-3d-title {
  margin: 0;
  font-size: clamp(22px, 4.6vw, 31px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(79, 70, 229, 0.65);
}

.stage-3d-sub {
  margin: 0;
  font-size: 13.5px;
  color: rgba(224, 231, 255, 0.92);
}

.stage-3d-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
  margin-top: 4px;
}

.btn-3d-neon {
  background: linear-gradient(135deg, #4f46e5 0%, #ec4899 55%, #f59e0b 100%);
  background-size: 200% 200%;
  animation: auroraShift 5s ease infinite;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 26px rgba(236, 72, 153, 0.42);
  padding: 13px 22px;
  font-size: 15px;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
}

.btn-3d-neon:active {
  transform: scale(0.95);
}

/* 3D 홀로그램 반사광 Glare 레이어 */
.poster-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.card-3d-glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}


/* ==========================================================================
   1위 플랫폼 벤치마킹 UI (카테고리 필터 · 나의 플레이랩 도감 · 친구 도전장 VS)
   ========================================================================== */
.cat-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.cat-filter-bar::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(22, 26, 45, 0.06);
  transition: all 0.16s ease;
}

.cat-chip:hover {
  border-color: #c7d2fe;
  color: var(--primary);
}

.cat-chip.active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

/* 나의 플레이랩 도감 모달 (푸망 '나의 우주' 벤치마킹) */
.universe-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.universe-sheet {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 26px;
  padding: 22px 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  animation: stagePopIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.universe-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.universe-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.universe-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.universe-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.universe-prog {
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 13px 14px;
  margin-bottom: 14px;
}

.universe-prog-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.universe-prog-meta strong {
  color: var(--primary);
}

.universe-prog-track {
  height: 9px;
  border-radius: 999px;
  background: #dfe4f2;
  overflow: hidden;
}

.universe-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #ec4899, #10b981);
  transition: width 0.5s ease;
}

.universe-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.universe-row {
  width: 100%;
  border: 1.5px solid var(--border);
  background: #ffffff;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.universe-row:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.universe-row.done {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.universe-row img {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
}

.universe-row.locked img {
  filter: grayscale(0.65) brightness(0.88);
}

.universe-row-body strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 2px;
}

.universe-row-body span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

/* 친구 도전장 VS 배너 */
.challenge-vs-banner {
  background: linear-gradient(135deg, #9f1239, #e11d48, #f97316);
  color: #ffffff;
  border-radius: 16px;
  padding: 12px 15px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.25);
  animation: stagePopIn 0.35s ease;
}

.challenge-verdict {
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.challenge-verdict.win {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 2px solid #10b981;
  color: #065f46;
}

.challenge-verdict.lose {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border: 2px solid #f43f5e;
  color: #9f1239;
}

.challenge-verdict strong {
  font-size: 16px;
  font-weight: 900;
}

.challenge-verdict span {
  font-size: 13px;
  font-weight: 700;
}


/* ==========================================================================
   6번 게임: 실시간 3D 네온 타워 스택 전용 UI
   ========================================================================== */
.stack3d-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack3d-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  color: #ffffff;
  border-radius: 18px;
  padding: 12px 16px;
}

.stack3d-score-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stack3d-score-label {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
}

.stack3d-score-num {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stack3d-meta-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.stack3d-pill {
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 999px;
}

.stack3d-pill.combo {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #ffffff;
  animation: stagePopIn 0.2s ease;
}

.stack3d-canvas-box {
  position: relative;
  width: 100%;
  height: 430px;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 18%, #312e81 0%, #0f172a 65%, #020617 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.45);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.34);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.stack3d-canvas-box canvas {
  display: block;
  width: 100% !important;
  height: 430px !important;
}

.stack3d-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  color: #ffffff;
  gap: 10px;
}

.stack3d-start-badge {
  background: rgba(79, 70, 229, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}

.stack3d-start-overlay h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
}

.stack3d-start-overlay p {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: rgba(224, 231, 255, 0.92);
}

.stack3d-tip {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
}

.stack3d-result-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1.5px dashed var(--border);
  animation: stagePopIn 0.32s ease;
}


/* ==========================================================================
   도파민 중독 UI (코인·레벨·출석·데일리 퀘스트 · 3D 스킨 상점 · 피버 · 럭키 캡슐)
   ========================================================================== */
.coin-pill {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fcd34d;
  color: #b45309;
}

.dopamine-strip {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1.5px solid #e0e7ff;
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.1);
}

.dopa-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dopa-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
}

.dopa-streak {
  background: #fff1f2;
  color: #be123c;
  padding: 4px 10px;
  border-radius: 999px;
}

.dopa-lv {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 999px;
}

.dopa-coins {
  background: #fffbeb;
  color: #b45309;
  padding: 4px 10px;
  border-radius: 999px;
}

.dopa-title-tag {
  background: linear-gradient(135deg, #4f46e5, #db2777);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
}

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

.dopa-gacha-btn {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.28);
}

.dopa-nick-row input {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-family: inherit;
  width: 155px;
  outline: none;
}

.dopa-nick-row input:focus {
  border-color: var(--primary);
}

.dopa-nick-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.dopa-xp-track {
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 12px;
}

.dopa-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #ec4899, #f59e0b);
  transition: width 0.5s ease;
}

.dopa-quest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dopa-quest-card {
  border: 1.5px solid var(--border);
  background: #fafbfe;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  text-align: left;
  cursor: default;
}

.dopa-quest-card.ready {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  cursor: pointer;
  animation: mascotBob 1.3s ease-in-out infinite;
}

.dopa-quest-card.claimed {
  opacity: 0.65;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.dopa-q-badge {
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #b45309;
  white-space: nowrap;
}

.dopa-quest-card.ready .dopa-q-badge {
  background: #f59e0b;
  color: #ffffff;
}

/* 3D 타워 스킨 상점 & FEVER 글로우 */
.skin-shop-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.skin-chip {
  border: 1.5px solid var(--border);
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.skin-chip.active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

.skin-chip small {
  font-size: 10.5px;
  color: var(--text-muted);
}

.skin-chip.active small {
  color: #d97706;
  font-weight: 900;
}

.stack3d-canvas-box.fever-on {
  border-color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.45), 0 18px 42px rgba(236, 72, 153, 0.45);
  background: radial-gradient(circle at 50% 18%, #7c2d12 0%, #4c1d95 55%, #0f172a 100%);
}

/* 럭키 캡슐 가챠 모달 */
.gacha-stage {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #ffffff;
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 14px;
}

.gacha-stage.tier-ssr {
  background: linear-gradient(135deg, #b45309, #f59e0b, #ec4899);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
}

.gacha-stage.tier-sr {
  background: linear-gradient(135deg, #6d28d9, #db2777);
}

.gacha-tier-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.24);
  margin-bottom: 8px;
}

.gacha-big-emoji {
  font-size: 64px;
  line-height: 1.1;
  margin: 6px 0;
}

.gacha-wobble {
  display: inline-block;
  animation: mascotBob 1.6s ease-in-out infinite;
}

.gacha-item-name {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 4px;
}

.gacha-bonus {
  font-size: 13px;
  opacity: 0.92;
}

@media (max-width: 720px) {
  .dopa-quest-grid {
    grid-template-columns: 1fr;
  }
  .skin-shop-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================================================================
   쿠팡 파트너스 맞춤 추천 상품 카드 (공정위 대가성 문구 명확 표기)
   ========================================================================== */
.aff-card {
  margin: 18px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.aff-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

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

.aff-thumb {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.aff-info {
  flex: 1;
  min-width: 0;
}

.aff-title {
  display: block;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 3px;
}

.aff-price {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: #e11d48;
  margin-bottom: 4px;
}

.aff-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.45;
}

.btn-aff {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  font-size: 14px;
  padding: 12px 16px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

.aff-disclosure {
  margin: 9px 0 0;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}
