/* ==========================================================================
   💍 다이렉트결혼준비 포인트 체크판 - 화이트 & 실버 & 핑크 테마
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  /* Font Family */
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Outfit', 'Pretendard', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── 배경 ── */
  --bg-primary: #fafafa;
  --bg-secondary: #f4f4f6;
  --bg-glow-1: rgba(255, 182, 193, 0.22);   /* Rose Pink */
  --bg-glow-2: rgba(192, 192, 210, 0.18);   /* Silver Lavender */
  --bg-glow-3: rgba(255, 228, 235, 0.25);   /* Pale Blush */

  /* ── 카드 / 컨테이너 ── */
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(220, 220, 230, 0.7);
  --card-shadow: 0 4px 24px 0 rgba(180, 160, 175, 0.10);

  /* ── 텍스트 ── */
  --text-primary: #1e1b2e;
  --text-secondary: #5e5a72;
  --text-muted: #a8a4b8;

  /* ── 선 / 입력 ── */
  --border-color: rgba(200, 195, 215, 0.75);
  --input-bg: rgba(255, 255, 255, 0.9);

  /* ── 핑크 포인트 ── */
  --pink-primary: #e05c7a;
  --pink-secondary: #f49db3;
  --pink-light: #fde8ed;
  --pink-gradient: linear-gradient(135deg, #e05c7a 0%, #f49db3 100%);
  --pink-gradient-soft: linear-gradient(135deg, #fce4ec 0%, #fde8f5 100%);

  /* ── 실버 포인트 ── */
  --silver-primary: #9494aa;
  --silver-secondary: #c8c8d8;
  --silver-gradient: linear-gradient(135deg, #b8b8cc 0%, #e0e0ec 100%);

  /* ── 골드 (포인트 수치 강조용 유지) ── */
  --gold-primary: #c47a5a;
  --gold-secondary: #e0a882;
  --gold-gradient: linear-gradient(135deg, #c47a5a 0%, #e8c4a8 100%);

  /* ── 상태색 ── */
  --success: #2ea87c;
  --warning: #e07c3a;
  --danger: #d94f6a;
  --accent-color: var(--pink-primary);
  --accent-gradient: var(--pink-gradient);

  /* ── 토스트 ── */
  --toast-bg: rgba(30, 27, 46, 0.92);
  --toast-text: #ffffff;
}

/* ── 리셋 ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(255, 182, 193, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(192, 192, 220, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 55% 35% at 70% 95%, rgba(255, 228, 235, 0.20) 0%, transparent 70%);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Background Glow Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  animation: orbFloat 28s infinite alternate ease-in-out;
}

.glow-orb-1 {
  width: 520px;
  height: 520px;
  background-color: var(--bg-glow-1);
  top: -120px;
  right: -80px;
}

.glow-orb-2 {
  width: 420px;
  height: 420px;
  background-color: var(--bg-glow-2);
  top: 380px;
  left: -120px;
  animation-delay: -6s;
}

.glow-orb-3 {
  width: 460px;
  height: 460px;
  background-color: var(--bg-glow-3);
  bottom: 8%;
  right: 8%;
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(35px, -55px) scale(1.08); }
  100% { transform: translate(-25px, 35px) scale(0.96); }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ──────────────────────────────────────────
   App Header
────────────────────────────────────────── */
.app-header {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background-color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--border-color);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(180, 160, 175, 0.08);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

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

.brand-emoji {
  font-size: 2.1rem;
  line-height: 1;
}

.brand h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--pink-primary);
  font-weight: 600;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.brand-contact-divider {
  margin: 0 8px;
  color: var(--pink-secondary);
  opacity: 0.6;
}

.brand-contact {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none; /* 이메일 주소의 대문자 강제 변환 방지 */
}

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

/* ──────────────────────────────────────────
   Buttons
────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  outline: none;
  letter-spacing: 0.01em;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-primary {
  background: var(--pink-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(224, 92, 122, 0.28);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(224, 92, 122, 0.36);
}

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

.btn-outline {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.btn-outline:hover {
  background-color: var(--pink-light);
  border-color: var(--pink-secondary);
  color: var(--pink-primary);
}

.btn-danger {
  background-color: transparent;
  border: 1px solid rgba(217, 79, 106, 0.28);
  color: var(--danger);
}

.btn-danger:hover {
  background-color: var(--danger);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 79, 106, 0.22);
}

/* ──────────────────────────────────────────
   Dashboard Section
────────────────────────────────────────── */
.dashboard-section {
  padding-top: 30px;
  margin-bottom: 25px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 340px 1fr; /* 바뀐 순서에 맞춰 너비 고정(320px, 340px) 및 넓은 영역(1fr) 부여 */
  gap: 18px;
}

.dashboard-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px 0 rgba(180, 150, 165, 0.12);
}

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

.dashboard-card .card-header h3 {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dashboard-card .card-header span {
  color: var(--silver-secondary);
}

/* Card Total */
.card-total {
  background: linear-gradient(145deg, #ffffff 0%, #fdf5f7 100%);
  border: 1px solid rgba(224, 92, 122, 0.12);
}

.card-total .points-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.card-total .points-unit {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-left: 2px;
}

.card-total .card-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Card Progress */
.card-progress {
  min-height: 180px;
}

.status-badge {
  background-color: var(--pink-light);
  color: var(--pink-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(224, 92, 122, 0.18);
}

.progress-bar-container {
  height: 10px;
  background-color: #ededf3;
  border-radius: 6px;
  position: relative;
  margin-top: 15px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--pink-gradient);
  border-radius: 6px;
  transition: width var(--transition-bounce);
  box-shadow: 0 0 8px rgba(224, 92, 122, 0.30);
}

.milestone-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.marker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--silver-secondary);
  border: 2px solid #ffffff;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.milestone-marker.active .marker-dot {
  background-color: var(--pink-primary);
  transform: scale(1.3);
}

.marker-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 15px;
  position: absolute;
  white-space: nowrap;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 500;
}

