/* style.css — GlowUp Luminal Persona Design System
 * 2026-06-01: 수정 — GlowUp 로고에 cursor: pointer 및 호버 트랜지션 효과 추가
 * 2026-06-01: 수정 — 갤러리 페이지 텅 빈 상태(empty-gallery-state) 및 개별 명함 삭제 버튼(delete-card-btn) 스타일 추가
 * 2026-06-01: 수정 — 신규 서브 스타일 칩(sub-style-chips, sub-chip) 스타일 및 대표작 명시용(sample-card-works) 텍스트 스타일 추가
 * 2026-06-01: 수정 — 카드 아바타 영역의 높이를 480px로 변경하여 세로 비율을 길게 조정
 * 2026-05-31: 추가 — AI 아바타 실시간 미리보기 컨테이너 및 스피너 로딩 스타일 추가
 * 2026-05-31: 추가 — 스타일 실렉터 칩 및 커스텀 프롬프트 텍스트 영역 모던 스타일 추가
 * 2026-05-31: 수정 — 디자이너 네임카드 시안(screen.png) 기반의 라이트 테마 명함 카드 스타일로 전면 리디자인
 * 2026-05-31: 전면 리디자인 — 밝은 테마 프리미엄 프로필 스튜디오
 * 2026-05-31: 추가 — 첫 화면 세로형 샘플 카드 그리드 및 네비게이션 스타일 추가
 * 2026-05-31: 추가 — Create Avatar 입력 폼 스타일 추가
 * 2026-05-31: 수정 — 캔버스 영역 숨김 처리 및 최종 HTML 프로필 카드 프리미엄 스타일 보완
 * Design tokens from Luminal Persona DESIGN.md
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Surface Colors */
  --surface: #F8F9FA;
  --surface-dim: #D9DADB;
  --surface-bright: #F8F9FA;
  --surface-container-lowest: #FFFFFF;
  --surface-container-low: #F3F4F5;
  --surface-container: #EDEEEF;
  --surface-container-high: #E7E8E9;
  --surface-container-highest: #E1E3E4;
  --on-surface: #191C1D;
  --on-surface-variant: #4A4455;

  /* Primary */
  --primary: #7C3AED;
  --primary-container: #7C3AED;
  --on-primary: #FFFFFF;
  --on-primary-container: #EDE0FF;
  --primary-glow: rgba(124, 58, 237, 0.2);

  /* Secondary */
  --deep-slate: #18181B;
  --surface-border: #E4E4E7;
  --ai-glow: #3B82F6;

  /* Functional */
  --error: #BA1A1A;
  --on-error: #FFFFFF;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Spacing */
  --space-base: 8px;
  --margin-mobile: 20px;
  --margin-desktop: 64px;
  --gutter: 16px;
  --stack-sm: 12px;
  --stack-md: 24px;
  --stack-lg: 48px;

  /* Rounded */
  --rounded-sm: 0.25rem;
  --rounded: 0.5rem;
  --rounded-md: 0.75rem;
  --rounded-lg: 1rem;
  --rounded-xl: 1.5rem;
  --rounded-full: 9999px;

  /* Shadows */
  --shadow-ambient: 0px 10px 40px rgba(0, 0, 0, 0.04);
  --shadow-card: 0px 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0px 16px 48px rgba(0, 0, 0, 0.08);
}

html { scroll-behavior: smooth; }

body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== STEPS ===== */
.step {
  display: none;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--margin-mobile) 100px;
  position: relative;
  z-index: 1;
}
.step.active {
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px;
  position: sticky;
  top: 0;
  background: rgba(248, 249, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.logo:hover {
  opacity: 0.8;
}
.logo .logo-icon {
  font-size: 16px;
  opacity: 0.7;
}

.header-link {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-full);
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.header-link:hover {
  background: var(--surface-container-high);
  transform: scale(1.05);
}

/* ===== HERO ===== */
.hero {
  padding: var(--stack-lg) 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--rounded-full);
  padding: 6px 16px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  color: var(--deep-slate);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--ai-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--on-surface-variant);
  line-height: 22px;
  max-width: 380px;
  margin: 0 auto;
}

/* ===== TOPIC SECTION ===== */
.topic-section {
  flex: 1;
}

.topic-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 14px;
  padding: 0 2px;
}

.select-count {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--rounded-full);
  border: 1px solid var(--surface-border);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: var(--shadow-ambient);
}

