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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #f5f6f7 100%);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ===== ヘッダー ===== */
.site-header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-logo { display: flex; align-items: center; }

.logo-image {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-link:hover { color: #1d4ed8; }

.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; display: flex; align-items: center; gap: 0.3rem; user-select: none; }
.nav-dropdown-trigger::after { content: ''; display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0.5; vertical-align: middle; margin-top: 1px; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 160px; z-index: 200; padding-top: 12px; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu-inner { background: white; border: 1px solid #E5E7EB; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); padding: 0.25rem 0; }
.nav-dropdown-item { display: block; padding: 0.5rem 1rem; color: #374151; font-size: 0.875rem; text-decoration: none; white-space: nowrap; transition: background 0.1s ease, color 0.1s ease; }
.nav-dropdown-item:hover { background: #F3F4F6; color: #1d4ed8; }

.header-actions { display: flex; gap: 1rem; align-items: center; }
.auth-logged-in,
.auth-logged-out { align-items: center; gap: 1rem; }

.btn-login,
.btn-signup {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-login {
  background: transparent;
  color: #333;
}
.btn-login:hover { background: #f5f5f5; }

.btn-signup {
  background-color: #2952c8;
  color: white;
  border: 1px solid #2952c8;
}
.btn-signup:hover { background-color: #1e3fa0; border-color: #1e3fa0; }

/* ===== メインコンテンツ ===== */
main { flex: 1; }

/* ===== 帳票カテゴリ ヒーロー ===== */
.doc-category-hero {
  background: linear-gradient(135deg, #2952c8 0%, #1e3fa0 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.doc-category-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.doc-category-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 640px;
  line-height: 1.6;
}

/* ===== 本文エリア ===== */
.doc-category-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.doc-category-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.doc-category-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
}

.doc-category-use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.doc-category-use-case {
  display: block;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.doc-category-use-case:hover {
  background: #eff6ff;
  border-color: #2952c8;
  box-shadow: 0 2px 8px rgba(41, 82, 200, 0.12);
}

.doc-category-use-case-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.doc-category-use-case-body {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
}

.doc-category-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.doc-category-tool-card {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  font-size: 0.9rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.doc-category-tool-card:hover { background: #f3f4f6; border-color: #9ca3af; }

/* ===== フッター ===== */
.site-footer {
  background: #2c3e50;
  color: white;
  margin-top: 4rem;
  padding: 3rem 1rem 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
.footer-links li a:hover { color: white; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-copyright { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; margin: 0; }

/* ===== プランバッジ ===== */
.plan-badge-header {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.75rem;
  color: #fff;
  letter-spacing: 0.5px;
}
.plan-badge-header-free  { background: #95a5a6; }
.plan-badge-header-pro   { background: #2952c8; }
.plan-badge-header-team  { background: #1e3fa0; }

/* ===== ヘッダー認証表示制御 ===== */
.auth-logged-in  { display: none; }
.auth-logged-out { display: none; }

/* ===== 近日公開（クリック不可・グレー表示） ===== */
.doc-category-use-case--coming-soon { cursor: default; opacity: 0.6; }
.doc-category-use-case--coming-soon:hover {
  background: #f9fafb;
  border-color: #e5e7eb;
  box-shadow: none;
}
.doc-category-tool-card--coming-soon { cursor: default; opacity: 0.6; }
.doc-category-tool-card--coming-soon:hover { background: #fff; border-color: #d1d5db; }
.doc-category-coming-soon-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 1px 8px;
  border-radius: 10px;
  background: #95a5a6;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}
