/*
 * 바이브코더 루피 - 글로벌 스타일시트
 * 레트로 게임 + 브루탈리즘 디자인 시스템
 */

/* ===== 모바일 하단 네비 ===== */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 9px;
  color: #9B8E7E;
  padding: 4px 0;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item:active {
  color: #2C2417;
}
.mobile-nav-item.is-active {
  color: #2C2417;
}

/* ===== 모바일 최적화 ===== */
@media (max-width: 639px) {
  /* 터치 타겟 최소 44px */
  .game-btn, .vote-btn, button[type="submit"] {
    min-height: 44px;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* 카드 패딩 넉넉하게 */
  .game-card, .topic-panel, .guide-card, .showcase-panel {
    border-width: 2px;
  }

  /* 폰트 살짝 키움 */
  .prose-blog {
    font-size: 14px;
    line-height: 2;
  }
  .prose-blog pre {
    font-size: 12px;
    padding: 1em;
    padding-right: 2.5em;
  }
  .prose-blog h1 { font-size: 1.25em; }
  .prose-blog h2 { font-size: 1.1em; }

  /* 입력 필드 터치 최적화 */
  .game-input, input[type="text"], input[type="email"], textarea, select {
    font-size: 16px !important; /* iOS zoom 방지 */
    min-height: 44px;
  }

  /* 브루탈리즘 섀도우 모바일에서 줄이기 */
  .shadow-brutal { box-shadow: 3px 3px 0px #000; }
  .shadow-brutal-lg { box-shadow: 4px 4px 0px #000; }
}

/* ===== 스크롤바 항상 표시 (레이아웃 시프트 방지) ===== */
html {
  overflow-y: scroll;
}

/* ===== Focus Ring 제거 (글로벌) ===== */
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ===== View Transitions ===== */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
  animation-timing-function: ease-in-out;
}

/* Turbo 네비게이션 후에는 입장 애니메이션 스킵 (View Transition이 대신 처리) */
body.turbo-visited .g-in,
body.turbo-visited .animate-fade-in-up,
body.turbo-visited .animate-fade-in,
body.turbo-visited .animate-pop-in {
  animation: none !important;
  opacity: 1 !important;
}

/* ===== 폰트 ===== */
.font-neodgm { font-family: 'NeoDunggeunmo', sans-serif; }
.font-galmuri { font-family: 'Galmuri11', sans-serif; }

/* ===== 브루탈리즘 그림자 ===== */
.shadow-brutal-sm { box-shadow: 2px 2px 0px #000; }
.shadow-brutal { box-shadow: 4px 4px 0px #000; }
.shadow-brutal-lg { box-shadow: 6px 6px 0px #000; }

/* ===== Hover 리프트 ===== */
.hover-lift {
  transition: all 0.2s ease-out;
}
.hover-lift:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #000;
}

/* ===== 입장 애니메이션 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.85); }
  70% { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out both; }
.animate-fade-in { animation: fadeIn 0.4s ease-out both; }
.animate-pop-in { animation: popIn 0.5s ease-out both; }
.animate-slide-left { animation: slideInLeft 0.4s ease-out both; }
.animate-slide-right { animation: slideInRight 0.4s ease-out both; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ===== 게임 스타일 카드 ===== */
.game-card {
  background-color: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  transition: all 0.2s ease-out;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

.game-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #E8D4A8, #B8D4C8, #D4A5A5, #E8B8A8);
}

/* ===== 페이지 헤더 ===== */
.page-hero {
  position: relative;
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(184, 212, 200, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(232, 184, 168, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(212, 165, 165, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* ===== 투표 버튼 ===== */
.vote-btn {
  transition: all 0.15s ease-out;
  cursor: pointer;
}

.vote-btn:hover {
  transform: scale(1.1);
}

.vote-btn:active {
  transform: scale(0.95);
}

.vote-btn.voted {
  animation: votePop 0.3s ease-out;
}

@keyframes votePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== 순위 뱃지 ===== */
.rank-badge {
  position: relative;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #2a1810;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #2a1810;
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #FFFFFF;
}

/* ===== 스크롤바 커스텀 ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-sub);
}

/* ===== 디자인 토큰 (Polished RPG) ===== */
:root {
  --bg-page: #FAF8F5;
  --bg-card: #fff;
  --border: #EAE4DC;
  --border-light: #F2EDE6;
  --text: #2C2417;
  --text-sub: #7A6E5E;
  --text-faint: #9B8E7E;
  --gold: #D4A04A;
  --gold-light: #FBF4E4;
  --gold-dark: #B8862E;
  --sage: #7BA88E;
  --coral: #C8836C;
  --nav-bg: #2C2417;
  --nav-text: #E8D4A8;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(44,36,23,0.05);
  --shadow-hover: 0 4px 16px rgba(44,36,23,0.08);
}

/* ===== 투표 버튼 (엄지척) ===== */
.vote-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid #000;
  background: transparent;
}
.vote-btn:hover {
  background: #FFF0F0;
  border-color: #000;
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px #000;
}
.vote-btn:hover .vote-icon {
  color: #E8573A;
  transform: scale(1.1);
}
.vote-btn .vote-icon {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #888;
  width: 14px;
  height: 14px;
}
.vote-btn .vote-label {
  font-size: 11px;
  color: #888;
  transition: color 0.2s ease;
}
.vote-btn.is-voted {
  background: #FFF0F0;
  border-color: #000;
}
.vote-btn.is-voted .vote-icon {
  color: #E8573A;
}
.vote-btn.is-voted .vote-label {
  color: #E8573A;
  font-weight: bold;
}
.vote-btn.is-voted:hover {
  border-color: #000;
}
.vote-btn.is-voted:hover .vote-icon {
  color: #D04A30;
  transform: scale(1.1);
}
.vote-btn.is-disabled {
  cursor: default;
  border-color: #000;
  opacity: 0.5;
}
.vote-btn.is-disabled:hover {
  background: transparent;
  border-color: #000;
  transform: none;
  box-shadow: none;
}
.vote-btn.is-disabled:hover .vote-icon {
  transform: none;
}

/* ===== 인풋 스타일 ===== */
.game-input {
  font-family: 'Galmuri11', sans-serif;
  background-color: #FFFFFF;
  border: 3px solid #000;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.15s ease-out;
  outline: none;
  width: 100%;
}

.game-input:focus {
  box-shadow: 3px 3px 0px #000;
  transform: translate(-1px, -1px);
  border-color: #2a1810;
}

.game-input::placeholder {
  color: #aaa;
  font-family: 'Galmuri11', sans-serif;
}

/* ===== 게임 버튼 ===== */
.game-btn {
  font-family: 'NeoDunggeunmo', sans-serif;
  border: 3px solid #000;
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease-out;
  box-shadow: 3px 3px 0px #000;
}

.game-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000;
}

.game-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

.game-btn-primary { background-color: #B8D4C8; color: #000; }
.game-btn-secondary { background-color: #E8D4A8; color: #000; }
.game-btn-ghost {
  background: transparent;
  border: 2px solid #000;
  box-shadow: 2px 2px 0px #000;
  padding: 8px 16px;
  font-size: 12px;
}

.game-btn-ghost:hover {
  background-color: #FFFFFF;
  box-shadow: 3px 3px 0px #000;
}

/* ===== 상태 뱃지 ===== */
.status-badge {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 11px;
  padding: 3px 10px;
  border: 2px solid #000;
  display: inline-block;
  letter-spacing: 0.5px;
}

/* ===== 노이즈 텍스처 (서브 페이지용) ===== */
.noise-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  z-index: 0;
  background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 256 256%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noise%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.9%22 numOctaves=%224%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noise)%22/%3E%3C/svg%3E');
}

/* ===== 숫자 입력 화살표 제거 ===== */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.no-spinner {
  -moz-appearance: textfield;
}

/* ===== 텍스트 라인 클램프 ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 블로그 본문 (prose-blog) ===== */
/* ===== 원데이클래스 컴포넌트 ===== */
.guide-card {
  background: #FFFFFF;
  overflow: hidden;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
}
.guide-schedule {
  padding: 16px 16px 12px;
  background: #F7F5F0;
  border-bottom: 2px solid #000;
}
@media (min-width: 640px) {
  .guide-schedule { padding: 20px 24px 16px; }
}
.guide-vote-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #FFF0F0;
  color: #E8573A;
  border: 2px solid #000;
  white-space: nowrap;
  flex-shrink: 0;
}
.guide-progress {
  height: 4px;
  background: #E8E8E8;
  overflow: hidden;
  border: 2px solid #000;
}
.guide-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8573A, #F2994A);
  transition: width 0.8s ease;
}
.guide-info {
  padding: 14px 16px 16px;
}
@media (min-width: 640px) {
  .guide-info { padding: 16px 24px 20px; }
}
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-step-num {
  width: 22px;
  height: 22px;
  background: #E8D4A8;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 10px;
  color: #000;
  flex-shrink: 0;
}

/* ── Live Dot ── */
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8573A;
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(232,87,58,0.35);
  animation: live-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes live-ping {
  0% { transform: scale(1); opacity: 0.6; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ── Topic Panel ── */
.topic-panel {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
}
.panel-header {
  padding: 14px 16px;
  border-bottom: 2px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
@media (min-width: 640px) {
  .panel-header { padding: 18px 22px; }
}
.topic-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
  transition: background 0.15s ease, transform 0.3s ease;
}
@media (min-width: 640px) {
  .topic-row { padding: 16px 22px; gap: 14px; }
}
.topic-row + .topic-row {
  border-top: 2px solid #000;
}
.topic-row:hover {
  background: #F7F5F0;
}
.topic-row.is-top {
  background: #FFF0F0;
  border-left: 4px solid #E8573A;
  padding-left: 10px;
}
@media (min-width: 640px) {
  .topic-row.is-top { padding-left: 18px; }
}
.topic-row.is-top:hover {
  background: #FFF0F0;
}
.panel-footer {
  padding: 12px 16px;
  border-top: 2px solid #000;
  background: #F7F5F0;
}
@media (min-width: 640px) {
  .panel-footer { padding: 14px 22px; }
}

/* ── Rank Number ── */
.rank-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
  transition: all 0.3s ease;
  border: 2px solid #000;
}
.rank-num.is-gold {
  background: #E8573A;
  color: #fff;
}
.rank-num.is-default {
  background: #666A86;
  color: #fff;
}

/* ── Last Winner ── */
.last-winner {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
}

/* ── Topic Animation ── */
@keyframes g-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.g-in { animation: g-rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.g-d1 { animation-delay: 60ms; }
.g-d2 { animation-delay: 120ms; }
.g-d3 { animation-delay: 180ms; }

/* ===== 블로그 본문 (prose-blog) ===== */
.prose-blog {
  font-family: 'Galmuri11', sans-serif;
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}
.prose-blog h1 { font-family: 'NeoDunggeunmo', sans-serif; font-size: 1.4em; font-weight: bold; margin: 2em 0 0.5em; padding-bottom: 0.3em; border-bottom: 3px solid #000; }
.prose-blog h2 { font-family: 'NeoDunggeunmo', sans-serif; font-size: 1.2em; font-weight: bold; margin: 1.5em 0 0.5em; }
.prose-blog h3 { font-family: 'NeoDunggeunmo', sans-serif; font-size: 1.05em; font-weight: bold; margin: 1.2em 0 0.5em; }
.prose-blog p { margin: 0.8em 0; }
.prose-blog ul, .prose-blog ol { margin: 0.8em 0; padding-left: 1.5em; }
.prose-blog li { margin: 0.3em 0; }
.prose-blog a { color: #000; text-decoration: underline; text-underline-offset: 2px; }
.prose-blog a:hover { color: #666; }
.prose-blog blockquote {
  border-left: 4px solid #000;
  padding: 0.5em 1em;
  margin: 1em 0;
  color: #666;
  background: #FFFFFF;
}
.prose-blog pre {
  background-color: #1a1a1a;
  color: #e0e0e0;
  padding: 1.2em;
  padding-right: 3em;
  overflow-x: auto;
  margin: 1.2em 0;
  border: 2px solid #000;
  font-family: 'Galmuri11', monospace;
  font-size: 13px;
  line-height: 1.6;
}

/* 코드 블록 복사 버튼 */
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #444;
  background: #2a2a2a;
  color: #888;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}
.code-copy-btn:hover {
  border-color: #D4A04A;
  color: #D4A04A;
  background: #333;
}
.prose-blog code {
  font-family: 'Galmuri11', monospace;
  font-size: 13px;
}
.prose-blog p code {
  background-color: #FFFFFF;
  padding: 0.15em 0.4em;
  border: 1px solid #000;
  font-size: 0.9em;
}
.prose-blog img {
  max-width: 100%;
  border: 2px solid #000;
  margin: 1.2em 0;
}
.prose-blog table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 13px;
}
.prose-blog th, .prose-blog td {
  border: 2px solid #000;
  padding: 0.6em 0.8em;
  text-align: left;
}
.prose-blog th { background-color: #E8D4A8; font-family: 'NeoDunggeunmo', sans-serif; }
.prose-blog hr {
  border: none;
  border-top: 2px solid #000;
  margin: 2em 0;
}

/* ===== Tool Picker Buttons ===== */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 2px solid #000;
  background: #FFFFFF;
  font-family: 'NeoDunggeunmo', monospace;
  font-size: 0.75rem;
  color: #2C2417;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.tool-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px #000;
}
.tool-btn.selected {
  background: #E8D4A8;
  border-color: #000;
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.15);
  transform: translate(1px, 1px);
}
.tool-btn.selected:hover {
  background: #E8D4A8;
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.15);
  transform: translate(1px, 1px);
}

/* ===== BEST 탭 ===== */
.best-tab {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 11px;
  padding: 4px 12px;
  border: 2px solid #000;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-faint);
}
.best-tab:hover {
  background: #F7F5F0;
  color: var(--text);
}
.best-tab.is-active {
  background: var(--nav-bg);
  color: var(--nav-text);
}

/* ===== 익명 토글 ===== */
.anon-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.anon-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.anon-toggle input[type="checkbox"]:checked {
  background: var(--nav-bg);
}
.anon-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.anon-toggle span {
  font-family: 'Galmuri11', sans-serif;
  font-size: 10px;
  color: var(--text-faint);
  transition: color 0.15s ease;
}
.anon-toggle:hover span {
  color: var(--text-sub);
}

/* ===== 쇼케이스 컴포넌트 ===== */
.showcase-panel {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
}

.showcase-hero-card {
  position: relative;
  background: #FFFFFF;
  border: 3px solid #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
}
.showcase-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #FFD700, #E8573A);
  z-index: 2;
}
.showcase-hero-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

.showcase-card {
  position: relative;
  background: #FFFFFF;
  border: 3px solid #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
}
.showcase-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #000;
}

.showcase-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 11px;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}
.showcase-rank.is-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #2a1810;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.showcase-rank.is-silver {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #2a1810;
}
.showcase-rank.is-bronze {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #FFFFFF;
}

.showcase-tool-tag {
  font-family: 'Galmuri11', sans-serif;
  font-size: 10px;
  color: var(--text-sub);
  padding: 2px 6px;
  background: #E8D4A8;
  border: 1px solid #000;
}

.showcase-info-section {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border);
}
.showcase-info-section:last-child {
  border-bottom: none;
}
@media (min-width: 640px) {
  .showcase-info-section { padding: 20px 24px; }
}

.showcase-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Galmuri11', sans-serif;
  font-size: 10px;
  color: var(--text-sub);
  padding: 4px 10px;
  border: 1px solid #000;
  background: var(--gold-light);
}

