/* ==========================================================================
   뮤지엄 헌터 (Museum Hunter) - K-Heritage Design System & Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@500;700;900&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #070b19;
  --bg-surface: rgba(15, 23, 42, 0.82);
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.85);

  --gold-primary: #d4af37;
  --gold-light: #fef08a;
  --gold-dark: #996515;
  --gold-gradient: linear-gradient(135deg, #fef08a 0%, #d4af37 50%, #b45309 100%);
  
  --jade-primary: #10b981;
  --jade-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);

  --royal-blue: #3b82f6;
  --accent-purple: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-glass: rgba(212, 175, 55, 0.22);
  --border-light: rgba(255, 255, 255, 0.08);

  --shadow-gold: 0 10px 25px -5px rgba(212, 175, 55, 0.2);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.5);

  --font-serif: 'Noto Serif KR', serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
}

.header-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4));
  animation: float 3s ease-in-out infinite;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 900;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.rank-badge {
  background: var(--gold-gradient);
  color: #0b1021;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.xp-gauge-container {
  min-width: 140px;
}

.xp-gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.xp-val {
  color: var(--gold-light);
  font-weight: 600;
}

.xp-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.btn-badge-icon {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-glass);
  color: var(--gold-light);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-badge-icon:hover {
  background: rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
}

.badge-count {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.btn-pwa-install {
  background: var(--jade-gradient);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s;
}

.btn-pwa-install:hover {
  transform: scale(1.04);
}

.hidden {
  display: none !important;
}

/* Nav Tabs */
.nav-tabs {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.explore-hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 36px 24px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
}

.gold-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 28px;
}

.search-box-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.search-input-group {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  padding: 6px 8px 6px 18px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s;
}

.search-input-group:focus-within {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.search-icon {
  font-size: 1.1rem;
  margin-right: 8px;
}

.search-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.search-input-group input::placeholder {
  color: var(--text-dim);
}

.btn-search {
  background: var(--gold-gradient);
  border: none;
  color: #0b1021;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.btn-search:hover {
  transform: scale(1.03);
}

/* ==========================================================================
   Filters
   ========================================================================== */
.filter-controls-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.era-filters, .type-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
}

.filter-chip.active {
  background: var(--gold-primary);
  color: #0b1021;
  border-color: var(--gold-light);
  font-weight: 700;
}

/* ==========================================================================
   Relics Grid & Cards
   ========================================================================== */
.relics-grid-section {
  max-width: 1280px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-light);
}

.section-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.relics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.relic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  cursor: pointer;
}

.relic-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary);
  box-shadow: 0 16px 36px rgba(212, 175, 55, 0.15);
}

.card-image-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #020617;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.relic-card:hover .card-img {
  transform: scale(1.08);
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-designation {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.badge-designation.national {
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
}

.badge-designation.treasure {
  background: rgba(217, 119, 6, 0.85);
  color: #fff;
}

.badge-era {
  background: rgba(15, 23, 42, 0.85);
  color: var(--gold-light);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-glass);
}

.btn-bookmark {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-light);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-bookmark.active {
  background: var(--gold-primary);
  color: #0b1021;
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.card-museum {
  font-size: 0.8rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
  flex: 1;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tag-item {
  font-size: 0.72rem;
  color: var(--jade-primary);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-talk {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-light);
  border: 1px solid var(--border-glass);
}

.btn-talk:hover {
  background: rgba(212, 175, 55, 0.35);
}

.btn-quiz {
  background: var(--jade-gradient);
  color: #fff;
}

.btn-quiz:hover {
  filter: brightness(1.15);
}

.btn-detail {
  flex: 0 0 36px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ==========================================================================
   Quest View Cards
   ========================================================================== */
.quest-dashboard-section {
  max-width: 1280px;
  margin: 28px auto 60px;
  padding: 0 24px;
}

.quest-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-glass);
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.quest-hero-text h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.quest-stats-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-glass);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  color: var(--gold-light);
  font-size: 0.95rem;
}

.quest-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.quest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.quest-card:hover {
  border-color: var(--jade-primary);
  transform: translateY(-3px);
}

.quest-card.completed {
  border-color: var(--jade-primary);
  background: rgba(16, 185, 129, 0.05);
}

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

