:root {
  --paper: #FDF6F1;
  --card: #FFFFFF;
  --ink: #4A3B3E;
  --ink-soft: #8A7378;
  --ink-faint: #C6AFB6;
  --accent: #C97B86;
  --accent-deep: #A85266;
  --accent-soft: #FBE6EA;
  --gold: #C9A227;
  --gold-soft: #FDF0D8;
  --shadow-color: rgba(199, 130, 140, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Zen Maru Gothic", sans-serif;
  line-height: 1.9;
  padding-bottom: 96px; /* 固定タブバー分の余白 */
}

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

/* ヘッダー */
.site-header {
  text-align: center;
  padding: 26px 20px 18px;
  background: linear-gradient(160deg, #FBEAE3 0%, #F5E3EC 100%);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.moon-rabbit-mark { width: 30px; height: 30px; }
.site-title {
  font-size: 19px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--accent-deep);
}
.site-tagline {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: #A9788A;
  letter-spacing: 0.03em;
}

/* 本文 */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

/* 今日の一枚カード */
.today-card {
  position: relative;
  background: linear-gradient(165deg, #FFFFFF 0%, #FDF1EE 100%);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 10px 26px var(--shadow-color);
  overflow: hidden;
}
.today-card .mark-watermark {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 52px;
  height: 52px;
  opacity: 0.6;
}
.today-date {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-weight: 700;
}
.today-text p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.95;
}
.today-text p:first-child { font-size: 15px; font-weight: 500; }
.today-text p:last-child { margin-bottom: 0; color: #7A6468; font-size: 13.5px; }

/* 事実ピル */
.fact-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.fact-pill {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 500;
}
.source-note {
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* セクション見出し */
.section-label {
  margin: 6px 0 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* 遷移カード（今日ページの「相性」「日選び」導線） */
.nav-cards { display: flex; flex-direction: column; gap: 14px; }
.nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(199, 130, 140, 0.10);
}
.nav-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-card-icon.aisho { background: linear-gradient(135deg, #F3A6AE, var(--accent)); }
.nav-card-icon.calendar { background: linear-gradient(135deg, #F0C983, var(--gold)); }
.nav-card-title { font-size: 15px; font-weight: 700; }
.nav-card-desc { font-size: 11.5px; color: #A9909A; margin-top: 3px; line-height: 1.5; }
.nav-card-chevron { flex-shrink: 0; }

/* フォーム（相性） */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-deep);
}
.field input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 15px;
  border: 1.5px solid #F0D9DD;
  border-radius: 14px;
  font-size: 15px;
  background: var(--card);
  color: var(--ink);
  font-family: "Zen Maru Gothic", sans-serif;
}
.saved-birthdate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 14px;
  color: var(--accent-deep);
}
.saved-birthdate button {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 12px;
  text-decoration: underline;
  font-family: inherit;
  cursor: pointer;
}
.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, #DB8E92, var(--accent));
  color: #FFFFFF;
  font-size: 15.5px;
  letter-spacing: 0.06em;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(199, 123, 134, 0.35);
  font-family: "Zen Maru Gothic", sans-serif;
  cursor: pointer;
}
.privacy-note {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.7;
}
.form-error {
  color: var(--accent-deep);
  font-size: 12.5px;
  margin-top: -8px;
  margin-bottom: 16px;
  display: none;
}

/* 相性結果 */
.aisho-result { display: none; }
.aisho-result.is-visible { display: block; }
.shuku-pair { display: flex; gap: 10px; margin-bottom: 16px; }
.shuku-box {
  flex: 1;
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(199, 130, 140, 0.10);
}
.shuku-box .label { font-size: 10.5px; color: var(--ink-faint); }
.shuku-box .value { font-size: 19px; font-weight: 900; margin-top: 5px; color: var(--accent-deep); }
.relation-card {
  position: relative;
  background: linear-gradient(165deg, #FFFFFF 0%, #FDF0F1 100%);
  border-radius: 22px;
  padding: 30px 22px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(199, 130, 140, 0.18);
  overflow: hidden;
  margin-bottom: 16px;
}
.relation-card .mark-watermark { position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; opacity: 0.55; }
.relation-card .kicker { font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.08em; font-weight: 500; }
.relation-card .relation-name {
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 10px;
}
.relation-card .divider { width: 44px; height: 3px; background: var(--gold); border-radius: 3px; margin: 14px auto; }
.relation-card p { margin: 0; font-size: 13.5px; line-height: 1.95; text-align: left; color: #5C4A4E; font-weight: 500; }
.provenance-note {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 15px 17px;
  font-size: 11.5px;
  line-height: 1.85;
  color: #8A5A65;
}
.aisho-again {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
  background: none; border: none; cursor: pointer; font-family: inherit;
}

/* 日選びカレンダー */
.purpose-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.purpose-chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.month-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px; margin-bottom: 14px;
  font-size: 15.5px; font-weight: 700; color: var(--accent-deep);
}
.calendar-grid-wrap {
  background: var(--card); border-radius: 20px; padding: 14px 12px;
  box-shadow: 0 8px 20px rgba(199, 130, 140, 0.10);
}
.weekday-row, .day-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
}
.weekday-row { gap: 2px; margin-bottom: 4px; }
.weekday-row span { text-align: center; font-size: 10.5px; color: var(--ink-faint); font-weight: 700; padding: 2px 0 8px; }
.day-cell {
  aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: #FCF3EF;
}
.day-cell .num { font-size: 13px; font-weight: 700; color: #8A7378; }
.day-cell .rokuyou { font-size: 8px; margin-top: 2px; color: #8A7378; }
.day-cell.is-good { background: linear-gradient(140deg, #F0C983, var(--gold)); }
.day-cell.is-good .num, .day-cell.is-good .rokuyou { color: #FFFFFF; }
.day-cell.is-blank { background: transparent; }
.calendar-caveat { margin: 14px 0 0; font-size: 10.5px; line-height: 1.85; color: var(--ink-faint); }

/* フッター・タブバー */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: #A9909A;
}
.site-footer a { color: var(--accent-deep); text-decoration: underline; }

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: calc(100% - 24px);
  max-width: 456px;
  height: 70px;
  background: #FFFFFF;
  border-radius: 22px;
  display: flex;
  box-shadow: 0 10px 28px rgba(199, 130, 140, 0.22);
  padding: 8px;
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 500;
}
.tabbar-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tabbar-item svg { width: 19px; height: 19px; }
