/*!
Theme Name: SEIKEI Lab
Theme URI: https://seikeilab.com/
Author: 株式会社IMPACT
Author URI: https://seikeilab.com/
Description: 美容医療・美容整形の専門用語辞典「整形ラボ.com — SEIKEI Lab」のオリジナルテーマ。Soft Modern × Editorial デザインで、辞書型メディアに最適化。
Version: 1.1.3
Requires at least: 6.4
Requires PHP: 8.1
License: Proprietary
License URI: https://seikeilab.com/license/
Text Domain: seikei-labo
Tags: editorial, dictionary, medical, custom-post-types
*/

/* ============================================
   整形ラボ Design System
   - Editorial × Soft Modern × Trustworthy
   - Mobile First (clamp 流体タイポ)
   ============================================ */
:root {
  --bg: #fdf6f0;
  --bg-alt: #f5e9dd;
  --bg-card: #ffffff;
  --ink: #1a1410;
  --ink-soft: #5a4a3f;
  --ink-mute: #8a7a6f;
  --line: #e8d5c2;
  --line-soft: #f0e2d2;

  --primary: #c44a3a;
  --primary-dark: #9c3525;
  --secondary: #2d4a3e;
  --accent: #f2a18a;
  --gold: #b8893a;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --fs-display: clamp(2.4rem, 6vw + 1rem, 5.2rem);
  --fs-h1: clamp(1.9rem, 4vw + 0.8rem, 3.4rem);
  --fs-h2: clamp(1.45rem, 2vw + 0.8rem, 2.2rem);
  --fs-h3: clamp(1.15rem, 1vw + 0.8rem, 1.5rem);
  --fs-body: clamp(0.95rem, 0.3vw + 0.85rem, 1.05rem);
  --fs-small: clamp(0.78rem, 0.2vw + 0.7rem, 0.88rem);
  --fs-tiny: clamp(0.7rem, 0.15vw + 0.65rem, 0.78rem);

  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-xl: 32px;

  --sh-card: 0 1px 3px rgba(26, 20, 16, 0.04), 0 8px 24px rgba(26, 20, 16, 0.04);
  --sh-hover: 0 4px 12px rgba(26, 20, 16, 0.06), 0 16px 40px rgba(26, 20, 16, 0.08);

  --max-w: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100c;
    --bg-alt: #1f1813;
    --bg-card: #221913;
    --ink: #f5ede2;
    --ink-soft: #c8b9aa;
    --ink-mute: #8a7a6f;
    --line: #3a2d22;
    --line-soft: #2a201a;
    --primary: #e8a094;
    --primary-dark: #c97565;
  }
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Zen Kaku Gothic New', -apple-system, system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100vw;
}
html { overflow-x: hidden; max-width: 100vw; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
.serif { font-family: 'Shippori Mincho', serif; font-weight: 700; }
.serif-en { font-family: 'Fraunces', serif; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ============================================
   Layout helpers
   ============================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-tiny); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--primary);
  font-weight: 700;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1.5px; background: var(--primary); display: inline-block;
}

/* Top bar */
.top-bar {
  background: var(--ink); color: var(--bg);
  font-size: var(--fs-tiny);
  padding: 8px var(--gutter);
  text-align: center; letter-spacing: 0.05em;
  line-height: 1.6;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 246, 240, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
@media (prefers-color-scheme: dark) { .site-header { background: rgba(20, 16, 12, 0.85); } }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); max-width: var(--max-w); margin: 0 auto;
  gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Shippori Mincho', serif; font-weight: 700;
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.3rem); letter-spacing: 0.04em;
  line-height: 1;
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  /* CJK明朝体の視覚的中心補正：漢字は描画位置がボックスより上寄りなので、
     アイコンを2px下にズラすことで「見た目の中心」を揃える */
  transform: translateY(2px);
}
.logo-mark img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.logo-text { color: var(--ink); }
.logo-tag {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600;
  font-size: 0.7rem; color: var(--ink-mute); letter-spacing: 0.05em;
  display: none;
}
@media (min-width: 640px) { .logo-tag { display: inline; } }