#progress-percentage {
  color: var(--pink-primary);
  font-weight: 700;
  white-space: nowrap;
}

#next-milestone-text {
  color: var(--text-secondary);
}

/* Card Stats */
.stats-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  justify-content: center;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ──────────────────────────────────────────
   FTC Section
────────────────────────────────────────── */
.ftc-section {
  margin-bottom: 25px;
}

.ftc-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 16px;
  padding: 20px;
}

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

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

.ftc-header-title h2 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}

.text-warning {
  color: var(--warning);
}

.ftc-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ftc-blockquote {
  background-color: var(--pink-light);
  border-left: 4px solid var(--pink-primary);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  word-break: keep-all;
}

/* ──────────────────────────────────────────
   Controls Bar (Search & Filter)
────────────────────────────────────────── */
.controls-section {
  margin-bottom: 20px;
}

.search-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-box {
  position: relative;
  width: 320px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--silver-primary);
  pointer-events: none;
  font-size: 20px;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  border-color: var(--pink-secondary);
  box-shadow: 0 0 0 3px rgba(224, 92, 122, 0.10);
}

.btn-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.btn-clear:hover {
  background-color: var(--pink-light);
  color: var(--pink-primary);
}

/* Mobile Filter */
.mobile-filter-container {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #fdf5f9 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mobile-filter-container .material-symbols-rounded {
  color: var(--pink-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mobile-filter-container select {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  /* 네이티브 화살표 제거 후 커스텀 화살표 */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e8789a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 28px;
}

/* Desktop Category Tabs */
.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-tabs::-webkit-scrollbar {
  height: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background-color: var(--silver-secondary);
  border-radius: 2px;
}

.tab-btn {
  background-color: transparent;
  border: 1.5px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  background-color: var(--pink-light);
  color: var(--pink-primary);
}

.tab-btn.active {
  background-color: #ffffff;
  color: var(--pink-primary);
  border-color: rgba(224, 92, 122, 0.22);
  box-shadow: 0 3px 12px rgba(224, 92, 122, 0.10);
}

/* ──────────────────────────────────────────
   Checklist Grid & Cards
────────────────────────────────────────── */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.checklist-card {
  background-color: #ffffff;
  border: 1.5px solid var(--card-border);
  box-shadow: 0 2px 16px rgba(180, 150, 165, 0.08);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.checklist-card:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: 0 10px 28px rgba(180, 130, 150, 0.13);
  border-color: rgba(224, 92, 122, 0.20);
}

/* Checked */
.checklist-card.checked {
  opacity: 0.72;
  background-color: #fdf9fb;
  border-color: rgba(46, 168, 124, 0.22);
}

.checklist-card.checked::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #2ea87c, #7dd3b8);
  border-radius: 4px 0 0 4px;
}

/* Card Main Area */
.card-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

/* Custom Checkbox */
.checkbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #f7f5f8;
  border: 2px solid var(--silver-secondary);
  border-radius: 7px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-wrapper input[type="checkbox"]:checked ~ .custom-checkbox {
  background-color: var(--success);
  border-color: var(--success);
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(46, 168, 124, 0.38);
}

.custom-checkbox::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-wrapper input[type="checkbox"]:checked ~ .custom-checkbox::after {
  display: block;
}

/* Card Info */
.card-info {
  flex-grow: 1;
}

.card-info h3 {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color var(--transition-fast);
  word-break: keep-all;
}

.checklist-card.checked .card-info h3 {
  text-decoration: line-through;
  color: var(--text-muted);
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.card-badge-points {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.81rem;
  color: var(--pink-primary);
  background-color: var(--pink-light);
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
}

.card-badge-limit {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.limit-once {
  background-color: rgba(148, 148, 170, 0.12);
  color: var(--silver-primary);
}

.limit-unlimited {
  background-color: rgba(168, 130, 200, 0.12);
  color: #9468c8;
}

.limit-capped {
  background-color: rgba(100, 160, 220, 0.12);
  color: #4a90c8;
}

/* Toggle Guide Button */
.btn-toggle-guide {
  background: none;
  border: none;
  color: var(--silver-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: transform var(--transition-bounce), color var(--transition-fast);
  padding: 2px;
  border-radius: 6px;
}

.btn-toggle-guide:hover {
  color: var(--pink-primary);
  background-color: var(--pink-light);
}

.checklist-card.expanded .btn-toggle-guide {
  transform: rotate(180deg);
  color: var(--pink-primary);
}

/* Card Actions (Quantity / Level) */
.card-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* Level Toggle */
.level-toggle-group {
  display: inline-flex;
  background-color: #f2f0f5;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border-color);
}

.level-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.level-btn.active {
  background-color: #ffffff;
  color: var(--pink-primary);
  box-shadow: 0 2px 6px rgba(224, 92, 122, 0.12);
}

/* Quantity Control */
.quantity-control {
  display: flex;
  align-items: center;
  background-color: #f2f0f5;
  border-radius: 8px;
  padding: 2px;
  border: 1px solid var(--border-color);
}

.quantity-btn {
  background: none;
  border: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: 6px;
  transition: background-color var(--transition-fast);
}

.quantity-btn:hover {
  background-color: #ffffff;
  color: var(--pink-primary);
}

.quantity-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.quantity-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 25px;
  text-align: center;
  color: var(--text-primary);
}

.quantity-unit {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-left: 2px;
}

/* Input Quantity */
.input-quantity-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-quantity-control input {
  width: 60px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-quantity-control input:focus {
  border-color: var(--pink-secondary);
}

/* ──────────────────────────────────────────
   Expanded Guide Section
────────────────────────────────────────── */
.card-guide {
  margin-top: 12px;
  padding: 13px 14px;
  background-color: #fdf8fa;
  border-radius: 10px;
  font-size: 0.82rem;
  display: none;
  border-left: 3px solid var(--pink-secondary);
}

.checklist-card.expanded .card-guide {
  display: block;
  animation: slideDown var(--transition-normal) ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.guide-desc {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.55;
}

.guide-reqs-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guide-reqs-list {
  list-style: none;
  padding-left: 0;
}

.guide-reqs-list li {
  position: relative;
  padding-left: 14px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  line-height: 1.5;
}

.guide-reqs-list li::before {
  content: '▪';
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--pink-secondary);
}

/* 다이렉트결혼준비 사이트 링크 버튼 */
.guide-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink-primary);
  background: transparent;
  border: 1.5px solid rgba(224, 92, 122, 0.4);
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  letter-spacing: 0.01em;
}

.guide-site-link .material-symbols-rounded {
  font-size: 15px;
  line-height: 1;
}

.guide-site-link:hover {
  background: var(--pink-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(224, 92, 122, 0.28);
  transform: translateY(-1px);
}

.guide-site-link:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ──────────────────────────────────────────
   No Results
────────────────────────────────────────── */
.no-results-card {
  background-color: #ffffff;
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  padding: 44px 40px;
  text-align: center;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--card-shadow);
}

.no-results-card span {
  font-size: 3rem;
  color: var(--silver-secondary);
}

.no-results-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.no-results-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ──────────────────────────────────────────
   App Footer
────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--border-color);
  padding: 28px 0;
  background-color: rgba(245, 240, 248, 0.5);
  text-align: center;
  margin-top: auto;
}