.quest-era {
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.quest-diff {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.quest-diff.diff-easy { background: #059669; color: #fff; }
.quest-diff.diff-normal { background: #d97706; color: #fff; }
.quest-diff.diff-hard { background: #dc2626; color: #fff; }

.quest-status {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
}

.quest-status.done { color: var(--jade-primary); }
.quest-status.todo { color: var(--text-dim); }

.quest-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.quest-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.quest-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.quest-xp {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 600;
}

.btn-start-quest {
  background: var(--gold-gradient);
  color: #0b1021;
  border: none;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.2s;
}

.btn-start-quest:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   Modals & Dialogues (Glassmorphism Popups)
   ========================================================================== */
.dialogue-backdrop, .quiz-backdrop, .report-backdrop, .badge-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.dialogue-modal, .quiz-modal, .badge-modal {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 28px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Dialogue Box internals */
.relic-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.avatar-glow-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: var(--gold-gradient);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.relic-speaker-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
}

.relic-speaker-era {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dialogue-bubble {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

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

.bubble-tag {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 600;
}

.btn-tts-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
}

.bubble-message {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #f1f5f9;
  min-height: 80px;
}

.bubble-catchphrase {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--jade-primary);
}

.dialogue-actions {
  display: flex;
  gap: 10px;
}

.btn-modal-action {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-talk-quiz {
  background: var(--gold-gradient);
  color: #0b1021;
}

.btn-talk-detail {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Quiz Modal internals */
.quiz-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.quiz-reward-tag {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 700;
}

.quiz-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #fff;
}

.quiz-question {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.quiz-opt-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-light);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--gold-primary);
}

.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--jade-primary) !important;
  color: #6ee7b7 !important;
}

.quiz-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

.opt-num {
  background: rgba(255, 255, 255, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.quiz-result-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
}

.result-badge {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.combo-badge {
  background: #ea580c;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
}

.result-explanation {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.btn-next-quest {
  width: 100%;
  background: var(--gold-gradient);
  color: #0b1021;
}

/* ==========================================================================
   Report Modal & Printable Sheet (A4 Print Style)
   ========================================================================== */
.report-modal {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.report-modal-header h2 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1.3rem;
}

.header-btns {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-print {
  background: var(--jade-gradient);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.report-form-bar {
  display: flex;
  gap: 12px;
  background: rgba(30, 41, 59, 0.7);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-group input {
  background: #020617;
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.btn-refresh-report {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
}

/* Print Sheet Styling */
.report-sheet {
  background: #ffffff;
  color: #111827;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-family: 'Noto Serif KR', serif;
}

.sheet-title-box {
  text-align: center;
  border-bottom: 2px solid #111827;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.sheet-title-box h1 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 4px;
}

.sheet-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
}

.sheet-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.88rem;
}

.sheet-meta-table th, .sheet-meta-table td {
  border: 1px solid #d1d5db;
  padding: 8px 12px;
}

.sheet-meta-table th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: center;
}

.report-badge {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.sheet-section {
  margin-bottom: 24px;
}

.sheet-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: 1.5px solid #e5e7eb;
  padding-bottom: 6px;
  margin-bottom: 12px;
  color: #1f2937;
}

.sheet-relics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.sheet-relic-item {
  display: flex;
  gap: 14px;
  border: 1px solid #e5e7eb;
  padding: 10px;
  border-radius: 6px;
  align-items: center;
}

.sheet-relic-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}

.sheet-relic-info strong {
  display: block;
  font-size: 0.95rem;
}

.sheet-era {
  font-size: 0.78rem;
  color: #4b5563;
  display: block;
  margin-bottom: 4px;
}

.sheet-desc {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}

.sheet-text-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.sheet-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 30px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.stamp-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.stamp-circle {
  border: 2px dashed #ef4444;
  color: #ef4444;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  transform: rotate(-5deg);
}

.institution-name {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ==========================================================================
   Badge Modal
   ========================================================================== */
.badge-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.badge-modal-header h2 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1.35rem;
}

.badge-modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.badge-stat-box {
  flex: 1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-glass);
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.badge-item {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.badge-item.earned {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.1);
}

.badge-icon-wrap {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.badge-info h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.badge-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.badge-date {
  font-size: 0.68rem;
  color: var(--gold-light);
}

.badge-locked-tag {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Animations & Confetti
   ========================================================================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.animate-pop {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.confetti-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1100;
}

.confetti-piece {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(500px) rotate(720deg); opacity: 0; }
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gold-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
}

/* ==========================================================================
   Print Media Query (A4 Page Optimization)
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .no-print, .main-header, .explore-hero, .filter-controls-section, .relics-grid-section {
    display: none !important;
  }
  .report-backdrop {
    position: static !important;
    background: none !important;
    padding: 0 !important;
  }
  .report-modal {
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .report-sheet {
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   Mobile Responsive Tweaks
   ========================================================================== */
/* ==========================================================================
   BM 2: K-Heritage Goods Studio & Interactive Mockup Canvas
   ========================================================================== */
.goods-studio-section {
  max-width: 1280px;
  margin: 28px auto 60px;
  padding: 0 24px;
}

.studio-header {
  text-align: center;
  margin-bottom: 32px;
}

.studio-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--border-glass);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.studio-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.studio-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 680px;
  margin: 0 auto;
}

.studio-workspace {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

.studio-controls-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.control-panel-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.panel-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.custom-select {
  width: 100%;
  background: #090e1f;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
}

.goods-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.btn-cat-chip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-light);
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cat-chip:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
}

.btn-cat-chip.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  font-weight: 700;
}

.cat-icon {
  font-size: 1.4rem;
}

.cat-name {
  font-size: 0.78rem;
}

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

.btn-style-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-style-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.btn-style-card.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.2);
}

.style-badge-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--gold-gradient);
  color: #0b1021;
  padding: 2px 6px;
  border-radius: 10px;
}

