/*
Theme Name: Chigaipedia Theme
Theme URI: https://example.com/chigaipedia
Author: Chigaipedia
Author URI: https://example.com
Description: コトバの違い辞典 専用WordPressテーマ
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chigaipedia
Tags: blog, education, one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ========================================
   CSS Variables
======================================== */
:root {
  /* Primary Colors */
  --primary: #163777;
  --primary-light: #1e4a9a;
  --primary-dark: #0f2654;
  --primary-bg: #f0f4f8;
  
  /* Accent Colors */
  --accent: #e63946;
  --accent-secondary: #f59e0b;
  
  /* Category Colors */
  --cat-language: #163777;
  --cat-society: #e63946;
  --cat-nature: #f59e0b;
  --cat-life: #8b5cf6;
  --cat-hobby: #ec4899;
  --cat-english: #06b6d4;
  --cat-business: #0d9488;
  
  /* Background Colors */
  --bg: #f8fafc;
  --bg-white: #ffffff;
  
  /* Text Colors */
  --text: #1e293b;
  --text-secondary: #475569;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  
  /* Border Colors */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Ranking Colors */
  --rank-1: #f59e0b;
  --rank-2: #94a3b8;
  --rank-3: #b45309;
  
  /* Shadows */
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  
  /* Layout */
  --container-max: 1200px;
  --sidebar-width: 320px;
  --content-gap: 28px;
}

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

/* スクリーンリーダー専用テキスト（視覚的に非表示） */
.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

/* Sticky Footer */
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  min-height: 70vh;
}

.site-main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ========================================
   Utility Classes
======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Icon base */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.icon-sm { font-size: 16px; }
.icon-md { font-size: 20px; }
.icon-lg { font-size: 24px; }

/* ========================================
   Layout
======================================== */
.site-main {
  padding: var(--content-gap) 0;
}

.main-container {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--content-gap);
}

.content-area {
  min-width: 0;
}

.single-column {
  max-width: 900px;
  margin: 0 auto;
}

/* ========================================
   Header
======================================== */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo .logo-img {
  height: 32px;
  width: auto;
}

.site-logo a:hover {
  text-decoration: none;
}

.header-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
}

.header-search .search-field {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.2s;
}

.header-search .search-field:focus {
  outline: none;
  border-color: var(--primary);
}

.header-search .search-submit {
  padding: 12px 22px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}

.header-search .search-submit:hover {
  background: var(--primary-light);
}

/* Search Suggestions */
.search-form-wrapper {
  position: relative;
  flex: 1;
}

