/* ============================================
   経理×副業のお金ノート — 共通スタイル
   ============================================ */
:root {
  --green: #0e5e4a;
  --green-dark: #0a4536;
  --green-light: #e8f3f0;
  --gold: #c9a227;
  --ink: #2b2b2b;
  --gray: #6b7280;
  --bg: #f7f8f7;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
}

a { color: var(--green); text-decoration: none; }
a:hover { opacity: 0.85; }
img { max-width: 100%; height: auto; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--green);
  color: #fff;
  padding: 0;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.site-logo {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-logo .logo-x { color: var(--gold); margin: 0 2px; }
.site-tagline {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  display: block;
  font-weight: 400;
}
.global-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.global-nav a {
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
}
.global-nav a:hover { background: rgba(255, 255, 255, 0.15); opacity: 1; }

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 70%);
  color: #fff;
  text-align: center;
  padding: 56px 20px;
}
.hero h1 { font-size: 1.7rem; margin-bottom: 12px; line-height: 1.5; }
.hero h1 .accent { color: var(--gold); }
.hero p { font-size: 0.95rem; color: rgba(255, 255, 255, 0.9); max-width: 640px; margin: 0 auto; }

/* ---------- メインレイアウト ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px;
}
.section-title {
  font-size: 1.25rem;
  border-left: 5px solid var(--gold);
  padding-left: 12px;
  margin-bottom: 24px;
  color: var(--green-dark);
}

/* ---------- カテゴリーカード ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.category-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: block;
  color: var(--ink);
  border-top: 4px solid var(--green);
  transition: transform 0.15s ease;
}
.category-card:hover { transform: translateY(-3px); opacity: 1; }
.category-card .cat-emoji { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.category-card h3 { font-size: 1.05rem; color: var(--green-dark); margin-bottom: 6px; }
.category-card p { font-size: 0.83rem; color: var(--gray); }

/* ---------- 記事リスト ---------- */
.article-list { display: grid; gap: 16px; margin-bottom: 56px; }
.article-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: block;
  color: var(--ink);
}
.article-item .article-meta { font-size: 0.78rem; color: var(--gray); margin-bottom: 4px; }
.article-item .article-meta .cat-label {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 8px;
  font-weight: 600;
}
.article-item h3 { font-size: 1.05rem; color: var(--green-dark); }
.article-item p { font-size: 0.85rem; color: var(--gray); margin-top: 6px; }
.coming-soon {
  background: var(--card);
  border: 2px dashed #d1d5db;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}

/* ---------- 記事本文ページ ---------- */
.post {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}
.post h1 { font-size: 1.5rem; color: var(--green-dark); margin-bottom: 8px; line-height: 1.5; }
.post .post-meta { font-size: 0.8rem; color: var(--gray); margin-bottom: 28px; }
.post h2 {
  font-size: 1.2rem;
  background: var(--green-light);
  color: var(--green-dark);
  padding: 10px 16px;
  border-radius: 8px;
  margin: 36px 0 16px;
}
.post h3 {
  font-size: 1.05rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 6px;
  margin: 28px 0 14px;
  color: var(--green-dark);
}
.post p { margin-bottom: 16px; }
.post p a, .post li a, .post td a { font-weight: 700; text-decoration: underline; }
.post ul, .post ol { margin: 0 0 16px 1.5em; }
.post table { border-collapse: collapse; width: 100%; margin-bottom: 16px; font-size: 0.9rem; }
.post th, .post td { border: 1px solid #d1d5db; padding: 8px 12px; }
.post th { background: var(--green-light); }

/* ---------- お問い合わせフォーム ---------- */
.contact-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.contact-form label { font-weight: 700; font-size: 0.9rem; margin-top: 10px; }
.contact-form .required {
  background: #c0392b; color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px;
  font-size: 1rem; font-family: inherit; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--green); border-color: var(--green);
}
.contact-form .submit-btn {
  margin-top: 16px; background: var(--green); color: #fff; border: none;
  padding: 12px 32px; border-radius: 8px; font-size: 1rem; font-weight: 700;
  cursor: pointer; align-self: center; min-width: 200px;
}
.contact-form .submit-btn:hover { background: var(--green-dark); }

/* ---------- プロフィール ---------- */
.profile-box {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--green-light); border-radius: var(--radius); padding: 20px; margin: 16px 0;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; flex-shrink: 0;
  border: 2px solid var(--green); overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-box .profile-name { font-weight: 700; color: var(--green-dark); margin-bottom: 6px; }
.profile-box p { font-size: 0.9rem; margin-bottom: 8px; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 32px 20px;
  text-align: center;
  font-size: 0.8rem;
}
.footer-nav { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-nav a { color: rgba(255, 255, 255, 0.85); }
.copyright { color: rgba(255, 255, 255, 0.6); }

/* ---------- トップに戻るボタン ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green-dark); opacity: 1; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.3rem; }
  .post { padding: 24px 18px; }
  .header-inner { justify-content: center; text-align: center; }
  .back-to-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }
}
