/**
 * CFOのAI教室 - メインスタイルシート
 * カラーテーマ: 紫〜青グラデーション
 */

:root {
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --purple-800: #6b21a8;
  --purple-900: #581c87;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --yellow-50: #fefce8;
  --yellow-100: #fef9c3;
  --yellow-400: #facc15;
  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 8px rgba(0,0,0,0.05);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.09);
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #f8f7ff;
  color: var(--gray-700);
  line-height: 1.85;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(124,58,237,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(59,130,246,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ===== ヘッダー ===== */
.header {
  background: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-700) 50%, var(--blue-600) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(88,28,135,0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--purple-500), var(--blue-500));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}

.logo-text { display: flex; flex-direction: column; }

.logo-cfo {
  font-size: 10px;
  font-weight: 700;
  color: var(--purple-300);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
}

.logo-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1.3;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-sister-link {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}

.header-sister-link:visited {
  color: rgba(255,255,255,0.8);
}
.header-sister-link:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

.header-date {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== ナビゲーション ===== */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 72px;
  z-index: 99;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-item {
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-item:hover {
  color: var(--purple-600);
  background: var(--purple-50);
}

.nav-item.active {
  color: var(--purple-700);
  border-bottom-color: var(--purple-600);
}

/* ===== メインレイアウト ===== */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

/* ===== ヒーロー ===== */
.hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--purple-900), var(--purple-800), var(--blue-700));
  border-radius: var(--radius);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -40%; right: -5%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(168,85,247,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--purple-500), var(--blue-500));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}

.hero-content { position: relative; z-index: 1; }

.hero-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-300);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.6;
}

.hero-title em {
  font-style: normal;
  color: var(--cyan-500);
}

.hero-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ===== カード共通 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid var(--gray-100);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gray-100);
}

.card-header-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.card-header-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--gray-800);
}

.card-header-sub {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

.card-header-more {
  margin-left: auto;
  font-size: 12px;
  color: var(--purple-600);
  font-weight: 700;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--purple-50);
  transition: background 0.2s;
}

.card-header-more:hover { background: var(--purple-100); }

.card-body { padding: 14px 20px 20px; }

/* ===== ニュース ===== */
.news-icon { background: var(--purple-100); color: var(--purple-600); }

.news-list { display: flex; flex-direction: column; gap: 12px; }

.news-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.news-item:hover {
  background: var(--purple-50);
  border-color: var(--purple-200);
  transform: translateX(4px);
}

.news-thumb {
  width: 72px; height: 72px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.news-thumb.purple { background: linear-gradient(135deg, var(--purple-50), var(--purple-100)); }
.news-thumb.blue { background: linear-gradient(135deg, var(--blue-50), var(--blue-100)); }
.news-thumb.green { background: linear-gradient(135deg, var(--green-50), var(--green-100)); }
.news-thumb.orange { background: linear-gradient(135deg, var(--orange-50), var(--orange-100)); }

.news-info { flex: 1; min-width: 0; }

.news-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.tag-purple { background: var(--purple-100); color: var(--purple-700); }
.tag-blue { background: var(--blue-100); color: var(--blue-700); }
.tag-green { background: var(--green-100); color: var(--green-700); }
.tag-orange { background: var(--orange-100); color: var(--orange-500); }
.tag-global { background: var(--blue-100); color: var(--blue-700); }

.news-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.6;
  margin-bottom: 3px;
}

.news-summary {
  font-size: 12.5px;
  color: var(--gray-500);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--gray-400);
}

/* ===== AI企業ランキング ===== */
.ranking-icon { background: var(--yellow-100); color: #b45309; }

.ranking-list { display: flex; flex-direction: column; gap: 4px; }

.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.ranking-item:hover { background: var(--gray-50); }

.ranking-num {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--white);
  flex-shrink: 0;
}

