@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* ─────────────────────────────────────────
   Luna Compass — 大正レトロパステル
───────────────────────────────────────── */

:root {
  /* くすみローズ */
  --rose:           #c49ba2;
  --rose-dark:      #a67a82;
  --rose-light:     #f0e4e6;
  --rose-pale:      #fdf6f7;

  /* ラベンダー */
  --lavender:       #9e94b8;
  --lavender-light: #eae6f4;

  /* クリーム */
  --cream:          #f5efe4;
  --cream-dark:     #ece3d4;

  /* ベース */
  --bg:             #faf7f2;
  --bg-card:        #fefcf8;

  /* テキスト */
  --text:           #3d3530;
  --text-light:     #8a7b72;
  --text-pale:      #b8a89e;

  /* ボーダー */
  --border:         #e4dcd4;
  --border-mid:     #d0c4bc;

  /* シャドウ */
  --shadow:         0 2px 14px rgba(61, 53, 48, .07);

  /* 角丸 */
  --radius:         14px;
  --radius-sm:      8px;
}

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

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

/* ── Header ── */
header {
  background: #e6ccce;
  padding: 2.4rem 1rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-mid);
}

header::before {
  content: '◇ ─ ◆ ─ ◇';
  display: block;
  color: #b89094;
  font-size: .65rem;
  letter-spacing: .4rem;
  margin-bottom: .9rem;
}

header::after {
  content: '◇ ─ ◆ ─ ◇';
  display: block;
  color: #b89094;
  font-size: .65rem;
  letter-spacing: .4rem;
  margin-top: .9rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #5e4246;
  letter-spacing: .14em;
}

.tagline {
  color: #9a7a7e;
  font-size: .8rem;
  font-weight: 300;
  letter-spacing: .06em;
  margin-top: .3rem;
}

/* ── Main ── */
main {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.8rem 1rem 4rem;
}

/* ── Tabs ── */
.tab-nav {
  display: flex;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: .75rem .5rem;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: .87rem;
  font-weight: 400;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s, border-color .18s;
  letter-spacing: .04em;
}

.tab-btn.active {
  color: var(--rose-dark);
  border-bottom-color: var(--rose);
  font-weight: 700;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.input-card { text-align: center; }

.input-card h2 {
  font-size: .88rem;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 1.2rem;
  letter-spacing: .04em;
}

/* ── Date input ── */
.date-parts {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.date-part {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.date-num {
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: .7rem .4rem;
  font-size: 1rem;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  outline: none;
  text-align: center;
  width: 4.8rem;
  -moz-appearance: textfield;
  transition: border-color .2s;
}

.date-num::-webkit-outer-spin-button,
.date-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.date-num:focus { border-color: var(--rose); }

.date-num-sm { width: 3rem; }

.date-unit {
  font-size: .82rem;
  color: var(--text-light);
  font-weight: 300;
}

/* ── Button ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: .9rem;
  background: var(--rose);
  color: #fefcf8;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  letter-spacing: .12em;
  transition: background .15s, transform .1s;
}

.btn-primary:hover  { background: var(--rose-dark); }
.btn-primary:active { transform: translateY(1px); }

/* ── Result animations ── */
.result-area .card { animation: fadeUp .32s ease both; }
.result-area .card:nth-child(1) { animation-delay: .00s; }
.result-area .card:nth-child(2) { animation-delay: .07s; }
.result-area .card:nth-child(3) { animation-delay: .14s; }
.result-area .card:nth-child(4) { animation-delay: .21s; }
.result-area .card:nth-child(5) { animation-delay: .28s; }
.result-area .card:nth-child(6) { animation-delay: .35s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ── Star card ── */
.star-card {
  text-align: center;
  background: var(--cream);
  border-color: var(--cream-dark);
}

.star-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: var(--bg-card);
}

.star-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #5e4246;
  margin-bottom: .3rem;
  letter-spacing: .1em;
}

.tsuki-name {
  font-size: .8rem;
  color: var(--text-light);
  margin-bottom: .9rem;
  font-weight: 300;
  letter-spacing: .04em;
}

.tags {
  display: flex;
  gap: .45rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  background: transparent;
  color: var(--rose-dark);
  border: 1px solid var(--border-mid);
  padding: .2rem .8rem;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: .04em;
}

/* ── Section title ── */
.section-title {
  font-size: .87rem;
  font-weight: 700;
  color: var(--rose-dark);
  margin-bottom: .9rem;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Body text ── */
.body-text {
  font-size: .87rem;
  line-height: 1.95;
  color: var(--text);
  white-space: pre-line;
  font-weight: 300;
}

/* ── Character blocks ── */
.char-block { margin-bottom: .5rem; }

.char-label {
  font-size: .73rem;
  font-weight: 700;
  color: var(--lavender);
  margin-bottom: .45rem;
  letter-spacing: .08em;
  display: block;
}

.char-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

/* ── Life path ── */
.life-path-card { text-align: center; }

.lifepath-num {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--rose);
  line-height: 1;
  margin-bottom: .35rem;
}

.lifepath-title {
  font-size: .88rem;
  font-weight: 500;
  color: var(--lavender);
  margin-bottom: .8rem;
  letter-spacing: .04em;
}

/* ── Category grid ── */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.cat-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  border: 1px solid var(--border);
}

.cat-icon {
  display: inline;
  font-size: .95rem;
  margin-right: .3rem;
}

.cat-label {
  display: inline;
  font-size: .8rem;
  font-weight: 700;
  color: var(--rose-dark);
  letter-spacing: .04em;
}

.cat-text {
  display: block;
  margin-top: .5rem;
  font-size: .82rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-line;
  font-weight: 300;
}

/* ── Yearly card ── */
.yearly-card {
  background: var(--rose-pale);
  border-color: var(--rose-light);
}

/* ── Couple inputs ── */
.couple-inputs {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}

.person-input label {
  display: block;
  font-weight: 700;
  color: var(--text-light);
  font-size: .76rem;
  margin-bottom: .35rem;
  text-align: left;
  letter-spacing: .06em;
}

.heart-divider { text-align: center; font-size: 1.1rem; }

/* ── Compat score ── */
.compat-score-card { text-align: center; }

.score-stars {
  font-size: 1.7rem;
  letter-spacing: 6px;
  margin-bottom: .65rem;
}

.score-breakdown {
  display: flex;
  gap: .55rem;
  justify-content: center;
  margin-bottom: .8rem;
  flex-wrap: wrap;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .8rem;
}

.breakdown-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: .02em;
}

