/* ============================================
   名言の学校 - Full Stylesheet v2
   和風×モダン カラーパレット
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #5B6ABF;
  --color-primary-light: #7986CB;
  --color-primary-dark: #3F51B5;
  --color-accent: #E8927C;
  --color-accent-light: #F2B5A7;
  --color-bg: #FAFAF8;
  --color-card: #FFFFFF;
  --color-text: #2D2D2D;
  --color-text-light: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;
  --cat-ijin: #8B7355;
  --cat-business: #4A6FA5;
  --cat-entertainment: #C06C84;
  --cat-sports: #5D9B6B;
  --cat-manga: #E07B4C;
  --cat-drama: #7E6BA1;
  --cat-scene: #4A8E99;
  --cat-mbti: #C4955A;
  /* English categories */
  --cat-philosophers: #8B7355;
  --cat-leaders: #4A6FA5;
  --cat-artists: #C06C84;
  --cat-athletes: #5D9B6B;
  --cat-life: #4A8E99;
  --cat-motivation: #E07B4C;
  --font-heading: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  line-height: 1.85;
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-heading); }
img { max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
header {
  background: linear-gradient(135deg, #1E2A3A, #2A3447);
  color: #fff;
  padding: 0.7rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}
header nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-title {
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-heading);
  white-space: nowrap;
}
.site-title:hover { text-decoration: none; opacity: 0.9; }
.lang-switch {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}
.lang-switch:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
  color: #fff;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.9);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}
.nav-menu { list-style: none; display: flex; gap: 0.15rem; flex-wrap: wrap; }
.nav-menu a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.nav-menu a:hover { background: rgba(255,255,255,0.12); text-decoration: none; color: #fff; }

/* --- Search (Header) --- */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input {
  width: 180px;
  padding: 0.35rem 0.8rem 0.35rem 2rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.3s;
  font-family: var(--font-body);
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus {
  width: 220px;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}
.search-icon {
  position: absolute;
  left: 0.65rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
.search-results.active { display: block; }
.search-result-item {
  display: block;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.15s;
}
.search-result-item:hover { background: #F8F9FD; text-decoration: none; }
.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-size: 0.88rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.2rem; }
.search-result-desc { font-size: 0.75rem; color: var(--color-text-light); line-height: 1.4; }
.search-result-badge {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}
.search-no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* --- Main --- */
main { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: none; }
.breadcrumb .sep { margin: 0 0.4rem; color: #D1D5DB; }
.breadcrumb .current { color: var(--color-text-muted); }

/* --- Hero (Homepage) --- */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #3F4E8C, #5B6ABF, #7986CB, #E8927C);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: 0 4px 24px rgba(91,106,191,0.25);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; text-shadow: 0 2px 8px rgba(0,0,0,0.15); position: relative; }
.hero-tagline { font-size: 1.1rem; opacity: 0.95; position: relative; }

/* --- Category Grid (Homepage) --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-card);
  padding: 1.2rem 0.8rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 4px solid var(--color-border);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.category-card h2 { font-size: 0.95rem; margin: 0.3rem 0; border: none; padding: 0; background: none; border-left: none; }
.cat-emoji { font-size: 2rem; }
.cat-count { font-size: 0.78rem; color: var(--color-text-muted); }

/* Category colors */
.cat-ijin, .category-card.cat-ijin { border-top-color: var(--cat-ijin); }
.cat-business, .category-card.cat-business { border-top-color: var(--cat-business); }
.cat-entertainment, .category-card.cat-entertainment { border-top-color: var(--cat-entertainment); }
.cat-sports, .category-card.cat-sports { border-top-color: var(--cat-sports); }
.cat-manga, .category-card.cat-manga { border-top-color: var(--cat-manga); }
.cat-drama, .category-card.cat-drama { border-top-color: var(--cat-drama); }
.cat-scene, .category-card.cat-scene { border-top-color: var(--cat-scene); }
.cat-mbti, .category-card.cat-mbti { border-top-color: var(--cat-mbti); }

/* English category colors */
.cat-philosophers, .category-card.cat-philosophers { border-top-color: var(--cat-philosophers); }
.cat-leaders, .category-card.cat-leaders { border-top-color: var(--cat-leaders); }
.cat-artists, .category-card.cat-artists { border-top-color: var(--cat-artists); }
.cat-athletes, .category-card.cat-athletes { border-top-color: var(--cat-athletes); }
.cat-life, .category-card.cat-life { border-top-color: var(--cat-life); }
.cat-motivation, .category-card.cat-motivation { border-top-color: var(--cat-motivation); }

/* --- Ranking Section --- */
.ranking-section { margin-bottom: 2.5rem; }
.ranking-section > h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-primary);
  color: var(--color-text);
  border-left: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ranking-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.ranking-scroll::-webkit-scrollbar { height: 6px; }
.ranking-scroll::-webkit-scrollbar-track { background: var(--color-border-light); border-radius: 3px; }
.ranking-scroll::-webkit-scrollbar-thumb { background: var(--color-primary-light); border-radius: 3px; }

.ranking-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--color-border);
  position: relative;
}
.ranking-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.ranking-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.ranking-badge.rank-1 { background: #D4A017; font-size: 1rem; width: 36px; height: 36px; }
.ranking-badge.rank-2 { background: #8A8A8A; font-size: 1rem; width: 36px; height: 36px; }
.ranking-badge.rank-3 { background: #A0522D; font-size: 1rem; width: 36px; height: 36px; }
.ranking-card-badge {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
}
.ranking-card h3 {
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ranking-card .ranking-desc {
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Scene Showcase --- */
.scene-section { margin-bottom: 2.5rem; }
.scene-section > h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--cat-scene);
  color: var(--color-text);
  border-left: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.scene-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--cat-scene);
  display: block;
}
.scene-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.scene-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cat-scene);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}
.scene-card h3 {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scene-card .scene-desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scene-more {
  text-align: center;
  margin-top: 1rem;
}
.scene-more a {
  display: inline-block;
  padding: 0.5rem 1.8rem;
  background: var(--color-card);
  border: 2px solid var(--cat-scene);
  color: var(--cat-scene);
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}
.scene-more a:hover {
  background: var(--cat-scene);
  color: #fff;
  text-decoration: none;
}

/* --- Article --- */
article {
  background: var(--color-card);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
article h1 {
  font-size: 1.6rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

time { color: var(--color-text-muted); font-size: 0.85rem; }

.category-badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--color-text-muted);
}
.category-badge:hover { text-decoration: none; opacity: 0.9; }
.category-badge.cat-ijin { background: var(--cat-ijin); }
.category-badge.cat-business { background: var(--cat-business); }
.category-badge.cat-entertainment { background: var(--cat-entertainment); }
.category-badge.cat-sports { background: var(--cat-sports); }
.category-badge.cat-manga { background: var(--cat-manga); }
.category-badge.cat-drama { background: var(--cat-drama); }
.category-badge.cat-scene { background: var(--cat-scene); }
.category-badge.cat-mbti { background: var(--cat-mbti); }
.category-badge.cat-philosophers { background: var(--cat-philosophers); }
.category-badge.cat-leaders { background: var(--cat-leaders); }
.category-badge.cat-artists { background: var(--cat-artists); }
.category-badge.cat-athletes { background: var(--cat-athletes); }
.category-badge.cat-life { background: var(--cat-life); }
.category-badge.cat-motivation { background: var(--cat-motivation); }

/* --- Content --- */
.content { margin: 1.5rem 0; font-size: 1rem; line-height: 1.9; }
.content p { margin-bottom: 1.2rem; }

/* Headings */
.content h2, .content .wp-block-heading {
  font-size: 1.25rem;
  margin: 2.5rem 0 1rem;
  padding: 0.65rem 1rem;
  border-left: 5px solid var(--color-primary);
  border-bottom: none;
  background: linear-gradient(90deg, #F0F1FA, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
  color: var(--color-text);
}
.content h3 { font-size: 1.12rem; margin: 1.5rem 0 0.8rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--color-border); }

.content h2.has-background,
.content h2[style*="background-color"] {
  border-left: 5px solid var(--color-primary);
}
.content .has-ex-a-background-color { background-color: #F0F1FA !important; }

/* Blockquotes */
.content blockquote, .content .wp-block-quote {
  border-left: 5px solid var(--color-primary);
  padding: 1.2rem 1.5rem;
  margin: 1.8rem 0;
  background: linear-gradient(135deg, #F5F6FC, #EEF0FA);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.05rem;
  position: relative;
}
.content blockquote::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 3.5rem;
  color: var(--color-primary);
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
}
.content blockquote p { margin-bottom: 0.5rem; }
.content blockquote cite {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-style: normal;
  margin-top: 0.5rem;
}

/* Tables */
.content table, .content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.7;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.content table thead th {
  background: #2A3447;
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1rem;
  text-align: left;
}
.content table td, .content table th { padding: 0.65rem 1rem; border-bottom: 1px solid var(--color-border-light); vertical-align: top; }
.content table tbody tr:nth-child(even) { background: #FAFAFA; }
.content table tbody tr:hover { background: #F5F6FC; }
.content table td:first-child { font-weight: 600; white-space: nowrap; color: #555; width: 120px; }
.content figure.wp-block-table { margin: 1.5rem 0; overflow-x: auto; }
.content figcaption, .content .wp-element-caption { text-align: center; font-size: 0.82rem; color: var(--color-text-muted); margin-top: 0.5rem; }

/* Images */
.content figure, .content .wp-block-image { margin: 1.5rem 0; text-align: center; }
.content .wp-block-image img { border-radius: 10px; box-shadow: var(--shadow-md); max-width: 100%; }
.content .wp-block-image.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Table of Contents (gutentoc) */
.gutentoc {
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem !important;
  border-radius: var(--radius-md) !important;
  border: 2px solid var(--color-primary) !important;
  background: #F5F6FC !important;
}
.gutentoc-toc-title-wrap { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.gutentoc-toc-title { font-weight: 700; font-size: 1rem; color: var(--color-primary); }
.gutentoc .toggleone, .gutentoc #open { display: none; }
.gutentoc-toc__list { list-style: disc; padding-left: 1.5rem; margin: 0; }
.gutentoc-toc__list li { margin: 0.3rem 0; font-size: 0.92rem; }
.gutentoc-toc__list a { color: var(--color-primary); text-decoration: none; }
.gutentoc-toc__list a:hover { text-decoration: underline; }

/* WordPress text classes */
.fz-16px { font-size: 1rem; }
.has-inline-color.has-ex-b-color, .has-ex-b-color { color: #B05A3A; }
mark.has-inline-color { background: none; }

/* Page nav buttons */
.button.lightblue, a.button.lightblue {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff !important;
  padding: 0.6rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(91,106,191,0.3);
}
.button.lightblue:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(91,106,191,0.4); text-decoration: none; }

/* --- Share Buttons --- */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.share-label { font-size: 0.85rem; color: var(--color-text-light); font-weight: 600; }
.share-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.8; text-decoration: none; }
.share-twitter { background: #1da1f2; }
.share-line { background: #06c755; }

/* --- Person Links (Scene pages) --- */
.person-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.person-links h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  background: none;
  border-left: none;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.person-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.person-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.9rem;
  background: #F5F6FC;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.person-link-chip:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  text-decoration: none;
}

/* --- Related Articles --- */
.related-articles { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.related-articles h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  background: none;
  border-left: none;
  color: var(--color-text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.related-card {
  display: block;
  background: var(--color-bg);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: #444;
  font-size: 0.88rem;
  line-height: 1.5;
  transition: background 0.2s;
  border-left: 3px solid var(--color-primary-light);
}
.related-card:hover { background: #F0F1FA; text-decoration: none; }

/* --- Card List --- */
.list-header { margin-bottom: 1.5rem; }
.list-header h1 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.list-count { font-size: 0.85rem; color: var(--color-text-muted); }

.card {
  background: var(--color-card);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.7rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.15s;
  border-left: 4px solid transparent;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card a { text-decoration: none; color: var(--color-text); display: block; }
.card a:hover { text-decoration: none; }
.card a:hover h2, .card a:hover h3 { color: var(--color-primary); }
.card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
  transition: color 0.2s;
  border: none;
  padding: 0;
  background: none;
  border-left: none;
}
.card h3 { font-size: 1rem; margin-bottom: 0.3rem; line-height: 1.5; transition: color 0.2s; }
.card time { font-size: 0.78rem; }
.card-desc { font-size: 0.85rem; color: var(--color-text-light); margin: 0.3rem 0; line-height: 1.6; }
.card-badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
}
.card-badge.cat-ijin { background: var(--cat-ijin); }
.card-badge.cat-business { background: var(--cat-business); }
.card-badge.cat-entertainment { background: var(--cat-entertainment); }
.card-badge.cat-sports { background: var(--cat-sports); }
.card-badge.cat-manga { background: var(--cat-manga); }
.card-badge.cat-drama { background: var(--cat-drama); }
.card-badge.cat-scene { background: var(--cat-scene); }
.card-badge.cat-mbti { background: var(--cat-mbti); }
.card-badge.cat-philosophers { background: var(--cat-philosophers); }
.card-badge.cat-leaders { background: var(--cat-leaders); }
.card-badge.cat-artists { background: var(--cat-artists); }
.card-badge.cat-athletes { background: var(--cat-athletes); }
.card-badge.cat-life { background: var(--cat-life); }
.card-badge.cat-motivation { background: var(--cat-motivation); }

/* Ranking badge colors in cards */
.ranking-card-badge.cat-ijin { background: var(--cat-ijin); }
.ranking-card-badge.cat-business { background: var(--cat-business); }
.ranking-card-badge.cat-entertainment { background: var(--cat-entertainment); }
.ranking-card-badge.cat-sports { background: var(--cat-sports); }
.ranking-card-badge.cat-manga { background: var(--cat-manga); }
.ranking-card-badge.cat-drama { background: var(--cat-drama); }
.ranking-card-badge.cat-scene { background: var(--cat-scene); }
.ranking-card-badge.cat-mbti { background: var(--cat-mbti); }

/* Search badge colors */
.search-result-badge.cat-ijin { background: var(--cat-ijin); }
.search-result-badge.cat-business { background: var(--cat-business); }
.search-result-badge.cat-entertainment { background: var(--cat-entertainment); }
.search-result-badge.cat-sports { background: var(--cat-sports); }
.search-result-badge.cat-manga { background: var(--cat-manga); }
.search-result-badge.cat-drama { background: var(--cat-drama); }
.search-result-badge.cat-scene { background: var(--cat-scene); }
.search-result-badge.cat-mbti { background: var(--cat-mbti); }
.search-result-badge.cat-philosophers { background: var(--cat-philosophers); }
.search-result-badge.cat-leaders { background: var(--cat-leaders); }
.search-result-badge.cat-artists { background: var(--cat-artists); }
.search-result-badge.cat-athletes { background: var(--cat-athletes); }
.search-result-badge.cat-life { background: var(--cat-life); }
.search-result-badge.cat-motivation { background: var(--cat-motivation); }

/* --- Recent Posts --- */
.recent-posts { margin-top: 2rem; }
.recent-posts > h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-primary);
  color: var(--color-text);
  border-left: none;
  background: none;
}

/* --- Pagination --- */
.pagination { text-align: center; margin: 2.5rem 0; }
.pagination li { display: inline-block; margin: 0 0.2rem; }
.pagination a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text-light);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); text-decoration: none; }
.pagination .active a { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); text-decoration: none; }

/* --- Mood Picker --- */
.mood-section {
  margin-bottom: 2.5rem;
}
.mood-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}
.mood-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}
.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.5rem;
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}
.mood-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.mood-btn.active {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #f0f0ff, #fff);
  box-shadow: 0 4px 16px rgba(91,106,191,0.2);
}
.mood-icon {
  font-size: 2rem;
  line-height: 1;
}
.mood-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.2;
}