.header-nav {
  display: none; gap: 28px; font-size: 0.9rem; font-weight: 500;
}
@media (min-width: 1024px) { .header-nav { display: flex; align-items: center; } }
.header-nav a { position: relative; padding: 4px 0; transition: color 0.2s; }
.header-nav a:hover { color: var(--primary); }
.header-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0; background: var(--primary);
  transition: width 0.3s;
}
.header-nav a:hover::after { width: 100%; }
.header-nav .current-menu-item > a,
.header-nav .current_page_item > a { color: var(--primary); }
.header-nav .current-menu-item > a::after,
.header-nav .current_page_item > a::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--ink);
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--primary); color: var(--bg); border-color: var(--primary); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }

.menu-toggle {
  display: inline-flex;
  width: 40px; height: 40px; border-radius: 50%;
  align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg);
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }

/* HERO */
.hero {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -100px; right: 0; bottom: auto; left: auto;
  width: clamp(280px, 60vw, 480px); height: clamp(280px, 60vw, 480px);
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  opacity: 0.35; filter: blur(40px);
  pointer-events: none;
  transform: translateX(15%);
}
.hero-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 48px; }
}
.hero-eyebrow-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
  font-size: var(--fs-tiny);
  flex-wrap: wrap;
}
.hero-counter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-card); color: var(--ink-soft);
  font-family: 'Fraunces', serif; font-style: italic;
}
.hero-counter strong { color: var(--primary); font-weight: 700; }
.hero-title {
  font-family: 'Shippori Mincho', serif;
  font-size: var(--fs-display); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 24px;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.hero-title em {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 700;
  color: var(--primary); display: inline-block;
}
.hero-title .accent {
  background: linear-gradient(180deg, transparent 65%, var(--accent) 65%);
  background-size: 100% 100%;
}
.hero-lead {
  font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.1rem);
  color: var(--ink-soft); max-width: 540px;
  line-height: 1.85; margin-bottom: 32px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hero-search {
  display: flex; gap: 8px; padding: 6px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--sh-card);
  max-width: 520px;
  width: 100%;
}
.hero-search input {
  flex: 1; border: 0; padding: 12px 16px; background: transparent;
  font: inherit; font-size: var(--fs-body); color: var(--ink); outline: none;
  min-width: 0;
}
.hero-search input::placeholder { color: var(--ink-mute); }
.hero-search button {
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: var(--fs-small);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--primary); transform: translateY(-1px); }
.hero-search button svg { width: 16px; height: 16px; }
@media (max-width: 480px) {
  .hero-search button { padding: 12px 16px; }
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px;
  font-size: var(--fs-small);
}
.hero-tag-label { color: var(--ink-mute); padding: 6px 0; }
.hero-tags a {
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 500;
  transition: all 0.2s;
}
.hero-tags a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.hero-aside {
  background: var(--ink); color: var(--bg);
  border-radius: var(--r-xl);
  padding: 28px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
}
.hero-aside::after {
  content: '"'; position: absolute; top: -30px; right: 14px;
  font-family: 'Fraunces', serif; font-size: clamp(6rem, 14vw, 11rem); line-height: 1;
  color: var(--primary); opacity: 0.4; pointer-events: none;
}
.hero-aside-label {
  font-size: var(--fs-tiny); letter-spacing: 0.15em;
  color: var(--accent); text-transform: uppercase; font-weight: 700;
}
.hero-aside-quote {
  font-family: 'Shippori Mincho', serif; font-size: 1.15rem;
  line-height: 1.7; position: relative; z-index: 1;
}
.hero-aside-author {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: var(--fs-small);
}
.hero-aside-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Shippori Mincho', serif; font-weight: 700;
  flex-shrink: 0;
}
.hero-aside-name { font-weight: 600; }
.hero-aside-title-sm { font-size: var(--fs-tiny); color: rgba(255, 255, 255, 0.6); }