.ranking-num.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ranking-num.silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.ranking-num.bronze { background: linear-gradient(135deg, #f97316, #ea580c); }
.ranking-num.normal { background: var(--gray-300); }

.ranking-company-icon { font-size: 22px; flex-shrink: 0; }

.ranking-info { flex: 1; min-width: 0; }

.ranking-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}

.ranking-desc { font-size: 11px; color: var(--gray-400); }

.ranking-product {
  font-size: 10px;
  color: var(--purple-500);
  font-weight: 600;
}

.ranking-trend {
  font-size: 16px;
  flex-shrink: 0;
}

.ranking-market-cap {
  font-size: 10px;
  color: var(--gray-400);
}

/* ===== やってみよう！ ===== */
.try-icon { background: var(--cyan-100); color: var(--cyan-600); }

.try-list { display: flex; flex-direction: column; gap: 10px; }

.try-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.try-item:hover {
  background: var(--cyan-50);
  border-color: var(--cyan-100);
  transform: translateX(4px);
}

.try-item-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan-50), var(--cyan-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.try-item-info { flex: 1; min-width: 0; }

.try-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.try-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.try-difficulty {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--cyan-100);
  color: var(--cyan-600);
}

.try-tool {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 600;
}

.try-item-summary {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* やってみよう詳細ページ */
.try-detail-body {
  font-size: 15px;
  line-height: 2;
  color: var(--gray-700);
}

.try-detail-body h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--gray-800);
  margin: 24px 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--purple-500);
}

.try-detail-body ul {
  padding-left: 24px;
  margin: 8px 0;
}

.try-detail-body li {
  margin-bottom: 4px;
}

.try-detail-body p {
  margin-bottom: 8px;
}

.try-prompt-example {
  background: linear-gradient(135deg, var(--purple-50), var(--blue-50));
  border: 1px solid var(--purple-200);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-700);
  line-height: 1.7;
}

.try-learning-point {
  background: linear-gradient(135deg, var(--yellow-50), var(--orange-50));
  border: 1px solid var(--yellow-400);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.8;
}

.try-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--purple-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  margin-top: 16px;
}

.try-tool-link:hover { background: var(--purple-700); }

/* ===== クイズ ===== */
.quiz-icon { background: var(--green-100); color: var(--green-700); }

.quiz-inner {
  padding: 20px;
  background: linear-gradient(135deg, var(--green-50), var(--yellow-50));
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1.5px solid var(--green-100);
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-600);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.quiz-type-label {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.quiz-question {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.7;
  margin-bottom: 16px;
}

.quiz-options { display: flex; flex-direction: column; gap: 8px; }

.quiz-option {
  padding: 11px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--green-500);
  background: var(--green-50);
  transform: translateX(3px);
}

.quiz-option-letter {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: all 0.2s;
}

.quiz-option:hover .quiz-option-letter {
  background: var(--green-600);
  color: var(--white);
}

.quiz-option.correct { border-color: var(--green-600); background: var(--green-50); }
.quiz-option.correct .quiz-option-letter { background: var(--green-600); color: var(--white); }
.quiz-option.wrong { border-color: var(--red-500); background: var(--red-50); opacity: 0.7; }

.quiz-result {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  line-height: 1.7;
  text-align: left;
}

.quiz-result.show { display: block; }
.quiz-result.correct { background: var(--green-100); color: var(--green-700); }
.quiz-result.wrong { background: var(--red-50); color: var(--red-600); }

/* ===== 用語辞典 ===== */
.dict-icon { background: var(--purple-100); color: var(--purple-600); }

.dict-list { display: flex; flex-direction: column; gap: 8px; }

.dict-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.dict-item:hover { background: var(--purple-50); border-color: var(--purple-100); }

.dict-term-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dict-emoji { font-size: 18px; }
.dict-term { font-size: 13px; font-weight: 900; color: var(--gray-800); }

.dict-reading {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  background: var(--gray-100);
  padding: 1px 6px;
  border-radius: 4px;
}

.dict-arrow {
  margin-left: auto;
  font-size: 11px;
  color: var(--gray-300);
  transition: transform 0.2s;
}

.dict-item.open .dict-arrow { transform: rotate(90deg); color: var(--purple-500); }

.dict-desc {
  font-size: 12.5px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-200);
  display: none;
}

.dict-item.open .dict-desc { display: block; }

.dict-example {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--purple-50);
  border-radius: 6px;
  font-size: 12px;
  color: var(--purple-700);
}

.dict-related {
  margin-top: 6px;
  font-size: 11px;
  color: var(--gray-400);
}

.dict-related a {
  color: var(--purple-500);
  text-decoration: none;
  font-weight: 600;
}

