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

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --primary: #3b5bdb;
  --primary-dark: #2f4ac7;
  --accent: #0ca678;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Header ===== */
header {
  background: var(--primary);
  color: #fff;
  padding: 56px 24px 48px;
  text-align: center;
}
header .badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
header p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Main ===== */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* ===== Tags ===== */
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-cf7     { background: #dbeafe; color: #1e40af; }
.tag-calendar{ background: #d1fae5; color: #065f46; }
.tag-version {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background 0.18s, transform 0.1s;
  white-space: nowrap;
}
.btn-download:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-download svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 32px;
  transition: opacity 0.15s;
}
.btn-back:hover { opacity: 0.7; }
.btn-back svg { width: 14px; height: 14px; }

/* ===== Cards (top page) ===== */
.cards { display: grid; gap: 24px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  align-items: start;
}
.card-body { min-width: 0; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.card .desc { color: var(--muted); font-size: 0.93rem; margin-bottom: 16px; }

.features { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.features li {
  font-size: 0.88rem;
  color: #374151;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.features li::before { content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.card-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.requires { font-size: 0.75rem; color: var(--muted); text-align: right; }

.card-link { text-decoration: none; color: inherit; }
.card-link:hover .card { box-shadow: 0 4px 24px rgba(59,91,219,0.13); border-color: #bfcbff; }

/* ===== Detail page ===== */
.detail-hero {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 36px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.detail-hero-body { min-width: 0; flex: 1; }
.detail-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-hero h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.detail-hero .desc { color: var(--muted); font-size: 0.95rem; max-width: 560px; }
.detail-hero-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }

.section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 32px;
  margin-bottom: 24px;
}
.section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
}
.feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.feature-item strong { display: block; font-size: 0.9rem; margin-bottom: 3px; }
.feature-item span { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

.step-list { display: flex; flex-direction: column; gap: 14px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-num {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-body { padding-top: 3px; }
.step-body strong { display: block; font-size: 0.93rem; margin-bottom: 3px; }
.step-body span { font-size: 0.85rem; color: var(--muted); }

.req-list { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.req-list li {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.req-list li .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-required { background: #ef4444; }
.dot-optional { background: #f59e0b; }
.dot-ok       { background: var(--accent); }

.changelog { display: flex; flex-direction: column; gap: 14px; }
.cl-item {}
.cl-ver {
  font-size: 0.78rem;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--muted);
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 8px;
}
.cl-date { font-size: 0.78rem; color: var(--muted); }
.cl-item ul { margin-top: 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.cl-item li { font-size: 0.87rem; color: #374151; }

code {
  font-family: ui-monospace, Menlo, "Courier New", monospace;
  background: #f3f4f6;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.87em;
  color: #374151;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .card { grid-template-columns: 1fr; padding: 24px; }
  .card-action { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .requires { text-align: left; }
  .detail-hero { flex-direction: column; padding: 24px; }
  .detail-hero-action { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .section { padding: 24px; }
}