/* Section base */
.section { padding: clamp(48px, 6vw, 96px) 0; }
.section-head {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: clamp(28px, 4vw, 48px);
  align-items: flex-start;
}
@media (min-width: 768px) {
  .section-head { flex-direction: row; align-items: end; justify-content: space-between; gap: 32px; }
}
.section-title-block { max-width: 640px; }
.section-title {
  font-family: 'Shippori Mincho', serif; font-size: var(--fs-h1);
  line-height: 1.2; letter-spacing: -0.01em; margin-top: 8px;
}
.section-title .accent {
  font-family: 'Fraunces', serif; font-style: italic; color: var(--primary);
}
.section-desc { color: var(--ink-soft); margin-top: 12px; }
.section-link {
  font-size: var(--fs-small); color: var(--ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1.5px solid var(--ink); padding-bottom: 2px;
  transition: all 0.2s; flex-shrink: 0;
}
.section-link:hover { color: var(--primary); border-color: var(--primary); transform: translateX(4px); }

/* Stats */
.stats-row {
  display: grid; gap: 0;
  grid-template-columns: repeat(2, 1fr);
  padding: 32px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }

/* Stats count variants - keep symmetrical when fewer items are configured */
.stats-row.stats-count-1 { grid-template-columns: 1fr; }
.stats-row.stats-count-2 { grid-template-columns: repeat(2, 1fr); }
.stats-row.stats-count-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767px) {
  .stats-row.stats-count-3 { grid-template-columns: repeat(2, 1fr); }
}

.stat-item {
  text-align: center; padding: 16px 12px;
  border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: 0; }
@media (max-width: 767px) {
  .stats-row.stats-count-4 .stat-item:nth-child(2n) { border-right: 0; }
  .stats-row.stats-count-4 .stat-item:nth-child(1),
  .stats-row.stats-count-4 .stat-item:nth-child(2) { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 8px; }
  .stats-row.stats-count-3 .stat-item:nth-child(2n) { border-right: 0; }
  .stats-row.stats-count-3 .stat-item:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; }
}
.stat-num {
  font-family: 'Fraunces', serif; font-weight: 900; font-style: italic;
  font-size: clamp(2rem, 3.5vw + 1rem, 3.8rem);
  line-height: 1; color: var(--primary);
  letter-spacing: -0.03em;
}
.stat-num small { font-size: 0.5em; color: var(--ink); }
.stat-label {
  font-size: var(--fs-tiny); color: var(--ink-soft);
  letter-spacing: 0.15em; text-transform: uppercase;
  font-weight: 600; margin-top: 6px;
}

/* Bento Layout - カテゴリ */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .bento { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.bento-card {
  position: relative;
  padding: 24px; border-radius: var(--r-lg);
  background: var(--bg-card); border: 1px solid var(--line-soft);
  overflow: hidden; min-height: 200px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: all 0.3s;
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--sh-hover); border-color: var(--primary); }
.bento-card.featured {
  background: var(--ink); color: var(--bg);
  grid-column: span 2; grid-row: span 1;
}
@media (min-width: 1024px) { .bento-card.featured { grid-column: span 2; grid-row: span 2; min-height: 420px; } }
.bento-card.warm { background: linear-gradient(135deg, var(--bg-alt), var(--accent)); color: var(--ink); }
.bento-card.deep { background: var(--secondary); color: #f0e9dd; }

.bento-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Shippori Mincho', serif; font-weight: 700;
  font-size: 1.05rem;
}
.bento-card.featured .bento-icon { background: var(--primary); color: var(--bg); }
.bento-card.deep .bento-icon { background: var(--bg); color: var(--secondary); }
.bento-card h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.45rem);
  font-weight: 700; line-height: 1.4; margin: 16px 0 8px;
}
.bento-card.featured h3 {
  font-size: clamp(1.4rem, 1vw + 1rem, 2.2rem);
  margin: 24px 0 12px;
}
.bento-meta {
  font-size: var(--fs-tiny); color: var(--ink-mute);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
}
.bento-card.featured .bento-meta,
.bento-card.deep .bento-meta { color: rgba(255, 255, 255, 0.7); }
.bento-words {
  margin-top: 16px; display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-small);
}
.bento-words span {
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.bento-card.featured .bento-words span,
.bento-card.deep .bento-words span { color: rgba(255, 255, 255, 0.85); }
.bento-words span::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; display: inline-block; opacity: 0.5;
}
.bento-arrow {
  position: absolute; top: 24px; right: 24px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-alt); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.bento-card:hover .bento-arrow { background: var(--primary); color: var(--bg); transform: rotate(-45deg); }