.dict-related a:hover { text-decoration: underline; }

/* ===== YouTube動画コーナー ===== */
.yt-icon { background: #fee2e2; color: #dc2626; }

.yt-list { display: flex; flex-direction: column; gap: 8px; }

.yt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.yt-item:hover {
  background: var(--red-50);
  border-color: #fecaca;
}

.yt-item-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.yt-item-info { flex: 1; min-width: 0; }
.yt-item-title { font-size: 13px; font-weight: 700; color: var(--gray-800); line-height: 1.5; }
.yt-item-desc { font-size: 11px; color: var(--gray-400); line-height: 1.5; }
.yt-item-play { font-size: 11px; color: var(--red-600); font-weight: 700; flex-shrink: 0; }

/* ===== フッター ===== */
.footer {
  background: linear-gradient(135deg, var(--purple-900), #1e1b4b);
  padding: 32px 24px;
  text-align: center;
  margin-top: 24px;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 16px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-logo span {
  font-size: 10px;
  color: var(--purple-300);
  display: block;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.footer-text {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 2;
}

.footer-text a {
  color: var(--purple-300);
  text-decoration: none;
  font-weight: 600;
}

.footer-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  display: inline-block;
  max-width: 640px;
  line-height: 1.8;
  text-align: left;
}

/* ===== 記事詳細ページ ===== */
.article-page .content {
  grid-column: 1;
}

.article-content {
  padding: 28px 32px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.article-difficulty {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
}

.article-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--gray-800);
  line-height: 1.6;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.article-emoji { font-size: 32px; flex-shrink: 0; }

.article-date {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.article-source {
  font-size: 12px;
  color: var(--gray-400);
  margin-left: 12px;
}

.article-body {
  font-size: 15px;
  line-height: 2;
  color: var(--gray-700);
}

.article-body p { margin-bottom: 16px; }

.article-youtube {
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-radius: var(--radius-sm);
  border: 1px solid #fecaca;
  text-align: center;
}

.article-youtube-link {
  color: var(--red-600);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.article-youtube-link:hover { text-decoration: underline; }

.article-keizai-link {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--blue-50), var(--purple-50));
  border-radius: var(--radius-sm);
  border: 1px solid var(--blue-200);
  text-align: center;
}

.article-keizai-link a {
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.article-nav {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}

.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  text-decoration: none;
  transition: all 0.2s;
}

.article-nav-link:hover { background: var(--purple-50); }

.article-nav-link.prev { text-align: left; }
.article-nav-link.next { text-align: right; }
.article-nav-link.disabled { visibility: hidden; }

.article-nav-arrow { font-size: 18px; color: var(--purple-500); }
.article-nav-label { font-size: 11px; color: var(--gray-400); font-weight: 600; }
.article-nav-title { font-size: 13px; font-weight: 700; color: var(--gray-700); line-height: 1.5; }

.article-nav-home {
  padding: 10px 20px;
  background: var(--purple-600);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  align-self: center;
}

.article-nav-home:hover { background: var(--purple-700); }

/* コンパクト版ニュースリスト */
.news-list.compact .news-item { padding: 10px; gap: 10px; }
.news-list.compact .news-thumb { width: 48px; height: 48px; font-size: 22px; }
.news-list.compact .news-title { font-size: 13px; }

/* 空メッセージ */
.empty-message {
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
  padding: 20px;
}

/* ===== ニュース一覧・アーカイブ ===== */
.archive-page .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px;
}

.archive-date-group { margin-bottom: 24px; }

.archive-date-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-800);
  padding: 8px 0;
  border-bottom: 2px solid var(--purple-100);
  margin-bottom: 8px;
}

.archive-date-icon { font-size: 16px; }

.archive-date-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  margin-left: auto;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.category-filter-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.category-filter-btn:hover {
  background: var(--purple-50);
  border-color: var(--purple-500);
  color: var(--purple-600);
}

.category-filter-btn.active {
  background: var(--purple-600);
  border-color: var(--purple-600);
  color: var(--white);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0 8px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--purple-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.pagination-btn:hover { background: var(--purple-700); }

.pagination-info {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===== 辞典ページ用 ===== */
.single-column {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.full-width { grid-column: 1; }

.page-header {
  background: linear-gradient(135deg, var(--purple-100), var(--blue-50));
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--purple-100);
}

.page-header-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--purple-500), var(--blue-500));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.page-header-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.page-header-desc {
  font-size: 14px;
  color: var(--gray-500);
}