.topic-chip:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.04);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.topic-chip.selected {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.chip-icon {
  font-size: 16px;
}

/* ===== CTA ROW ===== */
.cta-row {
  padding-top: 28px;
  display: flex;
  justify-content: center;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--rounded-full);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--primary-glow);
  width: 100%;
  max-width: 400px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon {
  font-size: 14px;
}

.btn-secondary {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--rounded);
  border: 1.5px solid var(--surface-border);
  background: var(--surface-container-lowest);
  color: var(--deep-slate);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--on-surface-variant);
  background: var(--surface-container-low);
  transform: translateY(-1px);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--on-surface-variant);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 16px;
  margin-top: 8px;
  transition: color 0.2s;
  border-radius: var(--rounded);
}

.btn-ghost:hover {
  color: var(--primary);
  background: rgba(124, 58, 237, 0.04);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--rounded-full);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

/* ===== RESULT SECTION ===== */
.result-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
  gap: 20px;
}

.result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* Card Wrapper (Hidden in viewport but rendered in background for export) */
.card-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.card-wrapper canvas {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: var(--rounded-lg);
  animation: card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: filter 0.3s ease;
}

.card-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--rounded-lg) + 2px);
  background: linear-gradient(135deg, var(--primary), var(--ai-glow));
  z-index: -1;
  animation: glow-pulse 3s ease-in-out infinite;
  filter: blur(8px);
  opacity: 0.4;
}

@keyframes card-in {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Action Rows */
.action-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

/* ===== PROFILE CARD ELEMENTS ===== */
.profile-avatar-section {
  position: relative;
  width: 100%;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ai-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--rounded-full);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep-slate);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--rounded-full);
  background: #10B981;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* Trait Cards */
.trait-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--rounded);
  border: 1px solid var(--surface-border);
  background: var(--surface-container-lowest);
  box-shadow: var(--shadow-ambient);
  transition: all 0.2s ease;
}

.trait-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.trait-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--rounded);
  background: var(--surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.trait-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 2px;
}

.trait-value {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--deep-slate);
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--rounded-full);
  border: 1px solid var(--surface-border);
  background: var(--surface-container-lowest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-ambient);
}

.social-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

/* Share CTA */
.share-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--rounded-xl);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.share-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.share-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--on-surface-variant);
  text-align: center;
  line-height: 18px;
}

/* ===== COMMUNITY CTA ===== */
.community-cta {
  padding: 12px 0 0;
}

.cta-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-border);
  border-radius: var(--rounded-xl);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-ambient);
}

.cta-icon {
  font-size: 28px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), var(--ai-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--deep-slate);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.cta-card p {
  font-size: 14px;
  color: var(--on-surface-variant);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ===== BOTTOM TAB BAR ===== */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
  min-width: 64px;
  text-decoration: none;
}

.tab-icon {
  font-size: 20px;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}

.tab-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}

.tab-item.active .tab-icon,
.tab-item.active .tab-label {
  color: var(--primary);
}

.tab-item:hover .tab-icon,
.tab-item:hover .tab-label {
  color: var(--primary);
}

/* ===== LOADING ===== */
.topics-loading {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface-variant);
  padding: 24px 0;
  text-align: center;
  animation: pulse-opacity 1.2s ease-in-out infinite;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* AI Generation Loading */
.gen-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  max-width: 360px;
  width: 100%;
}

.gen-loading-icon {
  font-size: 36px;
  color: var(--primary);
  animation: spin-glow 2s linear infinite;
}

@keyframes spin-glow {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

.gen-loading-text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--on-surface-variant);
  text-align: center;
  animation: pulse-opacity 1.5s ease-in-out infinite;
}

.gen-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--surface-container-high);
  border-radius: var(--rounded-full);
  overflow: hidden;
}

.gen-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--ai-glow));
  border-radius: var(--rounded-full);
  transition: width 0.3s ease;
}

.gen-progress-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--on-surface-variant);
}

/* AI Scanning Animation */
.ai-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ai-glow), transparent);
  animation: scan-line 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes scan-line {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(360px); opacity: 0; }
}