.bento-card.featured .bento-arrow,
.bento-card.deep .bento-arrow { background: rgba(255, 255, 255, 0.15); color: var(--bg); }
.bento-card.featured-text {
  color: rgba(255,255,255,0.7); font-size: var(--fs-small); margin-top: 8px; line-height: 1.7;
}

/* Editorial Cards */
.editorial-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .editorial-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1100px) { .editorial-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.editorial-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--line-soft);
  transition: all 0.3s; height: 100%;
}
.editorial-card:hover { transform: translateY(-4px); box-shadow: var(--sh-hover); }
.editorial-thumb {
  position: relative; aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--bg-alt), var(--accent));
  overflow: hidden;
}
.editorial-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.5), transparent 50%);
}
.editorial-thumb img {
  width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1;
}
.editorial-thumb-pattern {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 800;
  color: var(--ink); opacity: 0.12; letter-spacing: -0.02em;
  text-align: center; padding: 0 16px;
}
.editorial-card-cat-1 .editorial-thumb { background: linear-gradient(135deg, #f5d8c5, #e89e87); }
.editorial-card-cat-2 .editorial-thumb { background: linear-gradient(135deg, #d8e0d4, #8fa991); }
.editorial-card-cat-3 .editorial-thumb { background: linear-gradient(135deg, #e8d4d0, #c89090); }
.editorial-card-cat-4 .editorial-thumb { background: linear-gradient(135deg, #efd8a0, #c8a570); }
.editorial-card-cat-5 .editorial-thumb { background: linear-gradient(135deg, #d4d0e0, #9088b8); }
.editorial-card-cat-6 .editorial-thumb { background: linear-gradient(135deg, #f0e0d0, #b89878); }

.editorial-tag {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95); color: var(--ink);
  font-size: var(--fs-tiny); letter-spacing: 0.08em;
  font-weight: 700; backdrop-filter: blur(10px);
  z-index: 2;
}
.editorial-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.editorial-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-tiny); color: var(--ink-mute);
  margin-bottom: 10px;
  font-family: 'Fraunces', serif; font-style: italic;
}
.editorial-meta span:not(:last-child)::after { content: "·"; margin-left: 8px; }
.editorial-title {
  font-family: 'Shippori Mincho', serif; font-size: 1.25rem;
  line-height: 1.45; font-weight: 700; margin-bottom: 8px;
}
.editorial-title-en {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 0.85rem; color: var(--ink-mute); font-weight: 600;
  margin-bottom: 12px;
}
.editorial-excerpt {
  color: var(--ink-soft); font-size: var(--fs-small);
  line-height: 1.75;
}
.editorial-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 16px; gap: 8px;
}
.editorial-supervisor {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-tiny); color: var(--ink-mute);
}
.editorial-supervisor-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0;
}
.editorial-readtime {
  font-size: var(--fs-tiny); color: var(--ink-mute);
  font-family: 'Fraunces', serif; font-style: italic;
}

/* 50音インデックス */
.aiueo-section { background: var(--bg-alt); }
.aiueo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (min-width: 640px) { .aiueo-grid { grid-template-columns: repeat(10, 1fr); gap: 10px; } }
.aiueo-cell {
  position: relative;
  aspect-ratio: 1; border-radius: var(--r-md);
  background: var(--bg-card); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Shippori Mincho', serif;
  transition: all 0.2s;
  text-align: center; padding: 4px;
}
.aiueo-cell:hover {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  transform: scale(1.05);
}
.aiueo-row {
  font-size: clamp(1rem, 0.5vw + 0.85rem, 1.4rem);
  font-weight: 700;
}
.aiueo-row.en { font-family: 'Fraunces', serif; font-style: italic; }
.aiueo-count {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 0.7rem; color: var(--ink-mute);
  margin-top: 2px;
}
.aiueo-cell:hover .aiueo-count { color: rgba(255, 255, 255, 0.7); }

/* Trending */
.trend-section {
  background: var(--ink); color: var(--bg);
  position: relative; overflow: hidden;
}
.trend-section::before {
  content: ""; position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
  opacity: 0.3; pointer-events: none;
}
.trend-section .section-title { color: var(--bg); }
.trend-section .section-desc { color: rgba(255, 255, 255, 0.65); }
.trend-section .section-link { color: var(--bg); border-color: var(--bg); }
.trend-section .section-link:hover { color: var(--accent); border-color: var(--accent); }
.trend-list { display: grid; gap: 0; position: relative; z-index: 1; }
.trend-row {
  display: grid; gap: 16px;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  cursor: pointer;
}
@media (min-width: 768px) {
  .trend-row {
    grid-template-columns: 36px 240px 1fr 100px auto;
    padding: 22px 8px;
  }
}
.trend-row:hover { padding-left: 12px; background: rgba(255, 255, 255, 0.03); }
.trend-row:last-child { border-bottom: 0; }
.trend-rank {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 900;
  color: var(--primary); font-size: 1.05rem;
}
.trend-rank.top { color: var(--accent); font-size: 1.2rem; }
.trend-word { display: flex; flex-direction: column; gap: 2px; }
.trend-word-jp { font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: 1.05rem; }
.trend-word-en { font-family: 'Fraunces', serif; font-style: italic; color: rgba(255, 255, 255, 0.5); font-size: 0.78rem; }
.trend-desc { display: none; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.7); }
@media (min-width: 768px) { .trend-desc { display: block; } }
.trend-stats { display: none; font-family: 'Fraunces', serif; font-style: italic; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }
@media (min-width: 768px) { .trend-stats { display: block; } }
.trend-arrow { color: rgba(255, 255, 255, 0.4); display: inline-flex; }

/* News */
.news-section { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }
.news-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.news-card::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; background: var(--primary);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s;
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-hover);
  border-color: var(--line);
}
.news-card:hover::before { transform: scaleY(1); }
.news-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.news-tag {
  display: inline-block;
  padding: 4px 10px; border-radius: 999px;
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: 0.05em;
}
.news-tag-new { background: var(--primary); color: var(--bg); }
.news-tag-research { background: var(--secondary); color: #f0e9dd; }
.news-tag-trend { background: var(--gold); color: var(--bg); }
.news-source {
  font-size: var(--fs-tiny); color: var(--ink-mute);
  font-family: 'Fraunces', serif; font-style: italic;
  letter-spacing: 0.03em;
}
.news-title {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.25rem);
  font-weight: 700; line-height: 1.5;
  color: var(--ink);
}
.news-title a { color: var(--ink); }
.news-title .term-link {
  color: var(--primary);
  border-bottom: 1.5px dotted var(--primary);
  padding-bottom: 1px;
  transition: all 0.2s;
}
.news-title .term-link:hover {
  color: var(--primary-dark);
  border-bottom-style: solid;
  border-bottom-color: var(--primary-dark);
}
.news-summary {
  color: var(--ink-soft); font-size: var(--fs-small);
  line-height: 1.85;
}
.news-summary .term-link {
  color: var(--primary);
  border-bottom: 1px dotted var(--primary);
  font-weight: 500;
  transition: all 0.2s;
}
.news-summary .term-link:hover {
  color: var(--primary-dark);
  border-bottom-style: solid;
}
.news-terms {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--r-md);
  font-size: var(--fs-tiny);
}
.news-terms-label {
  color: var(--ink-mute); font-weight: 600;
  margin-right: 4px;
}
.term-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink); font-weight: 500;
  transition: all 0.2s;
}
.term-chip::before {
  content: "→"; margin-right: 4px;
  color: var(--primary); font-weight: 700;
}
.term-chip:hover {
  background: var(--primary); color: var(--bg);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.term-chip:hover::before { color: var(--bg); }
.news-meta {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-tiny); color: var(--ink-mute);
}
.news-meta span:nth-child(1) { font-weight: 600; color: var(--ink-soft); }
.news-meta span:nth-child(2) { font-family: 'Fraunces', serif; font-style: italic; }
.news-link {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary); font-weight: 600;
  transition: gap 0.2s;
}
.news-link:hover { gap: 8px; }
.news-disclaimer {
  margin-top: 32px; padding: 18px 22px;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-tiny);
  color: var(--ink-mute);
  line-height: 1.85;
}
.news-disclaimer strong { color: var(--ink-soft); font-weight: 700; }