.breakdown-stars { font-size: .8rem; letter-spacing: 2px; }

.star-pair {
  font-size: .85rem;
  color: var(--text-light);
  margin-bottom: .8rem;
  font-weight: 300;
  letter-spacing: .04em;
}

/* ── LP compat card ── */
.lp-compat-card {
  background: var(--lavender-light);
  border-color: #d4cce8;
}

.lp-nums {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  margin-bottom: .7rem;
}

.lp-num-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.lp-num-cross {
  font-size: .9rem;
  color: var(--text-light);
  font-weight: 400;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--lavender);
  color: #fefcf8;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.lp-title {
  font-size: .85rem;
  font-weight: 400;
  color: var(--text);
}

.lp-score-stars {
  font-size: 1.2rem;
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: .75rem;
}

/* ── Advice card ── */
.advice-card {
  background: var(--cream);
  border-color: var(--cream-dark);
}

/* ── Legal pages ── */
.legal-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.8rem 1rem 4rem;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 1.4rem;
  color: var(--rose-dark);
  font-size: .85rem;
  text-decoration: none;
  font-weight: 500;
}

.legal-page .back-link:hover { text-decoration: underline; }

.legal-page > .card > h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #5e4246;
  margin-bottom: .4rem;
  letter-spacing: .06em;
}

.legal-page .date {
  font-size: .77rem;
  color: var(--text-pale);
  margin-bottom: 1.4rem;
}

.legal-page h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--rose-dark);
  margin: 1.5rem 0 .5rem;
  padding-left: .65rem;
  border-left: 3px solid var(--rose);
  letter-spacing: .04em;
}

.legal-page p {
  font-size: .87rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: .7rem;
  font-weight: 300;
}

.legal-page ul {
  padding-left: 1.4rem;
  margin-bottom: .7rem;
}

.legal-page li {
  font-size: .87rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: .2rem;
  font-weight: 300;
}

.legal-page a { color: var(--rose-dark); }

.legal-page strong { font-weight: 700; }

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: .8rem 0 1.2rem;
  font-size: .85rem;
}

.legal-page th,
.legal-page td {
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  text-align: left;
  font-weight: 300;
  line-height: 1.7;
  vertical-align: top;
}

.legal-page th {
  background: var(--cream);
  font-weight: 500;
  color: var(--text-light);
  width: 32%;
  white-space: nowrap;
}

.form-link-wrap {
  text-align: center;
  margin-top: 1.6rem;
}

.form-btn {
  display: inline-block;
  width: auto;
  padding: .9rem 2rem;
  text-decoration: none;
}

.form-note {
  margin-top: .7rem;
  font-size: .75rem;
  color: var(--text-pale);
}

/* ── Footer nav ── */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .8rem;
  justify-content: center;
  margin-bottom: .6rem;
}

.footer-nav a {
  color: var(--text-pale);
  font-size: .72rem;
  text-decoration: none;
}

.footer-nav a:hover { color: var(--rose-dark); }

.footer-copy {
  font-size: .74rem;
  color: var(--text-pale);
  margin-bottom: .4rem;
}

.logo a { color: inherit; text-decoration: none; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-pale);
  font-size: .74rem;
  line-height: 2.2;
  border-top: 1px solid var(--border);
}

footer a { color: var(--rose-dark); text-decoration: none; }
.disclaimer { color: var(--text-pale); font-size: .7rem; }
