:root {
  --accent: #1a6dd4;
  --accent-light: #eef4fc;
  --accent-border: #bad4f5;
  --black: #222;
  --gray-dark: #444;
  --gray: #777;
  --gray-light: #ccc;
  --gray-bg: #fafafa;
  --warm-bg: #f9f8f6;
  --white: #fff;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --green: #2e7d32;
  --green-light: #e8f5e9;
  --green-border: #b8e0b8;
  --orange: #d35400;
  --orange-light: #fff3e0;
  --orange-border: #f5cba7;
  --purple: #5b4fa8;
  --purple-light: #ede7f6;
  --purple-border: #d4cef5;
}

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

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--black);
  background: var(--warm-bg);
  line-height: 1.95;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ── パンくずナビ ── */
.breadcrumb {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: var(--gray-dark);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--accent); }

/* ── メイン記事カード ── */
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 36px 48px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .article-card { padding: 28px 20px 36px; }
}

/* ── 単語ヘッダー ── */
.word-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--black);
}

.word-header h1 {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.pronunciation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pronunciation-text {
  font-size: 18px;
  color: var(--gray-dark);
  font-family: "Lucida Sans Unicode", "DejaVu Sans", sans-serif;
}

.speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--accent);
  font-size: 16px;
}
.speak-btn:hover {
  background: var(--accent);
  color: var(--white);
}

.word-summary {
  font-size: 15.5px;
  color: var(--gray-dark);
  line-height: 2;
  margin-bottom: 20px;
}
.word-summary .pos-tag {
  font-weight: 700;
  color: var(--accent);
}

/* ── 重要度バロメーター ── */
.importance-meter {
  margin-bottom: 16px;
}
.meter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.meter-bar-container {
  width: 100%;
  height: 28px;
  background: #eee;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.meter-bar {
  height: 100%;
  background: linear-gradient(90deg, #64b5f6, #1a6dd4, #0d47a1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  min-width: 50px;
  transition: width 0.6s ease;
}
.meter-value {
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.03em;
}
.meter-detail {
  margin-top: 6px;
  cursor: pointer;
}
.meter-detail-toggle {
  font-size: 11px;
  color: var(--gray);
  user-select: none;
}
.meter-detail-toggle:hover {
  color: var(--accent);
}
.meter-detail-text {
  display: none;
  font-size: 12px;
  color: var(--gray-dark);
  line-height: 1.7;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--gray-bg);
  border-radius: 4px;
}
.meter-detail-text.show {
  display: block;
}

.junior-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-light);
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid var(--green-border);
  margin-top: 4px;
}

/* ── 目次 ── */
.toc {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 44px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray);
  margin-bottom: 12px;
}
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 4px; font-size: 14px; line-height: 1.8; }
.toc a { color: var(--black); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* ── セクション共通 ── */
.section { margin-bottom: 48px; }
.section h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--black);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}
.section p { margin-bottom: 18px; }
.section ul, .section ol { margin-bottom: 18px; padding-left: 24px; }
.section li { margin-bottom: 6px; }

/* ── コアイメージボックス ── */
.core-image-box {
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--green-border);
}
.core-image-box .box-title {
  padding: 10px 20px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  border-bottom: 1px solid var(--green-border);
  line-height: 1.6;
}
.core-image-box .box-content {
  padding: 16px 20px;
  background: var(--white);
}
.core-image-box .one-liner {
  font-size: 20px;
  font-weight: 900;
  color: var(--green);
  margin-bottom: 12px;
  padding: 8px 0;
}
.core-image-box .box-content p {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 8px;
}
.core-image-box .box-content p:last-child { margin-bottom: 0; }

/* ── 注意点ボックス ── */
.pitfall-box {
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--orange-border);
}
.pitfall-box .box-title {
  padding: 10px 20px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
  border-bottom: 1px solid var(--orange-border);
  line-height: 1.6;
}
.pitfall-box .box-content {
  padding: 16px 20px;
  background: var(--white);
}
.pitfall-box .box-content p {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 8px;
}
.pitfall-box .box-content p:last-child { margin-bottom: 0; }

/* ── 意味一覧 ── */
.meaning-list { list-style: none; padding-left: 0 !important; }
.meaning-item {
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--gray-bg);
  border-radius: 6px;
  font-size: 14.5px;
  line-height: 1.8;
  border-left: 3px solid var(--accent);
}
.meaning-item .pos-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--white);
  margin-right: 8px;
  vertical-align: middle;
}
.meaning-item .definition {
  font-weight: 700;
  color: var(--black);
}
.meaning-item .core-connection {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--gray-dark);
  padding-left: 4px;
}

/* ── 例文カード ── */
.example-card {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid #e0deda;
  border-radius: 6px;
}
.example-en {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.7;
  margin-bottom: 6px;
}
.example-ja {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.7;
}
.example-note {
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-light);
  line-height: 1.6;
}

/* ── 類義語テーブル ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
th, td {
  padding: 10px 14px;
  border: 1px solid #ddd;
  text-align: left;
  line-height: 1.6;
}
th {
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
}
tr:nth-child(even) { background: #f7f7f5; }

/* ── 派生語リスト ── */
.derivative-list { list-style: none; padding-left: 0 !important; }
.derivative-item {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 6px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  font-size: 13.5px;
  color: var(--black);
}
.derivative-item .der-pos {
  font-size: 11px;
  color: var(--gray);
  margin-left: 4px;
}

/* ── コロケーション ── */
.collocation-list { list-style: none; padding-left: 0 !important; }
.collocation-item {
  display: inline-block;
  margin: 3px 6px 3px 0;
  padding: 4px 12px;
  background: var(--gray-bg);
  border: 1px solid #e0deda;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--black);
  font-family: "Lucida Sans Unicode", sans-serif;
}

/* ── 確認テスト ── */
.quiz {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 28px;
}
.quiz-item { margin-bottom: 0; }
.quiz-question {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px !important;
  line-height: 1.85;
}
.quiz-answer {
  background: var(--white);
  border: 1px solid #e0deda;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.7;
  transition: all 0.15s;
}
.quiz-answer:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.quiz-answer .answer-text { display: none; }
.answer-prompt {
  color: var(--gray);
  font-size: 13px;
}

/* ── CTAセクション ── */
.cta-section {
  margin: 48px 0 24px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d47a1, #1565c0, #1a6dd4);
  box-shadow: 0 4px 20px rgba(26, 109, 212, 0.25);
}
.cta-inner {
  padding: 36px 32px;
}
.cta-layout {
  display: flex;
  align-items: center;
  gap: 28px;
}
.cta-cover {
  flex-shrink: 0;
}
.cta-cover img {
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.cta-text {
  text-align: left;
}
.cta-logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.cta-logo span {
  color: #90caf9;
}
.cta-tagline {
  font-size: 16px;
  font-weight: 700;
  color: #bbdefb;
  margin-bottom: 12px !important;
}
.cta-body {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  line-height: 1.85 !important;
  margin-bottom: 24px !important;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.cta-btn-primary {
  background: var(--white);
  color: #0d47a1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cta-btn-primary:hover {
  background: #e3f2fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ── レスポンシブ ── */
@media (max-width: 640px) {
  .word-header h1 { font-size: 28px; }
  .cta-inner { padding: 28px 20px; }
  .cta-layout { flex-direction: column; text-align: center; }
  .cta-text { text-align: center; }
  .cta-cover img { width: 120px; height: auto; }
  .cta-buttons { flex-direction: column; justify-content: center; }
  .cta-btn { justify-content: center; }
}