/* Q&A */
.qa-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .qa-grid { grid-template-columns: 1fr 2fr; gap: 56px; } }
.qa-aside { position: sticky; top: 100px; align-self: start; }
.qa-aside-title {
  font-family: 'Shippori Mincho', serif; font-size: var(--fs-h2);
  line-height: 1.3; margin-top: 12px; margin-bottom: 18px;
}
.qa-aside-text { color: var(--ink-soft); margin-bottom: 24px; font-size: var(--fs-small); line-height: 1.85; }
.qa-aside-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--primary); color: var(--bg);
  font-weight: 700; font-size: var(--fs-small);
  transition: all 0.2s;
}
.qa-aside-cta:hover { background: var(--ink); transform: translateY(-2px); }
.qa-list { display: flex; flex-direction: column; gap: 12px; }
.qa-item {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); overflow: hidden;
  transition: all 0.2s;
}
.qa-item.is-open { border-color: var(--primary); box-shadow: var(--sh-card); }
.qa-q {
  display: grid; grid-template-columns: 32px 1fr 24px;
  align-items: center; gap: 16px;
  padding: 18px 22px; cursor: pointer; width: 100%; text-align: left;
}
.qa-q-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-alt); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 900; font-style: italic;
}
.qa-q-text {
  font-family: 'Shippori Mincho', serif; font-weight: 600;
  font-size: clamp(0.95rem, 0.3vw + 0.85rem, 1.05rem);
  line-height: 1.5;
}
.qa-q-icon { transition: transform 0.3s; color: var(--ink-mute); display: inline-flex; }
.qa-item.is-open .qa-q-icon { transform: rotate(180deg); color: var(--primary); }
.qa-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.qa-item.is-open .qa-a { max-height: 800px; }
.qa-a-inner {
  padding: 0 22px 22px 70px; color: var(--ink-soft);
  font-size: var(--fs-small); line-height: 1.85;
}
.qa-a-inner strong { color: var(--ink); }