.footer-caution {
  font-size: 0.84rem;
  color: var(--danger);
  margin-bottom: 10px;
  word-break: keep-all;
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ──────────────────────────────────────────
   Toast Notifications
────────────────────────────────────────── */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--toast-bg);
  color: var(--toast-text);
  padding: 12px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ──────────────────────────────────────────
   Icon Color Utilities
────────────────────────────────────────── */
.icon-badge {
  color: var(--pink-secondary) !important;
}

/* ──────────────────────────────────────────
   Responsive
────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-progress {
    grid-column: 1 / -1; /* 바뀐 순서에 따라 1024px 이하에서는 마일스톤 카드가 2층 전체를 차지하도록 변경 */
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .brand {
    justify-content: center;
    flex-direction: column;
    gap: 6px;
  }

  .brand-subtitle {
    justify-content: center;
  }

  .brand-contact-divider {
    display: none; /* 모바일에서는 수평 구분선을 숨기고 아래로 내림 */
  }

  .brand-contact {
    display: block;
    width: 100%;
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 0.72rem;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3개 버튼을 1:1:1 가로 균등 배치 */
    gap: 6px;
    width: 100%;
    margin-top: 14px;
  }

  .header-actions .btn {
    width: 100%;
    padding: 8px 4px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    justify-content: center;
    gap: 4px;
  }

  .header-actions .btn .material-symbols-rounded {
    font-size: 1.1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card-progress {
    grid-column: 1 / -1; /* 마일스톤 카드는 아래 전체 너비로 */
  }

  .dashboard-card {
    padding: 16px;
    border-radius: 14px;
  }

  .card-total .points-value {
    font-size: 2.3rem; /* 수치가 길어져도 모바일에서 줄바꿈 방지 */
  }

  .card-total .points-unit {
    font-size: 1.1rem;
  }

  .dashboard-card .card-header h3 {
    font-size: 0.8rem;
  }

  .stat-item {
    font-size: 0.8rem;
  }

  .search-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .search-box {
    width: 100%;
  }

  .category-tabs {
    display: none;
  }

  .mobile-filter-container {
    display: flex;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .ftc-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .btn-copy-ftc {
    width: 100%;
  }

  .progress-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #f4f2f6;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--pink-secondary);
}

/* --- Dialog Modal Styles --- */
dialog {
  border: none;
  padding: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  max-width: 550px;
  width: 90%;
  max-height: 80vh; /* 최대 높이 한도 소폭 축소 */
  overflow: hidden;
  margin: 6vh auto auto auto; /* 상단 6vh 마진을 두어 URL 바 가려짐 방지 */
  
  /* CSS transition for smooth entry */
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), display 0.3s ease allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: scale(1);
}

