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

:root {
  --background: #faf8f5;
  --foreground: #1a1a1a;
  --primary: #e85d75;
  --primary-hover: #d14a62;
  --primary-light: rgba(232, 93, 117, 0.08);
  --card-bg: #ffffff;
  --border: #e5e0db;
  --muted: #6b7280;
  --radius: 16px;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.min-h-screen { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; max-width: 720px; margin: 0 auto; width: 100%; padding: 32px 16px; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 18px; font-weight: 700; color: var(--foreground); text-decoration: none; }
.logo span { color: var(--primary); }
nav { display: flex; gap: 20px; }
nav a { font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--primary); text-decoration: none; }

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

/* Hero */
.hero { text-align: center; margin-bottom: 32px; }
.hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 14px; line-height: 1.8; }

/* Form */
.card label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }

textarea {
  width: 100%;
  height: 192px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  font-family: inherit;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 93, 117, 0.15); }
textarea::placeholder { color: rgba(107, 114, 128, 0.5); }
textarea:disabled { opacity: 0.6; cursor: not-allowed; }

.textarea-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}

/* Button */
.submit-btn {
  display: block; width: 100%; padding: 14px;
  border-radius: 12px; font-weight: 700; font-size: 16px;
  color: #fff; background: var(--primary); border: none;
  cursor: pointer; transition: background-color 0.2s;
  margin-top: 24px; font-family: inherit;
}
.submit-btn:hover { background: var(--primary-hover); }
.submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.submit-btn:disabled:hover { background: var(--primary); }

.btn-loading { display: inline-flex; align-items: center; gap: 8px; }
.spinner { width: 20px; height: 20px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error-box {
  margin-top: 16px; padding: 16px; background: #fef2f2;
  border: 1px solid #fecaca; border-radius: 12px;
  color: #dc2626; font-size: 14px; text-align: center;
}

/* Result */
.result-area { margin-top: 32px; }
.result-area .card { margin-bottom: 24px; }
.result-area .card h3 { font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.result-area .card h3 .emoji { font-size: 18px; }

.score-card { text-align: center; }
.score-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.score-label { color: var(--primary); font-weight: 700; font-size: 20px; margin-bottom: 16px; }

.gauge { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gauge-wrap { position: relative; width: 128px; height: 128px; }
.gauge-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-score { font-size: 30px; font-weight: 700; }
.gauge-max { font-size: 12px; color: var(--muted); }

.point-list { list-style: none; }
.point-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.dot { margin-top: 3px; flex-shrink: 0; }
.dot-green { color: #22c55e; }
.dot-amber { color: #f59e0b; }

.message-box { background: var(--primary-light); border-radius: 12px; padding: 16px; font-size: 14px; line-height: 1.7; }
.advice-text { font-size: 14px; line-height: 1.7; color: var(--muted); }

/* Page title */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-header p { color: var(--muted); font-size: 14px; }

/* Article list */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-card {
  display: block;
  background: var(--card-bg); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
  text-decoration: none; color: var(--foreground);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.article-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(232, 93, 117, 0.1); text-decoration: none; }
.article-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.article-card .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 12px; }
.article-card .excerpt { font-size: 14px; color: var(--muted); line-height: 1.6; }
.article-tag {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 99px; font-weight: 500;
}

/* Article detail */
.article-content { background: var(--card-bg); border-radius: var(--radius); padding: 32px; border: 1px solid var(--border); }
.article-content h1 { font-size: 22px; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.article-content .meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; display: flex; gap: 12px; }
.article-content h2 { font-size: 18px; font-weight: 700; margin-top: 32px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.article-content h3 { font-size: 16px; font-weight: 700; margin-top: 24px; margin-bottom: 8px; }
.article-content p { margin-bottom: 16px; font-size: 15px; line-height: 1.9; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content li { margin-bottom: 6px; font-size: 15px; line-height: 1.8; }
.article-content blockquote {
  border-left: 3px solid var(--primary); padding: 12px 16px;
  background: var(--primary-light); border-radius: 0 8px 8px 0;
  margin-bottom: 16px; font-size: 14px; color: var(--muted);
}
.article-content strong { color: var(--primary); }

/* Recommend */
.recommend-card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
  margin-bottom: 20px;
}
.recommend-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.recommend-card .desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.recommend-card .features { list-style: none; margin-bottom: 16px; }
.recommend-card .features li { font-size: 14px; padding: 4px 0; display: flex; align-items: center; gap: 6px; }
.recommend-card .features li::before { content: "✓"; color: var(--primary); font-weight: 700; }
.recommend-badge {
  display: inline-block; font-size: 12px; padding: 3px 10px;
  background: var(--primary); color: #fff;
  border-radius: 99px; font-weight: 700; margin-bottom: 12px;
}
.affiliate-btn {
  display: inline-block; padding: 10px 24px;
  background: var(--primary); color: #fff; font-weight: 700;
  border-radius: 10px; font-size: 14px; text-decoration: none;
  transition: background-color 0.2s;
}
.affiliate-btn:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }

/* CTA box */
.cta-box {
  background: var(--primary-light); border-radius: var(--radius);
  padding: 24px; text-align: center; margin-top: 32px;
}
.cta-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.cta-box p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 32px 16px; text-align: center; }
.footer-inner { max-width: 720px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-links a { font-size: 13px; color: var(--muted); }

/* Top page */
.top-hero { text-align: center; margin-bottom: 32px; padding-top: 8px; }
.top-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.top-hero p { color: var(--muted); font-size: 14px; line-height: 1.8; }

.feature-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card-bg); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
  text-decoration: none; color: var(--foreground);
  transition: box-shadow 0.2s, border-color 0.2s;
  margin-bottom: 16px;
}
.feature-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(232, 93, 117, 0.1); text-decoration: none; }
.feature-card--primary { background: linear-gradient(135deg, #fff5f7, #fff); border-color: rgba(232, 93, 117, 0.2); }
.feature-card--primary:hover { border-color: var(--primary); }
.feature-icon { font-size: 32px; flex-shrink: 0; margin-top: 2px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.feature-link { font-size: 13px; color: var(--primary); font-weight: 600; }

.top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; }

.top-section { margin-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h2 { font-size: 18px; font-weight: 700; }
.section-header a { font-size: 13px; color: var(--primary); font-weight: 500; }

.top-about h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.top-about p { font-size: 14px; line-height: 1.8; color: var(--muted); }

@media (max-width: 480px) {
  .top-grid { grid-template-columns: 1fr; }
  .top-hero h2 { font-size: 20px; }
}

/* Utilities */
.hidden { display: none; }
.mb-6 { margin-bottom: 24px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s ease-out; }

/* Responsive */
@media (max-width: 480px) {
  .hero h2 { font-size: 20px; }
  .article-content { padding: 20px; }
  .article-content h1 { font-size: 19px; }
  nav { gap: 14px; }
  nav a { font-size: 13px; }
}