/* Mood Results */
.mood-results {
  display: none;
  animation: moodFadeIn 0.4s ease;
}
.mood-results.active { display: block; }
@keyframes moodFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mood-results-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}
.mood-results-icon { font-size: 1.5rem; }
.mood-results-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.mood-quotes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.mood-quote-card {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--color-card);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all 0.2s;
}
.mood-quote-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  border-left-color: var(--color-primary);
}
.mood-quote-text {
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.mood-quote-person {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-align: right;
}
.mood-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  header { padding: 0.5rem 0.8rem; }
  header nav { flex-wrap: wrap; }
  .site-title { font-size: 1.1rem; }

  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0;
    margin-top: 0.3rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { font-size: 0.85rem; padding: 0.5rem 1rem; display: block; }
  .nav-menu a:hover { background: rgba(255,255,255,0.15); }

  .search-form { order: 3; width: 100%; margin-top: 0.3rem; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }
  .search-results { min-width: 100%; }

  main { padding: 1rem 0.8rem 2rem; }
  .hero { padding: 2rem 1rem; border-radius: var(--radius-md); }
  .hero h1 { font-size: 1.6rem; }
  .hero-tagline { font-size: 0.95rem; }

  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .mood-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .mood-btn { padding: 0.7rem 0.3rem; }
  .mood-icon { font-size: 1.5rem; }
  .mood-label { font-size: 0.75rem; }
  .mood-quotes-grid { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }

  .ranking-card { flex: 0 0 180px; }

  article { padding: 1.5rem 1rem; border-radius: 0; }
  article h1 { font-size: 1.3rem; }
  .content h2 { font-size: 1.1rem; }
  .content table { font-size: 0.82rem; }
  .content table td, .content table th { padding: 0.5rem 0.6rem; }
  .content table td:first-child { white-space: normal; width: auto; }

  .related-grid { grid-template-columns: 1fr; }
}