/* ===== 퀘스트 XP바 ===== */
.quest-xp-bar {
  height: 14px;
  border: 3px solid #000;
  background: #1A1714;
  overflow: hidden;
}
.quest-xp-bar-lg { height: 18px; }
.quest-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4A04A, #FFD700, #E8D4A8);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.quest-xp-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: rgba(255,255,255,0.25);
}
.quest-xp-fill.is-full {
  background: linear-gradient(90deg, #7BA88E, #A8D4B8, #7BA88E);
}

/* ===== 퀘스트 난이도 별 ===== */
.quest-stars { display: flex; gap: 2px; }
.quest-star {
  width: 10px; height: 10px;
  background: #D4A04A;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.quest-star.is-empty { background: #D4CFC4; }

/* ===== 퀘스트 목록 카드 ===== */
.quest-card {
  background: #FFFFFF;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  overflow: hidden;
  transition: all 0.2s ease-out;
}
.quest-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

/* ===== 듀오링고 스타일 맵 경로 ===== */
.quest-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

/* 맵 노드 (스테이지 원) */
.stage-node {
  width: 56px;
  height: 56px;
  border: 4px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.stage-node:hover { transform: scale(1.08); }

.stage-node.is-cleared {
  background: #7BA88E;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #7BA88E;
}
.stage-node.is-current {
  background: #FFD700;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #D4A04A, 0 0 20px rgba(255,215,0,0.4);
  animation: stageGlow 2s ease-in-out infinite;
}
.stage-node.is-locked {
  background: #D4CFC4;
  border-color: #9B8E7E;
  opacity: 0.5;
}
.stage-node.is-locked:hover { transform: none; }

@keyframes stageGlow {
  0%, 100% { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #D4A04A, 0 0 16px rgba(255,215,0,0.3); }
  50% { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #D4A04A, 0 0 24px rgba(255,215,0,0.6); }
}

/* 맵 행 (지그재그) */
.stage-row {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
  padding: 4px 0;
}
.stage-row.align-left { justify-content: flex-start; padding-left: 10%; }
.stage-row.align-center { justify-content: center; }
.stage-row.align-right { justify-content: flex-end; padding-right: 10%; }

/* 노드 사이 연결 도트 */
.stage-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  width: 100%;
  max-width: 320px;
}
.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D4CFC4;
}
.stage-dot.is-cleared { background: #7BA88E; }
.stage-dot.is-active { background: #D4A04A; }

/* 스테이지 라벨 (노드 옆) */
.stage-label {
  position: absolute;
  white-space: nowrap;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 12px;
  color: #2C2417;
  pointer-events: none;
}
.stage-label.is-locked { color: #9B8E7E; }
.stage-label-left { right: calc(100% + 12px); text-align: right; }
.stage-label-right { left: calc(100% + 12px); text-align: left; }
@media (max-width: 480px) {
  .stage-label { display: none; }
}

/* ===== 완료 버튼 ===== */
.quest-complete-btn {
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 18px;
  border: 4px solid #000;
  padding: 14px 48px;
  cursor: pointer;
  background: linear-gradient(180deg, #FFD700 0%, #D4A04A 100%);
  color: #000;
  box-shadow: 4px 4px 0px #000;
  transition: all 0.15s ease-out;
  letter-spacing: 2px;
  border-radius: 8px;
}
.quest-complete-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
  background: linear-gradient(180deg, #FFE44D 0%, #D4A04A 100%);
}
.quest-complete-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

/* ===== 클리어 배너 ===== */
.quest-clear-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7BA88E, #5E9070);
  border: 3px solid #000;
  box-shadow: 3px 3px 0px #000;
  color: #FFFFFF;
  padding: 6px 16px;
  font-family: 'NeoDunggeunmo', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}
.quest-clear-badge::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  animation: clearShine 3s ease-in-out infinite;
}
@keyframes playerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

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

/* ===== 퀘스트 맵 보드 ===== */
.quest-map-board {
  background-color: #E8DCC8;
  image-rendering: pixelated;
  background-image:
    url("/Paper-Pixels-8x8/Tiles.png");
  background-size: 32px auto;
  background-repeat: repeat;
  background-position: 0 0;
  position: relative;
}
.quest-map-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(232, 220, 200, 0.55);
  pointer-events: none;
  z-index: 0;
}
.quest-map-board > * {
  position: relative;
  z-index: 1;
}

/* ===== Confetti 파티클 ===== */
@keyframes confettiFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(var(--drift)) rotate(var(--spin));
    opacity: 0;
  }
}

/* ===== 퀘스트 클리어 오버레이 ===== */
@keyframes clearTextPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes clearTextGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(255,215,0,0.3), 0 2px 0 #000; }
  50% { text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.2), 0 2px 0 #000; }
}
.quest-clear-text {
  animation: clearTextPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, clearTextGlow 2s ease-in-out 0.6s infinite;
  opacity: 0;
}
@keyframes clearSubFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.quest-clear-sub {
  opacity: 0;
  animation: clearSubFade 0.5s ease-out 0.8s forwards;
}
.quest-clear-cta {
  opacity: 0;
  animation: clearSubFade 0.5s ease-out 1.2s forwards;
}