/* Footer */
.site-footer {
  background: var(--ink); color: var(--bg);
  padding: 64px 0 32px; margin-top: 32px;
}
.footer-top {
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 768px) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; } }
.footer-brand .logo { color: var(--bg); font-size: 1.4rem; }
.footer-brand .logo-text { color: var(--bg); }
.footer-brand .logo-tag { color: rgba(255, 255, 255, 0.5); display: inline; }
.footer-brand-text { font-size: var(--fs-small); color: rgba(255, 255, 255, 0.6); margin-top: 16px; line-height: 1.85; max-width: 360px; }
.footer-col h4 {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 700;
  font-size: 0.9rem; margin-bottom: 16px; color: var(--accent);
  letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: var(--fs-small); color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-direction: column; gap: 16px;
  align-items: flex-start;
  font-size: var(--fs-tiny); color: rgba(255, 255, 255, 0.5);
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--bg); }

/* Floating CTA */
.fab {
  position: fixed; bottom: 16px; right: 16px;
  z-index: 50; display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--primary); color: var(--bg);
  font-weight: 700; font-size: var(--fs-small);
  box-shadow: 0 8px 24px rgba(196, 74, 58, 0.4);
  transition: all 0.3s;
}
.fab:hover { background: var(--ink); transform: translateY(-2px); }
.fab svg { width: 16px; height: 16px; }
@media (min-width: 1024px) { .fab { display: none; } }

