/* 오늘의 띠운세 웹 — 미니앱 팔레트(보라 #7B5CFF) 동일 톤, 모바일 우선 */
:root {
  --primary: #7b5cff;
  --primary-deep: #6247d9;
  --primary-soft: #efebff;
  --gold: #f5b800;
  --gold-soft: #fff5cc;
  --navy: #191f28;
  --ink: #333d4b;
  --gray: #6b7684;
  --gray-light: #e5e8eb;
  --bg: #f2f4f6;
  --white: #ffffff;
  --green: #02b262;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', Pretendard, 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 80px; }

/* ── 공통 헤더 ── */
.top-header { text-align: center; margin: 8px 0 16px; }
.top-header .date { font-size: 13px; color: var(--gray); }
.top-header h1 { font-size: 22px; font-weight: 800; color: var(--navy); margin: 2px 0; }
.top-header .mood { font-size: 13px; color: var(--primary); font-weight: 700; }

.card { background: var(--white); border-radius: 16px; padding: 16px; margin-bottom: 12px; }

/* ── 홈: 띠 선택 ── */
.year-box { display: flex; gap: 8px; margin-bottom: 8px; }
.year-box input {
  flex: 1; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--gray-light);
  border-radius: 12px; outline: none; -webkit-appearance: none; background: var(--white);
}
.year-box input:focus { border-color: var(--primary); }
.year-box button {
  font-size: 15px; font-weight: 700; padding: 12px 18px; border: none; border-radius: 12px;
  background: var(--primary); color: var(--white); cursor: pointer;
}
.or-divider { text-align: center; color: var(--gray); font-size: 12px; margin: 12px 0 8px; }

.zodiac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zodiac-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--white); border-radius: 14px; padding: 12px 4px;
  text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 700;
  border: 1.5px solid transparent; transition: transform 0.06s;
}
.zodiac-grid a:active { transform: scale(0.95); border-color: var(--primary); }
.zodiac-grid a .em { font-size: 28px; line-height: 1.2; }

.my-zodiac-banner {
  display: block; text-align: center; background: var(--primary); color: var(--white);
  font-size: 15px; font-weight: 700; border-radius: 14px; padding: 14px;
  text-decoration: none; margin-bottom: 14px;
}

/* ── 결과: 받은 사람용 "나도" 배너 ── */
.me-too {
  display: block; text-align: center; background: var(--gold-soft); color: var(--navy);
  font-size: 14px; font-weight: 700; border-radius: 14px; padding: 12px;
  text-decoration: none; margin-bottom: 12px; border: 1.5px dashed var(--gold);
}

/* ── 결과: 랭킹 배지 ── */
.rank-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-radius: 20px; padding: 18px 16px; text-align: center; color: var(--white);
  margin-bottom: 12px;
}
.rank-badge .label { font-size: 13px; opacity: 0.9; }
.rank-badge .rank { font-size: 36px; font-weight: 800; line-height: 1.25; }
.rank-badge .sub { font-size: 13px; opacity: 0.95; }

/* ── 결과: 총운 ── */
.total-card { text-align: center; }
.total-card .label { font-size: 13px; color: var(--gray); }
.total-card .score { font-size: 52px; font-weight: 800; line-height: 1.2; }
.total-card .grade { font-size: 18px; font-weight: 800; color: var(--navy); }
.total-card .flavor { font-size: 13px; color: var(--gray); margin-top: 6px; }
.score-hi { color: var(--green); }
.score-mid { color: var(--primary); }
.score-low { color: var(--gray); }

/* ── 12띠 랭킹 표 ── */
.rank-toggle {
  display: block; width: 100%; text-align: center; padding: 10px; margin-bottom: 8px;
  background: none; border: none; color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer;
}
.rank-table { padding: 8px; }
.rank-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 10px; font-size: 13px;
}
.rank-row.mine { background: var(--primary-soft); font-weight: 800; color: var(--primary); }
.rank-row .sc { font-weight: 700; }

/* ── 영역별 카드 ── */
.area-card .head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }
.area-card .txt { font-size: 13px; color: var(--gray); margin-top: 6px; }

/* ── 행운 ── */
.lucky-row { display: flex; background: var(--primary-soft); border-radius: 16px; padding: 14px 0; margin-bottom: 12px; }
.lucky-row .item { flex: 1; text-align: center; }
.lucky-row .item + .item { border-left: 1px solid var(--gray-light); }
.lucky-row .k { font-size: 12px; color: var(--gray); }
.lucky-row .v { font-size: 18px; font-weight: 800; color: var(--primary); }

/* ── 오늘의 한 줄 ── */
.advice-card { background: var(--gold-soft); }
.advice-card .k { font-size: 13px; font-weight: 700; color: #b8860b; }
.advice-card .v { font-size: 14px; margin-top: 4px; }

/* ── 공유 CTA (메인) ── */
.share-btn {
  display: block; width: 100%; padding: 16px; border: none; border-radius: 14px;
  background: var(--primary); color: var(--white); font-size: 17px; font-weight: 800;
  cursor: pointer; margin-bottom: 8px; font-family: inherit;
}
.share-btn:active { background: var(--primary-deep); }
.copy-btn {
  display: block; width: 100%; padding: 13px; border: none; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary); font-size: 15px; font-weight: 700;
  cursor: pointer; margin-bottom: 12px; font-family: inherit;
}

/* ── 토스 미니앱 배너 ── */
.toss-banner {
  display: block; text-align: center; background: var(--white); border: 1.5px solid var(--primary-soft);
  border-radius: 14px; padding: 12px; font-size: 13px; color: var(--ink);
  text-decoration: none; margin-bottom: 12px;
}
.toss-banner b { color: var(--primary); }

/* ── 티저·푸터 ── */
.teaser { text-align: center; font-size: 13px; font-weight: 700; color: var(--primary); padding: 4px 0 8px; }
.footer { text-align: center; font-size: 12px; color: var(--gray); margin-top: 16px; }

/* ── 내 띠도 보기 (결과 하단 그리드) ── */
.others-title { text-align: center; font-size: 13px; font-weight: 700; color: var(--gray); margin: 16px 0 8px; }

/* ── 토스트 ── */
#toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: var(--white); font-size: 14px; padding: 10px 18px;
  border-radius: 24px; opacity: 0; transition: all 0.25s; pointer-events: none; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
