/* ==========================================================
   宿曜ラボ - スタイルシート
   テーマ: 夜空×月。神秘2割・親しみ8割。
   ========================================================== */

:root {
  --night: #2b2350;        /* 濃い夜空の紫紺 */
  --night-deep: #1c1738;
  --moon: #f6c453;         /* 月の金色 */
  --cream: #fdfaf3;        /* 本文背景 */
  --ink: #3a3550;          /* 本文文字 */
  --accent: #7a6fbe;       /* 薄紫 */
  --pink: #e8a0b4;         /* 相性用アクセント */
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(43, 35, 80, 0.10);
}

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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.9;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }
.sp-only { display: none; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--night);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { color: #fff; font-weight: bold; font-size: 1.2rem; text-decoration: none; letter-spacing: 0.05em; }
.nav a { color: #d9d4f0; text-decoration: none; margin-left: 22px; font-size: 0.95rem; }
.nav a:hover { color: var(--moon); }

/* ---------- ヒーロー ---------- */
.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(246,196,83,0.18) 0%, transparent 40%),
    radial-gradient(circle at 15% 80%, rgba(122,111,190,0.25) 0%, transparent 45%),
    linear-gradient(160deg, var(--night) 0%, var(--night-deep) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0 90px;
}
.hero-sub { color: var(--moon); letter-spacing: 0.15em; font-size: 0.95rem; margin-bottom: 14px; }
.hero-title { font-size: 2.1rem; line-height: 1.5; margin-bottom: 18px; letter-spacing: 0.04em; }
.hero-lead { color: #cfc9e8; margin-bottom: 34px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:hover { transform: translateY(-2px); opacity: 0.92; }
.btn-primary { background: var(--moon); color: var(--night-deep); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }
.btn-wide { width: 100%; margin-top: 8px; }

/* ---------- セクション ---------- */
.section { padding: 70px 0; }
.section-alt { background: #f3eee2; }
.section-title {
  text-align: center; font-size: 1.6rem; margin-bottom: 14px; letter-spacing: 0.08em;
}
.section-title::after {
  content: ""; display: block; width: 48px; height: 3px;
  background: var(--moon); margin: 12px auto 0; border-radius: 2px;
}
.section-lead { text-align: center; margin-bottom: 30px; color: #6b6485; }

/* ---------- タブ ---------- */
.tabs { display: flex; justify-content: center; gap: 10px; margin: 30px 0 24px; }
.tab-btn {
  padding: 11px 26px; border-radius: 999px; border: 2px solid var(--accent);
  background: transparent; color: var(--accent); font-size: 1rem; font-weight: bold; cursor: pointer;
}
.tab-btn.active { background: var(--accent); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- フォーム ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
}
.form-card { max-width: 520px; margin: 0 auto; }
.form-note { font-size: 0.95rem; color: #6b6485; margin-bottom: 18px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: bold; font-size: 0.92rem; margin-bottom: 6px; }
.form-row input[type="date"] {
  width: 100%; padding: 12px 14px; font-size: 1.05rem;
  border: 2px solid #ddd6f0; border-radius: 10px; background: #fcfbff; color: var(--ink);
}
.form-row input[type="date"]:focus { outline: none; border-color: var(--accent); }

/* ---------- 結果表示 ---------- */
.result { max-width: 640px; margin: 28px auto 0; }
.result-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 34px 30px; animation: fadein 0.4s ease;
}
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.result-shuku-name {
  text-align: center; font-size: 2rem; font-weight: bold; color: var(--night);
  letter-spacing: 0.1em;
}
.result-yomi { text-align: center; color: #9a92b8; font-size: 0.95rem; margin-bottom: 4px; }
.result-catch {
  text-align: center; color: var(--accent); font-weight: bold;
  margin: 10px 0 22px; font-size: 1.05rem;
}
.result-block { margin-bottom: 18px; }
.result-block h4 {
  font-size: 0.95rem; color: var(--night); border-left: 4px solid var(--moon);
  padding-left: 10px; margin-bottom: 6px;
}
.result-meta { font-size: 0.85rem; color: #9a92b8; text-align: center; margin-top: 16px; }
.result-caution {
  font-size: 0.85rem; background: #fff7e0; border: 1px solid #f0dfa8;
  border-radius: 10px; padding: 10px 14px; margin-top: 14px; color: #7a6430;
}

/* ---------- 今日の宿曜カレンダー ---------- */
.section-today { background: #efeaf8; }
.today-card { max-width: 560px; margin: 0 auto; text-align: center; }
.today-date { color: #9a92b8; font-size: 0.95rem; margin-bottom: 14px; }
.today-label { color: var(--accent); font-weight: bold; font-size: 0.9rem; letter-spacing: 0.2em; }
.today-shuku { font-size: 2.4rem; font-weight: bold; color: var(--night); letter-spacing: 0.12em; line-height: 1.4; }
.today-catch { color: #6b6485; font-size: 0.95rem; margin-bottom: 22px; }
.today-personal { border-top: 1px dashed #ddd6f0; padding-top: 20px; }
.today-personal label { display: block; font-weight: bold; font-size: 0.92rem; margin-bottom: 10px; }
.today-personal select {
  width: 100%; max-width: 320px; padding: 12px 14px; font-size: 1.05rem;
  border: 2px solid #ddd6f0; border-radius: 10px; background: #fcfbff; color: var(--ink);
}
.today-personal select:focus { outline: none; border-color: var(--accent); }
.today-hint { font-size: 0.8rem; color: #9a92b8; margin-top: 8px; }
.today-hint a { color: var(--accent); }
.today-result { margin-top: 18px; text-align: left; animation: fadein 0.4s ease; }
.today-fortune-head { text-align: center; margin-bottom: 10px; }
.today-relation {
  display: inline-block; background: var(--night); color: var(--moon);
  font-size: 1.2rem; font-weight: bold; padding: 6px 22px; border-radius: 999px; letter-spacing: 0.15em;
}
.today-stars { text-align: center; color: var(--moon); font-size: 1.4rem; letter-spacing: 0.15em; margin-bottom: 10px; text-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.today-advice { background: #f7f5fd; border-radius: 12px; padding: 14px 16px; font-size: 0.95rem; }

/* 相性結果 */
.aishou-heads { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 8px; }
.aishou-person { text-align: center; }
.aishou-person .name { font-size: 0.85rem; color: #9a92b8; }
.aishou-person .shuku { font-size: 1.4rem; font-weight: bold; color: var(--night); }
.aishou-x { color: var(--pink); font-size: 1.4rem; }
.aishou-type {
  text-align: center; margin: 14px 0 4px;
}
.aishou-type .axis {
  display: inline-block; background: var(--night); color: var(--moon);
  font-size: 1.5rem; font-weight: bold; padding: 8px 28px; border-radius: 999px; letter-spacing: 0.15em;
}
.aishou-distance { text-align: center; color: var(--accent); font-weight: bold; margin-bottom: 18px; }
.aishou-roles { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.aishou-role {
  flex: 1; min-width: 240px; background: #f7f5fd; border-radius: 12px; padding: 14px 16px; font-size: 0.92rem;
}
.aishou-role b { color: var(--night); }

/* ---------- 27宿グリッド ---------- */
.shuku-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 12px; max-width: 760px; margin: 0 auto;
}
.shuku-cell {
  background: var(--card); border: 2px solid transparent; border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 6px; text-align: center; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.shuku-cell:hover { transform: translateY(-3px); border-color: var(--moon); }
.shuku-cell.active { border-color: var(--accent); background: #f7f5fd; }
.shuku-cell .kanji { font-size: 1.25rem; font-weight: bold; color: var(--night); display: block; }
.shuku-cell .yomi { font-size: 0.72rem; color: #9a92b8; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--night-deep); color: #cfc9e8; text-align: center;
  padding: 46px 0 30px; margin-top: 40px;
}
.footer-logo { font-weight: bold; font-size: 1.1rem; color: #fff; margin-bottom: 10px; }
.footer-sns { margin-bottom: 18px; }
.footer-sns a { color: var(--moon); text-decoration: none; }
.footer-disclaimer { font-size: 0.8rem; color: #9a92b8; max-width: 640px; margin: 0 auto 14px; }
.footer-copy { font-size: 0.8rem; color: #6b6485; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 600px) {
  .sp-only { display: inline; }
  .hero { padding: 56px 0 64px; }
  .hero-title { font-size: 1.5rem; }
  .nav a { margin-left: 14px; font-size: 0.85rem; }
  .section { padding: 50px 0; }
  .card { padding: 22px 18px; }
  .shuku-grid { grid-template-columns: repeat(3, 1fr); }
}