/* Bottom safe area for FAB on mobile (so it doesn't overlap last content) */
@media (max-width: 1023px) {
  .site-footer { padding-bottom: 80px; }
}

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 20, 16, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh;
  width: 88vw; max-width: 380px; z-index: 210;
  background: var(--bg);
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer-close {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-alt); display: inline-flex; align-items: center; justify-content: center;
}
.drawer-nav { padding: 16px 0; flex: 1; }
.drawer-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  font-family: 'Shippori Mincho', serif; font-size: 1.1rem; font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
  transition: all 0.2s;
}
.drawer-nav a:hover { background: var(--bg-alt); padding-left: 32px; color: var(--primary); }
.drawer-nav a small { font-family: 'Fraunces', serif; font-style: italic; font-weight: 600; color: var(--ink-mute); font-size: 0.75rem; }
.drawer-cta { padding: 24px; border-top: 1px solid var(--line-soft); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ============================================
   Single Term / Single News pages
   ============================================ */
.single-content {
  max-width: 760px; margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter);
}
.single-meta-row {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  font-size: var(--fs-small); color: var(--ink-mute); margin-bottom: 24px;
}
.single-cat-tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-alt); color: var(--primary);
  font-weight: 700; letter-spacing: 0.05em; font-size: var(--fs-tiny);
}
.single-title {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.7rem, 3vw + 1rem, 2.6rem);
  line-height: 1.3; letter-spacing: -0.01em;
  margin-bottom: 16px; font-weight: 800;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.single-title-en {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600;
  color: var(--ink-mute); font-size: 1.05rem;
  margin-bottom: 24px;
}
.single-lead {
  font-size: 1.05rem; line-height: 1.95; color: var(--ink-soft);
  margin-bottom: 32px; padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.single-body {
  font-size: var(--fs-body); line-height: 1.95;
}
.single-body h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.25rem, 1.5vw + 0.85rem, 1.7rem);
  font-weight: 800; margin: 48px 0 18px;
  padding-bottom: 12px; border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.single-body h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.1rem, 0.8vw + 0.85rem, 1.35rem);
  font-weight: 700; margin: 36px 0 14px; color: var(--primary);
}
.single-body p { margin-bottom: 18px; }
.single-body ul, .single-body ol { margin: 0 0 24px; padding-left: 24px; }
.single-body li { margin-bottom: 8px; }
.single-body a { color: var(--primary); border-bottom: 1px dotted var(--primary); }
.single-body a:hover { border-bottom-style: solid; }
.single-body strong { color: var(--ink); font-weight: 700; }
.single-body img { border-radius: var(--r-md); margin: 24px 0; }
.single-body blockquote {
  border-left: 3px solid var(--primary);
  background: var(--bg-alt); padding: 18px 24px;
  margin: 24px 0; border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: 'Shippori Mincho', serif;
  font-style: italic; color: var(--ink-soft);
}
.single-body table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: var(--fs-small);
}
.single-body th {
  background: var(--ink); color: var(--bg);
  padding: 12px; text-align: left; font-weight: 700;
}
.single-body td {
  padding: 12px; border-bottom: 1px solid var(--line);
}