/* ===== CARD GENERATING OVERLAY ===== */
.card-generating {
  position: absolute;
  inset: 0;
  border-radius: var(--rounded-lg);
  background: rgba(124, 58, 237, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  animation: generating-pulse 0.6s ease-out forwards;
}

@keyframes generating-pulse {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.card-wrapper.loading canvas {
  filter: blur(8px) brightness(0.9);
}

/* ===== TOPIC CHIP ANIMATION ===== */
@keyframes chip-select {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.95); }
  70%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.topic-chip.selecting { animation: chip-select 0.25s ease both; }

/* ===== EXPORT BUTTONS ===== */
.btn-export {
  position: relative;
  overflow: hidden;
}

.btn-export:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== EXPORT MODAL ===== */
.export-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 249, 250, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.export-modal {
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-border);
  border-radius: var(--rounded-xl);
  padding: 32px;
  min-width: 280px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-elevated);
}

.export-modal-icon {
  font-size: 32px;
  color: var(--primary);
  animation: spin-glow 1.5s linear infinite;
}

.export-modal-text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--on-surface);
}

.export-modal .gen-progress-bar {
  width: 100%;
}

/* ===== DIVIDER ===== */
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--surface-border);
  margin: 8px 0;
}

/* ===== INSPIRATION SECTION ===== */
.inspiration-section {
  text-align: center;
  padding-top: 4px;
}

.inspiration-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 16px;
}

/* ===== PROFILE NAME ===== */
.profile-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--deep-slate);
  text-align: center;
  letter-spacing: -0.02em;
}

.profile-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  text-align: center;
}

/* ===== RESPONSIVE: DESKTOP ===== */
@media (min-width: 768px) {
  .step {
    max-width: 640px;
    padding: 0 var(--margin-desktop) 100px;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .bottom-tab-bar {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--rounded-xl) var(--rounded-xl) 0 0;
    border-left: 1px solid var(--surface-border);
    border-right: 1px solid var(--surface-border);
  }
}

/* ===== RESPONSIVE: MOBILE SMALL ===== */
@media (max-width: 380px) {
  .hero h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .topic-chip {
    font-size: 13px;
    padding: 8px 14px;
  }

  .profile-name {
    font-size: 24px;
  }
}

/* ===== SAMPLE CARD GRID (HOME) ===== */
.sample-grid-section {
  width: 100%;
  margin-top: var(--stack-md);
}

.sample-grid-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 16px;
  text-align: center;
}

.sample-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
}

.sample-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-border);
  border-radius: var(--rounded-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--shadow-ambient);
  display: flex;
  flex-direction: column;
}

.sample-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}

.sample-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  background: var(--surface-container-low);
  overflow: hidden;
}

.sample-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.sample-card:hover .sample-card-image-wrapper img {
  transform: scale(1.04);
}

.sample-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--surface-border);
  color: var(--deep-slate);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--rounded-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sample-card-info {
  padding: 16px;
  background: var(--surface-container-lowest);
  border-top: 1px solid var(--surface-border);
}

.sample-card-info h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--deep-slate);
  margin-bottom: 4px;
}

.sample-card-info p {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--on-surface-variant);
  line-height: 18px;
}

/* Responsive Grid */
@media (min-width: 560px) {
  .sample-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .sample-card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ===== CREATE AVATAR FORM ===== */
.create-avatar-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.selected-style-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--rounded-md);
  background: var(--surface-container-low);
  border: 1px dashed var(--surface-border);
}

.preview-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.preview-badge {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
  padding: 4px 10px;
  border-radius: var(--rounded-full);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-surface-variant);
}

.input-group input {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--deep-slate);
  padding: 14px 16px;
  border-radius: var(--rounded);
  border: 1.5px solid var(--surface-border);
  background: var(--surface-container-lowest);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ===== IMAGE UPLOAD ZONE ===== */
.image-upload-zone {
  width: 100%;
  height: 130px;
  border: 2px dashed var(--surface-border);
  border-radius: var(--rounded-md);
  background: var(--surface-container-lowest);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  margin-bottom: 4px;
}

.image-upload-zone:hover, .image-upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.02);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.upload-icon {
  font-size: 24px;
  color: var(--on-surface-variant);
}

.upload-text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--deep-slate);
}

.upload-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--on-surface-variant);
}

.upload-preview {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-preview-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: var(--rounded-full);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 10;
}

.remove-preview-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ===== HTML PROFILE CARD (Premium Luminal Card) ===== */
.profile-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  background: #FFFFFF;
  border: 1px solid rgba(24, 24, 27, 0.08);
  border-radius: var(--rounded-xl);
  padding: 0;
  box-shadow: 0px 16px 48px rgba(24, 24, 27, 0.06), 0px 0px 20px rgba(124, 58, 237, 0.02);
  color: #18181B;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  animation: card-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Full-width avatar image at top of card */