.style-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.style-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.color-palette-row {
  display: flex;
  gap: 12px;
}

.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
  transform: scale(1.2);
}

.custom-text-input {
  width: 100%;
  background: #090e1f;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
}

.custom-text-input:focus {
  border-color: var(--gold-primary);
}

/* ==========================================================================
   Mockup Canvas & Product Frames
   ========================================================================== */
.studio-preview-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
}

.mockup-canvas-stage {
  height: 420px;
  background: radial-gradient(circle at center, #1e293b 0%, #090e1f 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.mockup-canvas-backdrop {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(212, 175, 55, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.6;
}

/* Generic Product Frame */
.mockup-product-frame {
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  z-index: 10;
}

/* 1. Phone Case Frame */
.frame-phone_case {
  width: 180px;
  height: 330px;
  border-radius: 36px;
  border: 4px solid #334155;
}

.frame-phone_case::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 50px;
  height: 65px;
  background: #020617;
  border-radius: 12px;
  z-index: 20;
  border: 2px solid #475569;
}

/* 2. Keyring Frame */
.frame-keyring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
}

.frame-keyring::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 16px;
  height: 16px;
  background: #cbd5e1;
  border-radius: 50%;
  border: 3px solid #64748b;
  z-index: 20;
}

/* 3. Mug Frame */
.frame-mug {
  width: 220px;
  height: 250px;
  border-radius: 12px 12px 24px 24px;
  border: 4px solid #475569;
}

.frame-mug::after {
  content: '';
  position: absolute;
  right: -36px;
  top: 45px;
  width: 44px;
  height: 120px;
  border: 12px solid #334155;
  border-left: none;
  border-radius: 0 30px 30px 0;
}

/* 4. Ecobag Frame */
.frame-ecobag {
  width: 230px;
  height: 280px;
  border-radius: 8px;
  border: 3px solid #475569;
}

.frame-ecobag::before {
  content: '';
  position: absolute;
  top: -45px;
  width: 100px;
  height: 60px;
  border: 8px solid #64748b;
  border-bottom: none;
  border-radius: 40px 40px 0 0;
}

/* 5. T-Shirt Frame */
.frame-tshirt {
  width: 260px;
  height: 310px;
  border-radius: 16px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 85% 45%, 75% 35%, 75% 100%, 25% 100%, 25% 35%, 15% 45%, 0% 25%);
}

/* Artwork Layer */
.mockup-artwork-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mockup-artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.mockup-artwork-overlay {
  position: absolute;
  inset: 0;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.mockup-engraved-text {
  position: absolute;
  bottom: 22px;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  z-index: 25;
  text-align: center;
  padding: 0 10px;
}

.product-glare-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 30;
}

.mockup-stage-footer {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  z-index: 35;
}

.relic-tag {
  color: var(--gold-light);
  font-weight: 600;
}

/* Pricing Summary Card */
.pricing-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 22px;
}

.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.pricing-item-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.pricing-specs {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.base-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold-light);
}

.profit-calc-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.profit-chip {
  flex: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-light);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.profit-chip.highlight {
  border-color: var(--jade-primary);
  background: rgba(16, 185, 129, 0.1);
}

.profit-lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.profit-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.profit-val.gold {
  color: #34d399;
}

.btn-order-now {
  width: 100%;
  background: var(--gold-gradient);
  color: #0b1021;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-order-now:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* ==========================================================================
   Order Modal & Success Popup
   ========================================================================== */
.order-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.order-modal {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 28px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.order-modal-header {
  margin-bottom: 20px;
}

.order-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.order-modal-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.order-summary-box {
  display: flex;
  gap: 16px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
  align-items: center;
}

.order-thumb-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.order-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.order-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.order-relic-name, .order-style-tag, .order-engrave-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-unit-price {
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-top: 4px;
}

.order-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-row input {
  background: #020617;
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-qty {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
}

.qty-num {
  font-size: 1rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.order-financial-box {
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.fin-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.fin-val.free {
  color: var(--jade-primary);
  font-weight: 600;
}

.total-row {
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.total-val {
  color: var(--gold-light);
  font-size: 1.2rem;
}

.btn-confirm-order {
  width: 100%;
  background: var(--gold-gradient);
  color: #0b1021;
  border: none;
  font-weight: 800;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.btn-confirm-order:hover {
  transform: scale(1.02);
}

.success-modal {
  text-align: center;
  padding: 36px 28px;
}

.success-icon-badge {
  font-size: 3rem;
  margin-bottom: 12px;
}

.success-order-num {
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 20px;
}

.success-info-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.pod-dispatch-note {
  margin-top: 8px;
  color: var(--jade-primary);
}

.btn-talk-goods {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid var(--jade-primary);
}

.btn-talk-goods:hover {
  background: rgba(16, 185, 129, 0.35);
}

.btn-goods {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  border: 1px solid var(--border-glass);
}

.btn-goods:hover {
  background: rgba(212, 175, 55, 0.4);
}

@media (max-width: 900px) {
  .studio-workspace {
    grid-template-columns: 1fr;
  }
  .studio-preview-col {
    position: static;
  }
}
