/* ============================================
   FutureMap 共通スタイル — エメラルドグリーン × ネイビー テーマ
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  --navy:       #0B2B3F;
  --navy-mid:   #0F3D2E;
  --navy-light: #164D3A;
  --gold:       #2ECC8A;
  --gold-light: #5DDBA4;
  --gold-pale:  #E0F5EC;
  --white:      #F0F8F4;
  --text:       #0B2B3F;
  --text-sub:   #2D6B52;
  --text-light: #5A9B80;
  --border:     #C8E8D8;
  --bg:         #F4FAF7;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(11,43,63,0.10);
  --shadow-lg:  0 8px 40px rgba(11,43,63,0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

/* ============ ナビゲーション ============ */
.nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 60px;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  margin-right: 32px;
}
.nav-logo span { color: var(--white); }
.nav-links { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav-links a {
  color: rgba(240,248,244,0.70);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  background: rgba(46,204,138,0.12);
}

/* ============ ヒーロー ============ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #0F3D2E 100%);
  padding: 80px 24px 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(46,204,138,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(46,204,138,0.05) 0%, transparent 70%);
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(46,204,138,0.4);
  border-radius: 20px;
  padding: 4px 16px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 60px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero p {
  font-size: 17px;
  color: rgba(240,248,244,0.80);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.8;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: all .2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46,204,138,0.4); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(240,248,244,0.3);
  transition: all .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(240,248,244,0.6); }

/* ============ ページヘッダー ============ */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #0F3D2E 100%);
  padding: 64px 24px 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(46,204,138,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(46,204,138,0.06) 0%, transparent 70%);
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 52px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-header-inner { max-width: 900px; margin: 0 auto; position: relative; }
.page-header-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(46,204,138,0.4);
  border-radius: 20px;
  padding: 4px 16px;
  margin-bottom: 18px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 5vw, 52px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 14px;
}
.page-header p {
  font-size: 16px;
  color: rgba(240,248,244,0.80);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ============ メインコンテンツ ============ */
.main { max-width: 900px; margin: 0 auto; padding: 48px 24px 80px; }
.main-wide { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }

/* ============ カード ============ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
}

/* ============ ツールカード（トップページ） ============ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 64px;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all .22s;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold-pale); }
.tool-card:hover::after { transform: scaleX(1); }
.tool-icon { font-size: 32px; margin-bottom: 14px; }
.tool-card h3 { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.tool-card p { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin-bottom: 16px; }
.tool-link { font-size: 13px; font-weight: 600; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.tool-link::after { content: '→'; transition: transform .2s; }
.tool-card:hover .tool-link::after { transform: translateX(4px); }

/* ============ フォーム要素 ============ */
.form-row { display: grid; gap: 16px; margin-bottom: 20px; }
.form-row.col2 { grid-template-columns: 1fr 1fr; }
.form-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.col4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 500; color: var(--text-sub); }
.form-group input,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(46,204,138,0.15);
}
.form-group input[type=range] {
  padding: 0; border: none; background: transparent;
  accent-color: var(--gold); box-shadow: none;
}
.form-group input[type=range]:focus { box-shadow: none; }
.form-hint { font-size: 11px; color: var(--text-light); }

.toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-btn {
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: all .18s;
}
.toggle-btn:hover { border-color: var(--gold); color: var(--text); }
.toggle-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ============ 結果表示 ============ */
.result-grid { display: grid; gap: 12px; margin: 24px 0; }
.result-grid.col3 { grid-template-columns: repeat(3, 1fr); }
.result-grid.col2 { grid-template-columns: repeat(2, 1fr); }
.result-card { background: var(--navy); border-radius: var(--radius); padding: 16px 18px; color: var(--white); }
.result-card.gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%); color: var(--navy); }
.result-label { font-size: 11px; font-weight: 500; opacity: 0.75; margin-bottom: 4px; }
.result-value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.result-sub { font-size: 11px; opacity: 0.7; margin-top: 3px; }
.result-card.gold .result-label,
.result-card.gold .result-sub { color: var(--navy); }

.breakdown-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.breakdown-table th {
  text-align: left; padding: 8px 10px;
  border-bottom: 1.5px solid var(--border);
  color: var(--text-sub); font-weight: 600; font-size: 12px;
}
.breakdown-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.breakdown-table tr:last-child td { border-bottom: none; }
.breakdown-table td:last-child { text-align: right; font-weight: 600; }
.breakdown-table .deduct td { color: var(--text-sub); }
.breakdown-table .deduct td:last-child { color: #C0392B; }
.breakdown-table .total td { font-weight: 700; border-top: 2px solid var(--border); }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; line-height: 1.6; margin: 12px 0; }
.alert.ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert.warn { background: #FFFBEB; color: #92400E; border: 1px solid #FCD34D; }
.alert.info { background: #E0F5EC; color: #0B5E3A; border: 1px solid #A8E8C8; }
.alert.danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle; }
.badge.new { background: #E0F5EC; color: #0B5E3A; }
.badge.info { background: #E0F5EC; color: #0B5E3A; }

.chart-wrap { position: relative; width: 100%; height: 240px; margin: 20px 0 8px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

.section-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 8px; font-family: 'Playfair Display', serif; }
.section-sub { font-size: 14px; color: var(--text-sub); margin-bottom: 28px; }

/* ============ ハンバーガーメニュー ============ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(240,248,244,0.85);
  border-radius: 2px;
  transition: all .25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ フッター ============ */
.footer { background: var(--navy); color: rgba(240,248,244,0.6); padding: 40px 24px; text-align: center; font-size: 13px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--gold); margin-bottom: 12px; }
.footer-logo span { color: var(--white); }
.footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: rgba(240,248,244,0.6); text-decoration: none; transition: color .2s; font-size: 13px; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; }

/* ============ レスポンシブ ============ */
@media (max-width: 640px) {
  .form-row.col2, .form-row.col3, .form-row.col4 { grid-template-columns: 1fr; }
  .result-grid.col3 { grid-template-columns: 1fr; }
  .result-grid.col2 { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 10px 20px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 99;
  }
  .nav-links.open a {
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
  }
}