/* Backdrop styling */
dialog::backdrop {
  background-color: rgba(30, 20, 25, 0.4);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease, display 0.3s ease allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;
}

/* Starting style support for exit animations in modern browsers */
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.9);
  }
  dialog[open]::backdrop {
    opacity: 0;
  }
}

/* Dialog inner content styling */
.dialog-content {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fff0f5 0%, #ffeef3 100%);
  border-bottom: 1px solid rgba(232, 120, 154, 0.15);
}

.dialog-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialog-header-icon {
  font-size: 1.5rem;
}

.dialog-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pink-primary);
  margin: 0;
}

.btn-close-dialog {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-close-dialog:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.dialog-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #faf8f9;
}

/* Guide item styles resembling a paper checklist or step cards */
.guide-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 12px rgba(232, 120, 154, 0.03);
  position: relative;
}

.guide-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.guide-badge.green {
  background-color: #e8f7f0;
  color: #10b981;
}

.guide-badge.pink {
  background-color: var(--pink-light);
  color: var(--pink-primary);
}

.guide-badge.blue {
  background-color: #e0f2fe;
  color: #0284c7;
}

.guide-badge.silver {
  background-color: #f1f5f9;
  color: #475569;
}

.guide-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.guide-item p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.guide-item ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-item li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  display: flex;
  justify-content: flex-end;
}

.btn-primary-dialog {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-primary);
}

.btn-primary-dialog:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

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

/* --- Notice Banner Styles --- */
.notice-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.notice-item.caution {
  background-color: #fff9e6;
  border: 1px solid #ffe8a1;
  color: #8a6d1c;
}

.notice-item.caution .icon {
  color: #d97706;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notice-item.contact {
  background-color: #f5f3f7;
  border: 1px solid #eadef0;
  color: #55445d;
}

.notice-item.contact .icon {
  color: var(--pink-primary);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notice-content {
  flex-grow: 1;
}

.notice-content strong {
  font-weight: 700;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .notice-banner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* 모바일 전용 설명서 다이얼로그 미세 보정 */
@media (max-width: 480px) {
  dialog {
    width: 92%;
    border-radius: 16px;
    margin: 8vh auto auto auto; /* 모바일에서 주소창을 피해 조금 더 밑으로 이격 */
    max-height: 76vh; /* 화면 높이에 맞춰 최대 76%로 규격 조정 */
  }

  .dialog-header {
    padding: 14px 18px;
  }

  .dialog-header h2 {
    font-size: 1.05rem;
  }

  .dialog-body {
    padding: 16px;
    gap: 12px;
  }

  .guide-item {
    padding: 12px 14px;
  }

  .guide-item h3 {
    font-size: 0.88rem;
  }

  .guide-item p {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .guide-item ul {
    margin-top: 6px;
    padding-left: 16px;
    gap: 4px;
  }

  .guide-item li {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .dialog-footer {
    padding: 12px 18px;
  }

  .btn-primary-dialog {
    padding: 8px 20px;
    font-size: 0.82rem;
    border-radius: 10px;
  }
}

/* 설명서 활성화 시 본문 스크롤 잠금 */
body.no-scroll {
  overflow: hidden;
  height: 100%;
}