.profile-card-avatar {
  position: relative;
  width: 100%;
  height: 480px;
  background: #F4F4F5;
  overflow: hidden;
}

.profile-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.profile-card-avatar img.dragging {
  cursor: grabbing;
}

/* 이미지 재생성 버튼 (우측 하단 플로팅) */
.refresh-avatar-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(24, 24, 27, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.refresh-avatar-btn:hover {
  background: #FFFFFF;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.2);
  border-color: var(--primary);
}
.refresh-avatar-btn:hover .refresh-icon {
  transform: rotate(180deg);
}
.refresh-avatar-btn .refresh-icon {
  font-size: 18px;
  display: inline-block;
  transition: transform 0.4s ease;
  line-height: 1;
}

/* 아바타 오버레이 로딩 */
.avatar-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 9;
}

/* 아바타 오버레이 프로그레스 텍스트 */
.avatar-loading-progress {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.ai-mastered-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(24, 24, 27, 0.08);
  color: #18181B;
  padding: 4px 10px;
  border-radius: var(--rounded-full);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-mastered-badge .badge-icon {
  color: var(--primary);
  font-size: 9px;
}

/* White details section below avatar */
.profile-card-body {
  padding: 24px 20px 20px 20px;
}

.card-profile-details {
  text-align: center;
  margin-bottom: 20px;
}

.card-profile-details h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #18181B;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.card-profile-details p {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: rgba(24, 24, 27, 0.45);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F8F9FA;
  border: 1px solid rgba(24, 24, 27, 0.04);
  border-radius: var(--rounded);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-item:hover {
  border-color: rgba(124, 58, 237, 0.2);
  background: #F5F3FF;
}

.contact-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: var(--rounded-full);
  background: rgba(124, 58, 237, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 14px;
}

.contact-text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(24, 24, 27, 0.4);
  letter-spacing: 0.05em;
}

.contact-value {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #18181B;
  word-break: break-all;
}

.card-social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid rgba(24, 24, 27, 0.06);
  padding-top: 16px;
}

.card-social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--rounded-full);
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #F8F9FA;
  color: rgba(24, 24, 27, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.card-social-btn:hover {
  border-color: var(--primary);
  color: #FFFFFF;
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.share-name-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--rounded-full);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.share-name-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

/* ===== Style Selector & Prompt Textarea (GlowUp Premium UI) ===== */
.style-select-chips {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.style-chip {
  flex: 1;
  padding: 12px;
  border-radius: var(--rounded-md);
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #F8F9FA;
  color: #18181B;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.style-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.style-chip:hover:not(.active) {
  border-color: rgba(124, 58, 237, 0.3);
  background: #F5F3FF;
}

.sub-chip {
  padding: 8px 12px;
  border-radius: var(--rounded);
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #F8F9FA;
  color: #18181B;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sub-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.12);
}

/* ===== EMPTY GALLERY STATE (gallery.html) ===== */
.empty-gallery-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  background: var(--surface-container-lowest);
  border: 1px dashed var(--surface-border);
  border-radius: var(--rounded-lg);
  margin-top: 16px;
  width: 100%;
}

.empty-gallery-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-gallery-state .empty-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--deep-slate);
  margin-bottom: 4px;
}

.empty-gallery-state .empty-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--on-surface-variant);
  max-width: 280px;
}

/* ===== DELETE CARD BUTTON (gallery.html) ===== */
.delete-card-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--rounded-full);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--surface-border);
  color: var(--deep-slate);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-ambient);
  z-index: 15;
}

.delete-card-btn:hover {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

textarea#input-prompt {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  border-radius: var(--rounded);
  border: 1px solid rgba(24, 24, 27, 0.08);
  background: #FFFFFF;
  color: #18181B;
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea#input-prompt:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

/* ===== AI Avatar Preview (create.html) ===== */
.avatar-preview-container {
  width: 120px;
  height: 120px;
  border-radius: var(--rounded-full);
  border: 1.5px dashed rgba(24, 24, 27, 0.15);
  background: #F4F4F5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 8px 24px rgba(24, 24, 27, 0.04);
}

.avatar-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Spinner for preview */
.gen-loading-spinner {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}

.gen-loading-spinner .spinner-icon {
  font-size: 18px;
  color: var(--primary);
  animation: spin-pulse 1.2s linear infinite;
}

@keyframes spin-pulse {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(0.9); }
}