/* Term info box */
.term-info-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  margin: 32px 0;
}
@media (min-width: 640px) { .term-info-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.term-info-item { display: flex; flex-direction: column; gap: 4px; }
.term-info-label {
  font-size: var(--fs-tiny); color: var(--ink-mute);
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
}
.term-info-value { font-size: var(--fs-body); color: var(--ink); font-weight: 500; }

/* Related terms */
.related-section {
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--line);
}
.related-title {
  font-family: 'Shippori Mincho', serif; font-size: 1.3rem;
  font-weight: 700; margin-bottom: 18px;
}
.related-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.related-list a {
  padding: 8px 14px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--line);
  font-size: var(--fs-small); color: var(--ink); font-weight: 500;
  transition: all 0.2s;
}
.related-list a:hover { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* Page hero (archive / page) */
.page-hero {
  padding: clamp(48px, 6vw, 96px) 0 clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; top: -100px; right: 0; bottom: auto; left: auto;
  width: clamp(280px, 60vw, 480px); height: clamp(280px, 60vw, 480px);
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  opacity: 0.25; filter: blur(40px);
  pointer-events: none;
  transform: translateX(15%);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-title {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.9rem, 4vw + 0.8rem, 3.2rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
  margin-top: 12px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.page-hero-title em {
  font-family: 'Fraunces', serif; font-style: italic;
  color: var(--primary); font-weight: 700;
}
.page-hero-desc {
  margin-top: 16px; color: var(--ink-soft);
  font-size: clamp(0.95rem, 0.3vw + 0.85rem, 1.05rem);
  line-height: 1.85; max-width: 640px;
}

/* Pagination */
.pagination {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 48px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 14px;
  border-radius: var(--r-md);
  background: var(--bg-card); border: 1px solid var(--line);
  font-size: var(--fs-small); font-weight: 600;
  color: var(--ink);
  transition: all 0.2s;
  font-family: 'Fraunces', serif; font-style: italic;
}
.pagination a:hover { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.pagination .current {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

/* No results */
.no-results {
  text-align: center; padding: 64px 20px;
  color: var(--ink-soft);
}
.no-results h2 {
  font-family: 'Shippori Mincho', serif; font-size: 1.5rem;
  margin-bottom: 12px; color: var(--ink);
}

/* Search form */
.search-form {
  display: flex; gap: 8px; padding: 6px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--sh-card);
  max-width: 640px; margin: 0 auto;
}
.search-form input {
  flex: 1; border: 0; padding: 12px 16px; background: transparent;
  font: inherit; font-size: var(--fs-body); color: var(--ink); outline: none;
  min-width: 0;
}
.search-form button {
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: var(--fs-small);
  transition: all 0.2s;
}
.search-form button:hover { background: var(--primary); }

/* WP Editor body content harmony */
.single-body .wp-block-image figcaption {
  font-size: var(--fs-tiny); color: var(--ink-mute); text-align: center; margin-top: 8px;
}
.single-body .wp-block-quote {
  border-left: 3px solid var(--primary);
  background: var(--bg-alt); padding: 18px 24px;
  margin: 24px 0;
}

/* Admin bar adjustment */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* ============================================
   News Source CTA (v1.1.0)
   _news_source_type 別の動的ラベル対応
   ============================================ */
.news-source-cta {
  margin: 40px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
}
.news-source-cta-lead {
  margin-bottom: 12px;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.news-source-sub {
  margin-top: 14px;
  font-size: var(--fs-tiny);
  color: var(--ink-mute);
}
.news-source-sub a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.news-source-sub a:hover {
  text-decoration-color: var(--primary);
  color: var(--primary);
}