/* 検索ボックス */
.dict-search-box { margin-bottom: 16px; }

.dict-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dict-search-inner:focus-within {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.dict-search-icon { font-size: 18px; flex-shrink: 0; }

.dict-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-700);
  background: transparent;
}

.dict-search-input::placeholder { color: var(--gray-300); }

.dict-search-clear {
  width: 28px; height: 28px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  color: var(--gray-400);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dict-search-clear:hover { background: var(--gray-200); color: var(--gray-600); }

.dict-search-count {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 8px;
  padding-left: 4px;
  min-height: 18px;
}

/* 50音インデックス */
.dict-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-soft);
}

.dict-index-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.dict-index-btn:hover:not(.disabled) {
  background: var(--purple-50);
  border-color: var(--purple-500);
  color: var(--purple-500);
}

.dict-index-btn.active {
  background: var(--purple-500);
  border-color: var(--purple-500);
  color: var(--white);
}

.dict-index-btn.disabled { opacity: 0.3; cursor: default; }

/* グループヘッダー */
.dict-group { margin-bottom: 16px; }

.dict-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--purple-50), var(--blue-50));
  border-bottom: 1px solid var(--gray-100);
}

.dict-group-label { font-size: 16px; font-weight: 900; color: var(--purple-500); }
.dict-group-count { font-size: 11px; color: var(--gray-400); background: var(--white); padding: 2px 8px; border-radius: 4px; }

.dict-list.large .dict-item { padding: 16px 20px; }
.dict-list.large .dict-emoji { font-size: 24px; }
.dict-list.large .dict-term { font-size: 16px; }

.dict-term-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.dict-list.large .dict-desc { font-size: 14px; line-height: 1.9; }

.dict-crosslink {
  color: var(--purple-500);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px dotted var(--purple-500);
  transition: all 0.2s;
}

.dict-crosslink:hover {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
  background: var(--purple-50);
  border-radius: 2px;
}

.dict-item.hidden { display: none; }
.dict-group.hidden { display: none; }

.dict-item.highlight {
  background: var(--yellow-50) !important;
  border-color: var(--yellow-400) !important;
  animation: highlightPulse 1.5s ease;
}

@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.4); }
  100% { box-shadow: none; }
}

.dict-no-result {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}

.dict-no-result-icon { font-size: 40px; margin-bottom: 12px; }
.dict-no-result p { font-size: 15px; font-weight: 700; }

.back-link { text-align: center; margin-top: 24px; }
.back-link a { color: var(--purple-600); font-weight: 700; text-decoration: none; font-size: 14px; }
.back-link a:hover { text-decoration: underline; }

/* ===== アニメーション ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 0.45s ease forwards; opacity: 0; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.4s; }
.delay-6 { animation-delay: 0.48s; }

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .hero { grid-column: 1; padding: 20px; }
  .hero-title { font-size: 17px; }
  .header-inner { padding: 10px 16px; }
  .header-sister-link { font-size: 10px; padding: 4px 8px; }
  .nav-inner { padding: 0 16px; }
  .sidebar { display: contents; }
  .article-page .content { grid-column: 1; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-home { order: -1; justify-self: center; }
  .single-column { max-width: 100%; }
  .page-header { flex-direction: column; text-align: center; padding: 20px; }
  .page-header-title { font-size: 18px; }
}

@media (max-width: 480px) {
  .news-item { flex-direction: column; gap: 8px; }
  .news-thumb { width: 100%; height: 48px; font-size: 24px; }
  .hero { flex-direction: column; text-align: center; gap: 16px; }
  .article-content { padding: 20px 16px; }
  .article-title { font-size: 18px; flex-direction: column; gap: 8px; }
  .try-item { flex-direction: column; }
  .try-item-icon { width: 100%; height: 48px; }
  .dict-term-info { flex-direction: column; align-items: flex-start; gap: 4px; }
  .dict-index { gap: 4px; padding: 10px 12px; }
  .dict-index-btn { padding: 5px 10px; font-size: 12px; }
}