.search-form-with-suggest {
  display: flex;
  width: 100%;
  gap: 8px;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.search-suggestions.is-active {
  display: block;
}

.search-suggestions-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-suggestion-item:hover,
.search-suggestion-item.is-selected {
  background: var(--bg);
}

.search-suggestion-item .suggestion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.search-suggestion-item .suggestion-icon svg {
  width: 16px;
  height: 16px;
}

.search-suggestion-item[data-type="difference"] .suggestion-icon {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.search-suggestion-item[data-type="meaning"] .suggestion-icon {
  background: rgba(234, 88, 12, 0.1);
  color: var(--accent);
}

.search-suggestion-content {
  flex: 1;
  min-width: 0;
}

.search-suggestion-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestions-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.search-suggestions-loading {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Mobile Search Suggestions */
.mobile-search-inner .search-form-wrapper {
  flex-direction: column;
  gap: 0;
}

.mobile-search-inner .search-form-with-suggest {
  width: 100%;
}

.mobile-search-inner .search-suggestions {
  position: relative;
  margin-top: 8px;
  box-shadow: none;
  border: 1px solid var(--border);
}

.mobile-search-inner .search-suggestion-item {
  padding: 14px 16px;
}

/* Primary Navigation */
.primary-navigation {
  border-top: 1px solid var(--border);
  margin: 0 -20px;
  padding: 0 20px;
  overflow-x: auto;
}

.primary-navigation ul {
  display: flex;
  gap: 0;
}

.primary-navigation li {
  flex-shrink: 0;
}

.primary-navigation a {
  display: block;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.primary-navigation a:hover {
  color: var(--primary);
  text-decoration: none;
  background: var(--primary-bg);
}

.primary-navigation .current-menu-item > a,
.primary-navigation .current-menu-ancestor > a,
.primary-navigation .current_page_item > a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Mobile Header Buttons */
.header-mobile-buttons {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-search-toggle,
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
}

.mobile-search-toggle:hover,
.mobile-menu-toggle:hover {
  background: var(--bg);
}

/* Hamburger Icon */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  gap: 5px;
}

.hamburger-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: all 0.3s;
}

/* Mobile Search Modal */
.mobile-search-modal {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 101;
}

.mobile-search-modal.is-open {
  display: block;
}

.mobile-search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

.mobile-search-inner form {
  flex: 1;
  display: flex;
  gap: 8px;
}

.mobile-search-inner .search-field {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
}

.mobile-search-inner .search-field:focus {
  outline: none;
  border-color: var(--primary);
}

.mobile-search-inner .search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.mobile-search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu-drawer.is-open {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

.mobile-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-nav li {
  border-bottom: 1px solid var(--border);
}

.mobile-menu-nav a {
  display: block;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.mobile-menu-nav a:hover {
  background: var(--bg);
  color: var(--primary);
}

.mobile-menu-nav .current-menu-item > a {
  color: var(--primary);
  background: var(--primary-bg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Footer
======================================== */
.site-footer {
  background: var(--primary-dark);
  color: white;
  margin-top: 52px;
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo a {
  display: flex;
  align-items: center;
}

.footer-logo a:hover {
  text-decoration: none;
}

.footer-logo-img {
  height: 24px;
  width: auto;
}

.footer-navigation ul {
  display: flex;
  gap: 28px;
}

.footer-navigation a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.footer-navigation a:hover {
  color: white;
  text-decoration: none;
}

.footer-copyright {
  text-align: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ========================================
   Breadcrumb
======================================== */
.breadcrumb {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

.breadcrumb-item:last-child::after {
  display: none;
}

.breadcrumb-item.current {
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  color: var(--text-muted);
  font-size: 12px;
}

/* パンくず: PC/SP切り替え */
.breadcrumb-pc {
  display: block;
}

.breadcrumb-sp {
  display: none;
  background: var(--bg-secondary);
  padding: 16px 0;
}

@media (max-width: 768px) {
  .breadcrumb-pc {
    display: none;
  }
  
  .breadcrumb-sp {
    display: block;
  }
}

/* ========================================
   Cards
======================================== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-hover {
  transition: all 0.2s;
}

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

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-large {
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 700;
}

/* ========================================
   Tags
======================================== */
.sidebar-tags .tag,
.article-item-tags .tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg);
  color: var(--text-light);
  font-size: 12px;
  border-radius: 4px;
}

.sidebar-tags .tag:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

.tag-pill {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tag-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ========================================
   Category Label
======================================== */
.category-label {
  display: inline-block;
  padding: 5px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
}

/* ========================================
   Sidebar
======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-title {
  padding: 16px 20px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.widget-title .icon {
  font-size: 18px;
}

.widget-content {
  padding: 20px;
}

/* Sidebar Card (FIXデザイン) */
.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar-title {
  padding: 16px 20px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title .icon {
  width: 18px;
  height: 18px;
  fill: white;
}

.sidebar-content {
  padding: 20px;
}

/* Word Links (意味記事へのリンク) */
.word-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.word-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
}

.word-link-item:hover {
  background: var(--primary-bg);
  text-decoration: none;
}

.word-link-item .word {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.word-link-item .label {
  font-size: 13px;
  color: var(--text-light);
}

.word-link-item .icon {
  margin-left: auto;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

/* Mobile Difference Links (意味記事の目次下) */
.article-difference-links {
  display: block;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid var(--border-light);
}

.article-difference-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.article-difference-title .icon {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.article-difference-links .word-links {
  gap: 10px;
}

.article-difference-links .word-link-item {
  padding: 12px 14px;
}

.article-difference-links .word-link-item .word {
  font-size: 16px;
}

/* Sidebar Tags */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tags .tag {
  padding: 6px 14px;
  font-size: 13px;
  background: var(--bg);
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-tags .tag:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.sidebar-tags .tag.current {
  background: var(--primary);
  color: white;
}

/* 50音索引リンク */
.sidebar-index-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-index-link:hover {
  background: var(--primary-bg);
  color: var(--primary);
  text-decoration: none;
}

.sidebar-index-link .icon {
  width: 16px;
  height: 16px;
}

/* 今日のピックアップ */
.today-pickup .sidebar-title .icon {
  color: var(--accent);
}

.today-pickup-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
}

.today-pickup-link:hover {
  background: var(--primary-bg);
  text-decoration: none;
}

.today-pickup-word {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.5;
}

.today-pickup-link .icon {
  flex-shrink: 0;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.related-list .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* Related List */
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list li {
  border-bottom: 1px solid var(--border-light);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.related-list a .icon {
  color: var(--primary);
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.related-list a:hover {
  color: var(--primary);
  text-decoration: none;
  padding-left: 8px;
}

/* Ranking List */
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-list li {
  border-bottom: 1px solid var(--border-light);
}

.ranking-list li:last-child {
  border-bottom: none;
}

.ranking-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.ranking-list a:hover {
  color: var(--primary);
  text-decoration: none;
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--text-muted);
}

.rank-number.rank-1 {
  background: #ecbf49;
  color: #FFF;
}

.rank-number.rank-2 {
  background: #bac2cc;
  color: #FFF;
}

.rank-number.rank-3 {
  background: #d59c5a;
  color: #fff;
}

.rank-title {
  flex: 1;
  line-height: 1.5;
}

.no-posts {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}

/* Popular List (Ranking) */
.popular-list {
  counter-reset: popular;
}

.popular-list li {
  counter-increment: popular;
  border-bottom: 1px solid var(--border-light);
}

.popular-list li:last-child {
  border-bottom: none;
}

.popular-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.popular-list a::before {
  content: counter(popular);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  background: var(--border);
  color: var(--text-light);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
}

.popular-list li:nth-child(1) a::before {
  background: var(--rank-1);
  color: white;
}

.popular-list li:nth-child(2) a::before {
  background: var(--rank-2);
  color: white;
}

.popular-list li:nth-child(3) a::before {
  background: var(--rank-3);
  color: white;
}

.popular-list a:hover {
  color: var(--primary);
  text-decoration: none;
  padding-left: 8px;
}

/* Ad Placeholder */
.ad-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.ad-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ========================================
   Pagination
======================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
}

/* 空のprev/nextは非表示 */
.pagination .page-numbers.prev:empty,
.pagination .page-numbers.next:empty {
  display: none;
}

/* prev/nextに矢印を表示 */
.pagination .page-numbers.prev::before {
  content: '‹';
  font-size: 18px;
}

.pagination .page-numbers.next::after {
  content: '›';
  font-size: 18px;
}

.pagination .page-numbers:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: var(--text-muted);
}

/* ========================================
   Article List
======================================== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: block;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.article-item:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-item-category {
  margin-bottom: 8px;
}

.article-item-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
}

.article-item-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-item-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Search Highlight */
.article-item-title mark,
.article-item-excerpt mark {
  background: #fef08a;
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
}

/* ========================================
   Single Article
======================================== */
.single-article {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border-light);
}

.article-header .category-label {
  margin-bottom: 14px;
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.article-body {
  padding: 32px;
}

/* Article Content Typography */
.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 20px;
  padding: 16px 20px;
  background: var(--primary-bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  scroll-margin-top: 80px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  scroll-margin-top: 80px;
}

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

.article-body ul:not(.article-toc-list):not(.example-list):not(.faq-list):not(.related-words-list),
.article-body ol:not(.article-toc-list) {
  margin-bottom: 24px;
  padding-left: 0;
  list-style: none;
}

.article-body ol:not(.article-toc-list) {
  list-style: none;
  counter-reset: ol-counter;
}

.article-body li {
  margin-bottom: 8px;
}

/* 通常のul liにビュレット追加 */
.article-body ul:not(.article-toc-list):not(.example-list):not(.faq-list):not(.related-words-list) > li {
  position: relative;
  padding-left: 1.2em;
}

.article-body ul:not(.article-toc-list):not(.example-list):not(.faq-list):not(.related-words-list) > li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* 通常のol liに番号追加 */
.article-body ol:not(.article-toc-list) > li {
  position: relative;
  padding-left: 1.5em;
  counter-increment: ol-counter;
}

.article-body ol:not(.article-toc-list) > li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* OK/NG/Caution/Best アイコン */
.ok,
.ng,
.caution,
.best {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.3em;
  vertical-align: -0.15em;
}

.ok::before,
.ng::before,
.caution::before,
.best::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ○ 青丸 */
.ok::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%232563eb' stroke-width='2.5'/%3E%3C/svg%3E");
}

/* ✗ 赤バツ */
.ng::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M6 18L18 6' fill='none' stroke='%23dc2626' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* △ 黄三角 */
.caution::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4L2 20h20L12 4z' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ◎ 緑二重丸 */
.best::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%2316a34a' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='5' fill='none' stroke='%2316a34a' stroke-width='2'/%3E%3C/svg%3E");
}

/* 見出し内での調整 */
h2 .ok,
h2 .ng,
h2 .caution,
h2 .best,
h3 .ok,
h3 .ng,
h3 .caution,
h3 .best {
  width: 1em;
  height: 1em;
}

/* Quick Answer Box (結論) */
.quick-answer {
  background: var(--primary-bg);
  border-left: 4px solid var(--primary);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 32px;
}

.quick-answer-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.quick-answer-label::before {
  content: '';
  display: inline-flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

.quick-answer p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  margin: 0;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: var(--primary);
  color: white;
  font-weight: 500;
}

.comparison-table thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.comparison-table thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.comparison-table tbody th {
  background: var(--bg);
  font-weight: 500;
  color: var(--text-secondary);
}

.comparison-table tbody tr:hover {
  background: var(--primary-bg);
}

/* Comparison Grid (Word Cards) */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.comparison-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.comparison-grid.cols-4,
.comparison-grid.cols-5 {
  grid-template-columns: repeat(2, 1fr);
}

.word-card {
  background: var(--bg);
  border-top: 4px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 26px 22px;
  text-align: center;
}

.word-card.color-1 { border-top-color: var(--primary); }
.word-card.color-2 { border-top-color: var(--accent); }
.word-card.color-3 { border-top-color: var(--accent-secondary); }
.word-card.color-4 { border-top-color: var(--accent-tertiary); }
.word-card.color-5 { border-top-color: var(--accent-fourth); }

.word-card h3 {
  font-size: 30px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  line-height: 1.5;
  color: var(--text);
}

.word-card h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--primary);
  transition: all 0.2s;
}

.word-card h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.word-card .reading {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.word-card .desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.comparison-grid.cols-4 .word-card h3,
.comparison-grid.cols-5 .word-card h3 {
  font-size: 26px;
}

.comparison-grid.cols-4 .word-card,
.comparison-grid.cols-5 .word-card {
  padding: 22px 18px;
}

@media (max-width: 600px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-grid.cols-3,
  .comparison-grid.cols-4,
  .comparison-grid.cols-5 {
    grid-template-columns: 1fr;
  }
}

/* Example Box */
.example-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 22px 0;
}

.example-box-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.example-box-title::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 2l5 5h-5V4zM6 20V4h6v6h6v10H6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 2l5 5h-5V4zM6 20V4h6v6h6v10H6z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.example-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.example-list li {
  padding: 9px 0;
  padding-left: 22px;
  position: relative;
  font-size: 15px;
  color: var(--text-secondary);
}

.example-list li:last-child {
  margin-bottom: 0;
}

.example-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* Checklist */
.checklist {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist .check-icon {
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* FAQ */
.faq-list {
  margin: 24px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.faq-question .q-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.faq-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-answer .a-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========================================
   意味記事用コンポーネント
======================================== */

/* 単語情報カード */
.word-info-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 24px 0;
  color: white;
}

.word-info-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.word-info-card-word {
  font-size: 2.2em;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.word-info-card-reading {
  font-size: 1.1em;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.word-info-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.word-info-card-item {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.word-info-card-item-label {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.word-info-card-item-value {
  font-size: 15px;
  font-weight: 600;
}

/* 類語・対義語ボックス */
.synonym-box {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
}

.synonym-box-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.synonym-box-title .icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.synonym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.synonym-group h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

.synonym-group.synonyms h4 {
  border-bottom-color: var(--primary);
}

.synonym-group.antonyms h4 {
  border-bottom-color: var(--accent);
}

.synonym-group ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.synonym-group li {
  background: white;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s ease;
}

.synonym-group li:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 慣用句・ことわざボックス */
.idiom-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
}

.idiom-box-title {
  font-size: 15px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.idiom-list {
  list-style: none;
}

.idiom-item {
  padding: 16px 0;
  border-bottom: 1px dashed #fcd34d;
}

.idiom-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.idiom-item-phrase {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.idiom-item-meaning {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 英語表現ボックス */
.english-box {
  background: #f0f9ff;
  border: 1px solid #7dd3fc;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
}

.english-box-title {
  font-size: 15px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.english-list {
  list-style: none;
}

.english-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #bae6fd;
}

.english-item:last-child {
  border-bottom: none;
}

.english-item-word {
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  color: #0c4a6e;
}

.english-item-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  /* Mobile Header */
  .header-search-pc {
    display: none;
  }
  
  .primary-navigation-pc {
    display: none;
  }
  
  .header-mobile-buttons {
    display: flex;
  }
  
  .site-logo .logo-img {
    height: 28px;
  }
  
  .header-inner {
    padding: 10px 0;
  }

  .word-info-card {
    padding: 20px 24px;
  }
  
  .word-info-card-word {
    font-size: 1.8em;
  }
  
  .word-info-card-meta {
    grid-template-columns: 1fr 1fr;
  }
  
  .synonym-grid {
    grid-template-columns: 1fr;
  }
}

/* Related Words */
.related-words {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 40px;
}

.related-words-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-words-title::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.related-words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-words-list a {
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.related-words-list a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  text-decoration: none;
}

/* ========================================
   TOC (Table of Contents)
======================================== */
.toc-widget {
  position: sticky;
  top: 80px;
}

.toc-list {
  font-size: 14px;
}

.toc-list li {
  border-bottom: 1px solid var(--border-light);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: block;
  padding: 12px 0;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.toc-list a:hover {
  color: var(--primary);
  text-decoration: none;
  padding-left: 8px;
}

.toc-list .toc-h3 {
  padding-left: 16px;
  font-size: 13px;
}

/* ========================================
   Page Header (Category, Tag, Search)
======================================== */
.page-header {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 28px;
}

.page-header.with-triangle {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.page-header.with-triangle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 60px 60px 0 0;
  border-color: var(--primary) transparent transparent transparent;
}

.page-header-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-header-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.page-header-icon svg {
  width: 32px;
  height: 32px;
}

.page-header-text h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.page-header-text p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.page-header-count {
  font-size: 14px;
  color: var(--text-light);
}

.page-header-count strong {
  color: var(--primary);
  font-weight: 700;
}

/* List Controls */
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.list-controls-left {
  font-size: 14px;
  color: var(--text-light);
}

.sort-select {
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ========================================
   Search Page
======================================== */
.search-header {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 28px;
}

.search-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.search-header-title .keyword {
  color: var(--primary);
}

.search-form-large {
  display: flex;
  gap: 12px;
}

.search-form-large .search-field {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
}

.search-form-large .search-field:focus {
  outline: none;
  border-color: var(--primary);
}

.search-form-large .search-submit {
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
}

/* ========================================
   404 Page
======================================== */
.error-404-box {
  text-align: center;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 48px 32px;
  margin-bottom: 32px;
}

.error-code {
  font-family: inherit;
  font-size: 100px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -4px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.error-message {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

.error-search {
  max-width: 480px;
  margin: 0 auto;
}

/* ========================================
   Static Page
======================================== */
.static-page {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.static-page-header {
  padding: 32px 40px;
  border-bottom: 1px solid var(--border-light);
}

.static-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.static-page-body {
  padding: 40px;
}

.static-page-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.static-page-body h2:first-child {
  margin-top: 0;
}

.static-page-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
}

.static-page-body p {
  margin-bottom: 20px;
  line-height: 2;
}

.static-page-body ul,
.static-page-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
  list-style: disc;
}

.static-page-body ol {
  list-style: decimal;
}

.static-page-body li {
  margin-bottom: 8px;
  line-height: 1.8;
}

/* Info Box */
.info-box {
  background: var(--primary-bg);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Table in static page */
.static-page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.static-page-body th,
.static-page-body td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.static-page-body tr:last-child th,
.static-page-body tr:last-child td {
  border-bottom: none;
}

.static-page-body th {
  background: var(--bg);
  font-weight: 500;
  color: var(--text-secondary);
  width: 160px;
  border-right: 1px solid var(--border);
}

.static-page-body td {
  background: var(--bg-white);
}

/* Contact Form */
.contact-form {
  margin-top: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--accent);
  margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
}

.form-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 6px;
}

/* Sitemap styles */
.sitemap-category-list,
.sitemap-post-list {
  list-style: none;
  padding: 0;
}

.sitemap-category-list li,
.sitemap-post-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.sitemap-category-list li:last-child,
.sitemap-post-list li:last-child {
  border-bottom: none;
}

.sitemap-category-list a,
.sitemap-post-list a {
  color: var(--text-secondary);
  font-size: 15px;
}

.sitemap-category-list a:hover,
.sitemap-post-list a:hover {
  color: var(--primary);
}

.sitemap-category-list .post-count {
  color: var(--text-muted);
  font-size: 13px;
}

.sitemap-post-list .category-label {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  margin-right: 8px;
}

/* ========================================
   Contact Form 7 Styles
======================================== */
.wpcf7 {
  margin-top: 32px;
}

.wpcf7-form p {
  margin-bottom: 24px;
}

.wpcf7-form label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.wpcf7-form .required {
  color: var(--accent);
  margin-left: 4px;
}

.wpcf7-form-control:not([type="submit"]) {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--bg-white);
}

.wpcf7-form-control:not([type="submit"]):focus {
  outline: none;
  border-color: var(--primary);
}

.wpcf7-form-control.wpcf7-textarea {
  min-height: 200px;
  resize: vertical;
}

.wpcf7-form-control.wpcf7-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 24px;
  padding-right: 44px;
  cursor: pointer;
}

.wpcf7-form-control[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.wpcf7-form-control[type="submit"]:hover {
  background: var(--primary-light);
}

.wpcf7-form-control[type="submit"]:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

/* Validation */
.wpcf7-not-valid {
  border-color: var(--accent) !important;
}

.wpcf7-not-valid-tip {
  color: var(--accent);
  font-size: 13px;
  margin-top: 6px;
  display: block;
}

.wpcf7-response-output {
  margin: 24px 0 0 !important;
  padding: 16px 20px !important;
  border-radius: var(--radius) !important;
  font-size: 14px;
}

.wpcf7-mail-sent-ok {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-spam-blocked {
  background: #fef2f2 !important;
  border-color: var(--accent) !important;
  color: #991b1b !important;
}

/* Spinner */
.wpcf7-spinner {
  margin-left: 12px;
}

/* Form hint text */
.wpcf7-form .form-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 6px;
}

/* ========================================
   Ad Unit Styles
======================================== */
.ad-unit {
  margin: 28px 0;
  text-align: center;
}

.ad-unit .ad-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}

.ad-unit .ad-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

/* 記事タイトル下 */
.ad-title-below {
  margin: 20px 0 28px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
}

/* 目次下 */
.ad-toc-below {
  margin: 24px 0 32px;
}

/* 記事本文中（H2上） */
.ad-in-content {
  margin: 40px 0;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

/* 記事下 */
.ad-content-below {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius-lg);
}

/* 関連記事下 */
.ad-related-below {
  margin: 32px 0 0;
}

/* サイドバー広告 */
.ad-sidebar-top,
.ad-sidebar-middle,
.ad-sidebar-bottom {
  margin-bottom: 22px;
  padding: 16px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ad-sidebar-top .ad-label,
.ad-sidebar-middle .ad-label,
.ad-sidebar-bottom .ad-label {
  margin-bottom: 12px;
}

/* レスポンシブ広告対応 */
.ad-unit .ad-content ins {
  display: block !important;
}

/* 広告プレースホルダー（開発用） */
.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  margin: 20px 0;
}

.ad-placeholder .ad-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* ========================================
   Hero Section (TOP Page)
======================================== */
.hero-section {
  background: var(--primary);
  padding: 60px 20px;
  text-align: center;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}

.hero-search-wrapper {
  position: relative;
  max-width: 560px;
  margin: 0 auto 24px;
}

.hero-search-wrapper .search-suggestions {
  left: 0;
  right: 0;
  margin-top: 8px;
  max-height: 320px;
  text-align: left;
}

.hero-search-wrapper .search-suggestion-title {
  text-align: left;
}

.hero-search {
  display: flex;
  gap: 12px;
  max-width: none;
  margin: 0;
}

.hero-search-input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  box-shadow: var(--shadow-md);
}

.hero-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.hero-search-btn {
  padding: 16px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search-btn:hover {
  background: #d63240;
}

.hero-popular {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-popular-label {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.hero-popular-tag {
  padding: 6px 14px;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 13px;
  border-radius: 20px;
  transition: background 0.2s;
}

.hero-popular-tag:hover {
  background: rgba(255,255,255,0.25);
  text-decoration: none;
}

/* ========================================
   Category Grid (TOP Page)
======================================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-card {
  display: block;
  padding: 24px 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

/* 左上の斜め三角形 */
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 40px 40px 0 0;
  border-color: var(--primary) transparent transparent transparent;
}

.category-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-card[data-cat="society"]::before { border-color: var(--cat-society) transparent transparent transparent; }
.category-card[data-cat="nature"]::before { border-color: var(--cat-nature) transparent transparent transparent; }
.category-card[data-cat="life"]::before { border-color: var(--cat-life) transparent transparent transparent; }
.category-card[data-cat="hobby"]::before { border-color: var(--cat-hobby) transparent transparent transparent; }
.category-card[data-cat="english"]::before { border-color: var(--cat-english) transparent transparent transparent; }
.category-card[data-cat="business"]::before { border-color: var(--cat-business) transparent transparent transparent; }

.category-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 24px;
}

.category-card[data-cat="society"] .category-card-icon { background: #fff0f1; color: var(--cat-society); }
.category-card[data-cat="nature"] .category-card-icon { background: #fffbeb; color: var(--cat-nature); }
.category-card[data-cat="life"] .category-card-icon { background: #f3f0ff; color: var(--cat-life); }
.category-card[data-cat="hobby"] .category-card-icon { background: #fdf2f8; color: var(--cat-hobby); }
.category-card[data-cat="english"] .category-card-icon { background: #ecfeff; color: var(--cat-english); }
.category-card[data-cat="business"] .category-card-icon { background: #f0fdfa; color: var(--cat-business); }

.category-card-text {
  /* flex layout removed - centered */
}

.category-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.category-card-count {
  font-size: 13px;
  color: var(--text-light);
}

/* Category colors - for data-cat attribute */
.category-card[data-cat="language"] { --cat-color: var(--cat-language); }
.category-card[data-cat="society"] { --cat-color: var(--cat-society); }
.category-card[data-cat="nature"] { --cat-color: var(--cat-nature); }
.category-card[data-cat="life"] { --cat-color: var(--cat-life); }
.category-card[data-cat="hobby"] { --cat-color: var(--cat-hobby); }
.category-card[data-cat="english"] { --cat-color: var(--cat-english); }
.category-card[data-cat="business"] { --cat-color: var(--cat-business); }

/* ========================================
   Popular Searches (TOP Page)
======================================== */
.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.popular-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.popular-search-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
  text-decoration: none;
}

.popular-search-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
}

.popular-search-item:nth-child(1) .popular-search-rank { background: #f59e0b; }
.popular-search-item:nth-child(2) .popular-search-rank { background: #94a3b8; }
.popular-search-item:nth-child(3) .popular-search-rank { background: #b45309; }

/* ========================================
   Front Section
======================================== */
.front-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ========================================
   Section Title
======================================== */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  color: var(--primary);
  font-size: 24px;
}

/* もっと見るリンク（ヘッダー内） */
.section-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.section-more-link:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.section-more-link svg {
  transition: transform 0.2s;
}

.section-more-link:hover svg {
  transform: translateX(3px);
}

/* セクションフッター（もっと見るボタン） */
.section-footer {
  margin-top: 20px;
  text-align: center;
}

.more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: 8px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.more-button:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.more-button svg {
  transition: transform 0.2s;
}

.more-button:hover svg {
  transform: translateX(3px);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 960px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: 2;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .toc-widget {
    position: static;
  }
}

@media (max-width: 600px) {
  .header-search {
    display: none;
  }
  
  .primary-navigation a {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .article-header,
  .article-body {
    padding: 24px;
  }
  
  .also-interested-item {
    padding: 15px 24px;
  }
  
  .article-title {
    font-size: 22px;
  }
  
  .page-header {
    padding: 20px;
  }
  
  .page-header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .page-header-text h1 {
    font-size: 22px;
  }
  
  .list-controls {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .search-form-large {
    flex-direction: column;
  }
  
  .error-code {
    font-size: 100px;
  }
  
  .error-popular-list {
    grid-template-columns: 1fr;
  }
  
  .static-page-header,
  .static-page-body {
    padding: 24px;
  }
  
  .static-page-title {
    font-size: 22px;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  
  /* Hero responsive */
  .hero-title {
    font-size: 26px;
  }
  
  .hero-search {
    flex-direction: column;
  }
  
  .hero-search-btn {
    width: 100%;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

/* ========================================
   Article TOC (Table of Contents) - In Article
======================================== */
.article-toc {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 32px;
}

.article-toc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-toc-title .icon {
  color: var(--primary);
}

.article-toc-list {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}

ol.article-toc-list {
  padding-left: 0;
}

.article-toc-list li {
  list-style: none;
  counter-increment: toc;
  padding: 7px 0;
  font-size: 15px;
}

.article-toc-list li a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-toc-list li a::before {
  content: counter(toc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--border);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}

.article-toc-list li a:hover {
  color: var(--primary);
  text-decoration: none;
}

.article-toc-list li a:hover::before {
  background: var(--primary);
  color: white;
}

/* ========================================
   Article Footer Tags
======================================== */
.article-footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-footer-tags-label {
  font-size: 14px;
  color: var(--text-light);
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-footer-tags .tag {
  display: inline-block;
  padding: 7px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.article-footer-tags .tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  text-decoration: none;
}

/* ========================================
   Related Articles Section (Bottom)
======================================== */
.related-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-top: 28px;
}

.related-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-section-title .icon {
  color: var(--primary);
  font-size: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.related-card {
  display: block;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.related-card:hover {
  background: var(--primary-bg);
  text-decoration: none;
  transform: translateY(-2px);
}

.related-card-category {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.related-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

/* ========================================
   Also Interested Section（この違いも気になる）
======================================== */
.also-interested {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 28px;
}

.also-interested-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.also-interested-header .icon {
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.also-interested-body {
  padding: 0;
}

.also-interested-item {
  display: flex;
  align-items: center;
  padding: 15px 32px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.also-interested-item:last-child {
  border-bottom: none;
}

.also-interested-item:hover {
  background: var(--primary-bg);
  text-decoration: none;
}

.also-interested-num {
  width: 24px;
  height: 24px;
  background: var(--primary-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.also-interested-item:hover .also-interested-num {
  background: var(--primary);
  color: #fff;
}

/* ========================================
   Category Section（カテゴリから探す）
======================================== */
.category-section {
  margin-top: 28px;
}

/* ========================================
   Category Related Section (deprecated)
======================================== */
.category-related {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-top: 28px;
}

.category-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.category-related-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-related-title .category-label {
  padding: 5px 12px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 13px;
  border-radius: 4px;
}

.category-related-more {
  font-size: 14px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-related-more:hover {
  text-decoration: none;
  opacity: 0.8;
}

.category-related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.category-related-item {
  display: block;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.category-related-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
  text-decoration: none;
}

/* Responsive for new sections */
@media (max-width: 960px) {
  .related-grid,
  .category-related-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .article-header {
    padding: 24px;
  }
  
  .article-body {
    padding: 24px;
  }
  
  .article-title {
    font-size: 24px;
  }
  
  .related-section,
  .category-related {
    padding: 20px;
  }
  
  .category-related-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ========================================
   Meaning Article Styles (意味記事)
======================================== */

/* Word Header - 単語ヘッダー */
.word-header {
  text-align: center;
  padding: 32px 24px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #e8f0fe 100%);
  border-radius: var(--radius-lg);
}

.word-header-main {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.word-header-reading {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

@media (max-width: 600px) {
  .word-header {
    padding: 24px 20px;
  }
  
  .word-header-main {
    font-size: 32px;
  }
  
  .word-header-reading {
    font-size: 16px;
  }
}

/* Quick Summary - かんたんに言うと */
.quick-summary {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 32px;
}

.quick-summary-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 12px;
}

.quick-summary-label::before {
  content: '';
  display: inline-flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #f59e0b;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

.quick-summary p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  margin: 0;
}

@media (max-width: 600px) {
  .quick-summary {
    padding: 20px 24px;
  }
}

/* Related Words Box - 類語・関連語ボックス */
.related-words-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
}

.related-words-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-bg);
}

.related-words-title::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.related-words-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-words-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.related-words-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 80px;
}

.related-words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  flex: 1;
}

/* spanはカンマ区切りのテキスト */
.related-word-tag {
  font-size: 15px;
  color: var(--text);
}

.related-word-tag:not(:last-child)::after {
  content: '、';
  color: var(--text);
  text-decoration: none;
}

/* span内のaタグにスタイル適用 */
.related-word-tag a {
  color: var(--primary);
  text-decoration: underline;
  margin-right: 4px;
}

.related-word-tag a:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

@media (max-width: 600px) {
  .related-words-box {
    padding: 20px;
  }
  
  .related-words-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .related-words-label {
    min-width: auto;
  }
}

/* ========================================
   比較表 横スクロール対応
======================================== */
.table-scroll-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.table-scroll-wrapper .comparison-table {
  margin: 0;
  min-width: 500px;
}

@media (max-width: 768px) {
  .table-scroll-wrapper {
    margin: 16px -16px;
    padding: 0 16px;
    width: calc(100% + 32px);
  }
  
  .table-scroll-wrapper .comparison-table {
    min-width: 600px;
  }
  
  .table-scroll-wrapper .comparison-table th,
  .table-scroll-wrapper .comparison-table td {
    padding: 12px;
    font-size: 14px;
    white-space: nowrap;
  }
  
  .table-scroll-wrapper .comparison-table tbody th {
    white-space: normal;
    min-width: 80px;
  }
}

/* スクロールヒント（テーブル上にオーバーレイ） */
.table-scroll-hint {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 80%;
  max-width: 280px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: #fff;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.table-scroll-hint.is-hiding {
  opacity: 0;
}

.table-scroll-hint .hint-icon {
  display: flex;
  align-items: center;
  animation: scroll-hint-bounce 1.5s ease-in-out infinite;
}

.table-scroll-hint .hint-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

@keyframes scroll-hint-bounce {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

@media (max-width: 768px) {
  .table-scroll-hint {
    display: flex;
  }
}

/* ========================================
   結論/TOPに戻るボタン（記事下配置）
======================================== */
.back-to-section {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.back-to-section-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.back-to-section-btn:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.back-to-section-btn .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .back-to-section {
    margin: 24px 0;
  }
  
  .back-to-section-btn {
    padding: 12px 24px;
    font-size: 13px;
    width: 100%;
  }
}

/* ========================================
   50音索引ページ
   ======================================== */

/* メイン索引ページ */
.gojuon-index-page {
  max-width: 900px;
  margin: 0 auto;
}

.gojuon-header {
  text-align: center;
  margin-bottom: 40px;
}

.gojuon-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.gojuon-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.gojuon-description a {
  color: var(--primary);
  text-decoration: none;
}

.gojuon-description a:hover {
  text-decoration: underline;
}

.gojuon-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gojuon-back-link .icon {
  width: 18px;
  height: 18px;
}

.gojuon-back-link:hover {
  text-decoration: none;
}

.gojuon-back-link:hover span {
  text-decoration: underline;
}

/* 50音グリッド */
.gojuon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.gojuon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s;
}

.gojuon-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.gojuon-card-chars {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.gojuon-card-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.gojuon-card-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* 各行ページ */
.gojuon-row-page {
  max-width: 900px;
  margin: 0 auto;
}

/* 行ナビゲーション */
.gojuon-row-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
}

.gojuon-row-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.gojuon-row-nav-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
  text-decoration: none;
}

.gojuon-row-nav-item.is-active {
  background: var(--primary);
  color: white;
}

/* 文字タブ */
.gojuon-char-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  justify-content: center;
}

.gojuon-char-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.gojuon-char-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.gojuon-char-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* 文字セクション */
.gojuon-char-section {
  display: none;
}

.gojuon-char-section.is-active {
  display: block;
}

.gojuon-char-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

/* 単語リスト */
.gojuon-word-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gojuon-word-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

.gojuon-word-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.gojuon-word-main {
  flex: 1;
}

.gojuon-word-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}

.gojuon-word-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.gojuon-word-link:hover .gojuon-word-text {
  color: var(--primary);
}

.gojuon-word-link:hover {
  text-decoration: none;
}

.gojuon-word-reading {
  font-size: 14px;
  color: var(--text-muted);
}

.gojuon-word-diff {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
}

.gojuon-word-diff span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gojuon-word-diff:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

.gojuon-word-diff .icon {
  width: 14px;
  height: 14px;
}

.gojuon-no-posts {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .gojuon-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .gojuon-card {
    padding: 16px 12px;
  }
  
  .gojuon-card-chars {
    font-size: 14px;
    letter-spacing: 1px;
  }
  
  .gojuon-card-label {
    font-size: 12px;
  }
  
  .gojuon-title {
    font-size: 22px;
  }
  
  .gojuon-row-nav-item {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .gojuon-char-tabs {
    justify-content: flex-start;
  }
  
  .gojuon-char-tab {
    min-width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .gojuon-char-heading {
    font-size: 20px;
  }
  
  .gojuon-word-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  
  .gojuon-word-text {
    font-size: 16px;
  }
  
  .gojuon-word-diff {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ========================================
   SNS Share Buttons
======================================== */
.share-buttons {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: center;
}

.share-buttons-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 16px;
}

.share-buttons-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.share-btn svg {
  width: 20px;
  height: 20px;
}

/* X (Twitter) */
.share-btn-x {
  background: #000;
}

/* Facebook */
.share-btn-facebook {
  background: #1877f2;
}

/* LINE */
.share-btn-line {
  background: #06c755;
}

/* はてなブックマーク */
.share-btn-hatena {
  background: #00a4de;
}

/* URLコピー */
.share-btn-copy {
  background: var(--primary);
  width: auto;
  padding: 0 16px;
  border-radius: 22px;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
}

.share-btn-copy svg {
  width: 16px;
  height: 16px;
}

.share-btn-copy.is-copied {
  background: #10b981;
}

/* モバイル */
@media (max-width: 600px) {
  .share-buttons {
    padding: 20px 16px;
  }
  
  .share-btn {
    width: 40px;
    height: 40px;
  }
  
  .share-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .share-btn-copy {
    width: auto;
    padding: 0 14px;
    height: 40px;
  }
}

/* はてブ テキストアイコン */
.hatena-icon {
  font-family: 'Verdana', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -1px;
}
