/* ── D-day 계산기 ── */
:root {
  --purple:  #7c3aed;
  --purple2: #6d28d9;
  --violet:  #f5f3ff;
  --violet2: #ede9fe;
  --ink:     #1e293b;
  --muted:   #64748b;
  --line:    #e2e8f0;
  --bg:      #f8fafc;
  --radius:  14px;
  --radius2: 10px;
  --shadow:  0 2px 8px rgba(0,0,0,.06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; }
.wrap { max-width: 100%; padding: 0 0 60px; }

/* ── 헤더 ── */
.top { padding: 20px 0 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; border-radius: var(--radius2);
  background: linear-gradient(135deg, #7c3aed, #db2777);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.brand h1 { font-size: 22px; font-weight: 700; }
.brand .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── 카드 ── */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 7px; }

/* ── 계산 폼 ── */
.form-row {
  display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; flex-wrap: wrap;
}
.form-row > div { flex: 1; min-width: 140px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.form-row input[type=date] {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius2);
  font-size: 14px; color: var(--ink); outline: none; transition: border-color .15s;
}
.form-row input[type=date]:focus { border-color: var(--purple); }
.form-row input[type=text] {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius2);
  font-size: 14px; color: var(--ink); outline: none; transition: border-color .15s;
}
.form-row input[type=text]:focus { border-color: var(--purple); }

.btn-add {
  height: 44px; padding: 0 18px;
  background: var(--purple); border: none; border-radius: var(--radius2);
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: background .15s;
}
.btn-add:hover { background: var(--purple2); }

/* ── D-day 카운터 카드 ── */
.dday-list { display: flex; flex-direction: column; gap: 10px; }
.dday-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius2); padding: 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  transition: box-shadow .15s;
}
.dday-item:hover { box-shadow: var(--shadow); }

.dday-count {
  min-width: 90px; text-align: center;
}
.dday-count .num {
  font-size: 36px; font-weight: 900; letter-spacing: -1px;
  line-height: 1;
}
.dday-count .unit { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dday-count.past .num { color: var(--muted); }
.dday-count.today .num { color: var(--purple); }
.dday-count.future .num { color: #16a34a; }

.dday-info { flex: 1; min-width: 120px; }
.dday-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.dday-date { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dday-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.dday-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-icon {
  background: none; border: 1px solid var(--line); border-radius: 7px;
  width: 32px; height: 32px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-icon:hover { border-color: var(--purple); color: var(--purple); }
.btn-icon.del:hover { border-color: #ef4444; color: #ef4444; }

/* ── 즐겨찾기 별 ── */
.dday-item.pinned { border-left: 3px solid var(--purple); }

/* ── 빈 상태 ── */
.empty-state {
  text-align: center; padding: 32px; color: var(--muted); font-size: 14px;
}
.empty-state .icon { font-size: 32px; margin-bottom: 10px; }

/* ── 오늘 하이라이트 ── */
.today-banner {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  border-radius: var(--radius); padding: 20px 24px; color: #fff;
  text-align: center; margin-bottom: 16px;
}
.today-banner .tb-label { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.today-banner .tb-date { font-size: 22px; font-weight: 700; }
.today-banner .tb-day { font-size: 14px; opacity: .85; margin-top: 4px; }

/* ── 필터 탭 ── */
.filter-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px; border-radius: 100px;
  border: 1.5px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.filter-btn.active { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ── 토스트 ── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: #1e293b; color: #fff; border-radius: 100px;
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 사용 안내 ── */
.guide-section {
  margin-top: 24px; background: rgba(246,248,255,.6);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.guide-section h2 { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.guide-section h2:not(:first-child) { margin-top: 18px; }
.guide-steps, .guide-features, .guide-usecase {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8;
}
.guide-steps li, .guide-features li, .guide-usecase li { margin-bottom: 4px; }
.guide-steps strong, .guide-features strong { color: var(--ink); }
.guide-privacy {
  margin-top: 16px; background: #f5f3ff; border: 1px solid rgba(124,58,237,.22);
  border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #4c1d95; line-height: 1.55;
}
