body {
  font-family: sans-serif;
  background: #f3f4f6;
  margin: 0;
  padding: 20px;
  color: #111827;
}

.container {
  max-width: 760px;
  margin: auto;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 18px;
}

.hero-card {
  padding: 0;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  display: block;
}

h1 {
  font-size: 26px;
  margin-top: 0;
}

h2 {
  font-size: 20px;
  margin-top: 0;
}

p {
  line-height: 1.8;
}

.intro-card {
  font-size: 15px;
  line-height: 1.8;
}

.intro-card ul {
  padding-left: 22px;
}

button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 12px;
}

button:hover {
  opacity: 0.9;
}

.main-button {
  background: #1d4ed8;
  font-size: 17px;
  margin-bottom: 18px;
}

.blog-button {
  background: #16a34a;
  margin-bottom: 16px;
}

.choice-button {
  background: #2563eb;
  text-align: left;
  line-height: 1.5;
}

.secondary-button {
  background: #6b7280;
}

.danger-button {
  background: #dc2626;
}

.genre-section {
  margin-top: 12px;
}

.genre-title {
  font-size: 15px;
  font-weight: bold;
  margin: 8px 0 6px;
  color: #374151;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.level-grid button {
  padding: 7px 4px !important;
  font-size: 12px;
  line-height: 1.15;
  min-height: 34px;
  border-radius: 10px;
  margin-bottom: 0;
}

.count {
  font-size: 12px;
  opacity: 0.9;
}

.question {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 18px;
  white-space: pre-wrap;
}

.progress {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 12px;
}

.answer-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  font-size: 18px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  margin-bottom: 14px;
}

.result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  line-height: 1.8;
  font-size: 15px;
}

.correct {
  background: #dcfce7;
  color: #166534;
}

.wrong {
  background: #fee2e2;
  color: #991b1b;
}

.explanation {
  margin-top: 12px;
  color: #374151;
}

.final-score {
  font-size: 22px;
  font-weight: bold;
  margin: 16px 0;
}

.rank {
  font-size: 20px;
  font-weight: bold;
  color: #2563eb;
  margin-bottom: 12px;
}

.error-box {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 14px;
  padding: 16px;
  line-height: 1.7;
}

/* ブログ */

.meta {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 12px;
}

.body {
  font-size: 15px;
  line-height: 1.8;
}

.body p {
  margin: 0 0 14px;
  line-height: 1.8;
}

a {
  color: inherit;
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 18px;
}

.blog-card-body {
  padding: 18px;
}

.blog-card h2 {
  font-size: 20px;
  margin: 8px 0 10px;
}

.thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #e5e7eb;
}

.no-image {
  height: 180px;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #1f2937;
  font-size: 24px;
}

.excerpt {
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.read-more {
  color: #2563eb;
  font-weight: bold;
  font-size: 14px;
}

.article-card {
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 18px;
}

.article-card h1 {
  font-size: 26px;
  margin: 10px 0 12px;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: #2563eb;
  font-weight: bold;
  text-decoration: none;
}

.article-heading {
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
  border-left: 5px solid #2563eb;
  padding-left: 10px;
}

.article-image {
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  margin: 16px 0;
  display: block;
}

/* スマホ対応 */

@media (max-width: 520px) {
  body {
    padding: 8px;
  }

  .card,
  .article-card {
    padding: 14px;
    border-radius: 16px;
  }

  .hero-card {
    padding: 0;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  .intro-card {
    font-size: 13px;
    line-height: 1.7;
  }

  .intro-card ul {
    padding-left: 18px;
  }

  .level-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .level-grid button {
    font-size: 11px;
    padding: 7px 4px !important;
    min-height: 34px;
  }

  .question {
    font-size: 16px;
  }

  .blog-card-body {
    padding: 16px;
  }

  .thumbnail,
  .no-image {
    height: 150px;
  }

  .article-card h1 {
    font-size: 22px;
  }
}