/*
Theme Name: AI Income Aurora
Theme URI: https://ai-income.jp/
Description: 収益メディア向けの“動きのある”モダンテーマ。ダークファースト＋オーロラ・グラデーション背景、グラスモーフィズム、スクロール連動アニメ、3Dチルトカード、リーディングプログレス。記事本文のCTA/比較表/FAQ/目次/JSON-LD/OGPは ai-income-mediakit (mu-plugin) が担当し、本テーマは外装と演出のみを担う（/go・rel・計測は不変）。ロールバックは ai-income-media を有効化するだけ。
Author: AI Income OS
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: ai-income-aurora
*/

/* =========================================================
   Design tokens — dark first
   ========================================================= */
:root {
  --bg: #07080c;
  --bg-2: #0b0d14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --glass: rgba(12, 14, 22, 0.55);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.16);
  --ink: #f3f6fc;
  --muted: #9aa6bd;
  --faint: #69748c;
  --brand: #6d5efc;
  --brand-2: #22d3ee;
  --brand-3: #f472b6;
  --accent-ink: #ffffff;
  --grad: linear-gradient(120deg, #7c6bff 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 107, 255, 0.16), rgba(34, 211, 238, 0.16));
  --glow: rgba(109, 94, 252, 0.45);
  --glow-2: rgba(34, 211, 238, 0.35);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 9999px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 10px 40px -10px var(--glow);
  --maxw: 1180px;
  --readw: 740px;
  --font:
    'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', system-ui, -apple-system,
    'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light theme override (toggle) */
[data-theme='light'] {
  --bg: #f7f9fe;
  --bg-2: #eef2fb;
  --surface: rgba(15, 23, 42, 0.03);
  --surface-2: rgba(15, 23, 42, 0.05);
  --glass: rgba(255, 255, 255, 0.7);
  --border: rgba(15, 23, 42, 0.1);
  --border-2: rgba(15, 23, 42, 0.16);
  --ink: #10162a;
  --muted: #566178;
  --faint: #8892a6;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 24px 60px rgba(15, 23, 42, 0.12);
}

/* =========================================================
   Base
   ========================================================= */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--brand-2);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
a:hover {
  color: var(--brand);
}
.aur-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.aur-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* =========================================================
   Aurora animated background
   ========================================================= */
.aur-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(140% 120% at 50% -10%, var(--bg-2), var(--bg) 55%);
}
.aur-aurora::before,
.aur-aurora::after,
.aur-aurora span {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.aur-aurora::before {
  width: 55vw;
  height: 55vw;
  left: -12vw;
  top: -14vw;
  background: radial-gradient(circle, var(--brand), transparent 62%);
  animation: aur-drift-a 22s ease-in-out infinite alternate;
}
.aur-aurora::after {
  width: 48vw;
  height: 48vw;
  right: -12vw;
  top: 8vw;
  background: radial-gradient(circle, var(--brand-2), transparent 62%);
  animation: aur-drift-b 26s ease-in-out infinite alternate;
}
.aur-aurora span {
  width: 42vw;
  height: 42vw;
  left: 32vw;
  top: 40vh;
  background: radial-gradient(circle, var(--brand-3), transparent 60%);
  opacity: 0.4;
  animation: aur-drift-c 30s ease-in-out infinite alternate;
}
@keyframes aur-drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6vw, 8vh, 0) scale(1.15);
  }
}
@keyframes aur-drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.1);
  }
  to {
    transform: translate3d(-7vw, 6vh, 0) scale(0.9);
  }
}
@keyframes aur-drift-c {
  from {
    transform: translate3d(0, 0, 0) scale(0.95);
  }
  to {
    transform: translate3d(-5vw, -9vh, 0) scale(1.2);
  }
}

/* =========================================================
   Scroll progress bar
   ========================================================= */
.aur-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: var(--grad);
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.08s linear;
}

/* =========================================================
   Header — glassmorphism, shrinks on scroll
   ========================================================= */
.aur-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.aur-header.is-scrolled {
  background: var(--glass);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--border);
}
.aur-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  transition: min-height 0.3s var(--ease);
}
.aur-header.is-scrolled .aur-header__inner {
  min-height: 60px;
}
.aur-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.aur-brand__mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 6px 18px -4px var(--glow);
  overflow: hidden;
}
.aur-brand__mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: aur-sheen 4.5s ease-in-out infinite;
}
@keyframes aur-sheen {
  0%,
  60% {
    transform: translateX(-120%);
  }
  80%,
  100% {
    transform: translateX(120%);
  }
}
.aur-brand small {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.aur-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.aur-nav__list {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.aur-nav__list a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
}
.aur-nav__list a::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.aur-nav__list a:hover {
  color: var(--ink);
}
.aur-nav__list a:hover::after {
  transform: scaleX(1);
}

/* controls: theme toggle + burger */
.aur-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    background 0.2s;
}
.aur-iconbtn:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
}
.aur-burger {
  display: none;
}

/* mobile drawer */
.aur-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(82vw, 340px);
  transform: translateX(105%);
  transition: transform 0.4s var(--ease);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  z-index: 90;
  padding: 5rem 1.4rem 2rem;
}
.aur-drawer.is-open {
  transform: translateX(0);
}
.aur-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.aur-drawer__list a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}
.aur-drawer__list a:hover {
  background: var(--surface);
  border-color: var(--border);
}
.aur-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  z-index: 80;
}
.aur-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   Hero
   ========================================================= */
.aur-hero {
  position: relative;
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.4rem, 6vw, 4rem);
}
.aur-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}
.aur-hero__eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 10px var(--brand-2);
  animation: aur-pulse 2s ease-in-out infinite;
}
@keyframes aur-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}
.aur-hero__title {
  font-size: clamp(2rem, 6.4vw, 4rem);
  line-height: 1.12;
  margin: 1.1rem 0 0.8rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.aur-hero__title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aur-hero__lead {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  max-width: 44ch;
  line-height: 1.8;
}
.aur-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* marquee chips */
.aur-marquee {
  margin-top: 2.4rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.aur-marquee__track {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  animation: aur-marquee 32s linear infinite;
}
.aur-marquee:hover .aur-marquee__track {
  animation-play-state: paused;
}
@keyframes aur-marquee {
  to {
    transform: translateX(-50%);
  }
}
.aur-tag {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.aur-tag:hover {
  color: var(--ink);
  border-color: var(--border-2);
}

/* =========================================================
   Buttons
   ========================================================= */
.aur-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--grad);
  color: var(--accent-ink) !important;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px -8px var(--glow);
  overflow: hidden;
  transition:
    transform 0.16s var(--ease),
    box-shadow 0.2s var(--ease);
}
.aur-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}
.aur-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px var(--glow);
}
.aur-btn:hover::before {
  transform: translateX(120%);
}
.aur-btn--ghost {
  background: var(--surface);
  color: var(--ink) !important;
  border-color: var(--border-2);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

/* =========================================================
   Section
   ========================================================= */
.aur-section {
  padding: clamp(2rem, 5vw, 3.4rem) 0;
}
.aur-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.aur-section__title {
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.01em;
}
.aur-section__title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aur-section__more {
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

/* =========================================================
   Card grid — glass + tilt
   ========================================================= */
.aur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.aur-grid--feature {
  grid-template-columns: 1.6fr 1fr 1fr;
}
.aur-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.aur-card::before {
  /* cursor spotlight */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(124, 107, 255, 0.16),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
  pointer-events: none;
}
.aur-card:hover {
  border-color: var(--border-2);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(124, 107, 255, 0.2),
    0 30px 60px -20px var(--glow);
}
.aur-card:hover::before {
  opacity: 1;
}
.aur-card__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-2);
}
.aur-card--lg .aur-card__thumb {
  aspect-ratio: 16/10;
}
.aur-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.aur-card:hover .aur-card__img {
  transform: scale(1.06);
}
.aur-card__img--ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(124, 107, 255, 0.35), transparent 60%),
    radial-gradient(80% 80% at 80% 90%, rgba(34, 211, 238, 0.3), transparent 60%), var(--bg-2);
}
.aur-card__phmark {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.14em;
  font-size: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.aur-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.2rem 1.3rem;
}
.aur-chip {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.24rem 0.7rem;
  text-decoration: none;
}
.aur-card__title {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.005em;
}
.aur-card--lg .aur-card__title {
  font-size: 1.4rem;
}
.aur-card__title a {
  color: var(--ink);
  text-decoration: none;
}
.aur-card__title a:hover {
  color: var(--brand-2);
}
.aur-card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.aur-card__meta {
  margin: 0.2rem 0 0;
  color: var(--faint);
  font-size: 0.78rem;
}

/* =========================================================
   Reveal on scroll
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Single article
   ========================================================= */
.aur-single {
  padding: 2rem 0 3rem;
}
.aur-single__wrap {
  max-width: var(--readw);
  margin: 0 auto;
}
.aur-article__cats {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.aur-article__title {
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  line-height: 1.28;
  font-weight: 900;
  margin: 0.2rem 0 0.9rem;
  letter-spacing: -0.01em;
}
.aur-article__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
}
.aur-article__thumb {
  margin: 1.4rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.aur-article__thumb img {
  width: 100%;
  display: block;
}

/* body typography — mu-plugin injects structure; we style it premium */
.entry-content {
  font-size: 1.08rem;
  line-height: 1.95;
  color: var(--ink);
}
.entry-content > h2 {
  font-size: clamp(1.4rem, 3.6vw, 1.7rem);
  font-weight: 900;
  line-height: 1.4;
  margin: 2.8rem 0 1.1rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid transparent;
  border-image: var(--grad) 1;
  position: relative;
}
.entry-content > h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.entry-content p {
  margin: 0 0 1.3rem;
}
.entry-content a {
  color: var(--brand-2);
  font-weight: 600;
}
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
}
.entry-content li {
  margin: 0.45rem 0;
}
.entry-content ul li::marker {
  color: var(--brand);
}
.entry-content img {
  border-radius: var(--radius-sm);
}
.entry-content strong {
  color: #fff;
  background: linear-gradient(transparent 60%, rgba(124, 107, 255, 0.5) 60%);
  font-weight: 800;
  padding: 0 0.08em;
}
[data-theme='light'] .entry-content strong {
  color: var(--ink);
  background: linear-gradient(transparent 60%, rgba(124, 107, 255, 0.3) 60%);
}
.entry-content blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  color: var(--muted);
}

/* =========================================================
   mu-plugin injected components (contract — do not rename)
   ========================================================= */
/* TOC */
.aiok-toc {
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.aiok-toc__title {
  font-weight: 900;
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.aiok-toc__list {
  margin: 0;
  padding-left: 1.2rem;
}
.aiok-toc__item {
  margin: 0.3rem 0;
}
.aiok-toc__l3 {
  margin-left: 0.9rem;
  font-size: 0.92rem;
  list-style: circle;
}
.aiok-toc a {
  color: var(--ink);
  text-decoration: none;
}
.aiok-toc a:hover {
  color: var(--brand-2);
}

/* Comparison table */
.aiok-table-wrap {
  overflow-x: auto;
  margin: 1.6rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.aiok-compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: var(--surface);
}
.aiok-compare th,
.aiok-compare td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.aiok-compare thead th {
  background: var(--grad-soft);
  font-weight: 800;
  color: var(--ink);
}
.aiok-compare tbody tr:hover {
  background: var(--surface-2);
}
.aiok-compare .is-best,
.aiok-compare tr.is-recommended {
  outline: 2px solid rgba(124, 107, 255, 0.4);
}

/* FAQ */
.aiok-faq {
  margin: 0.9rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.aiok-faq > summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 800;
  list-style: none;
  position: relative;
  padding-right: 2.6rem;
}
.aiok-faq > summary::-webkit-details-marker {
  display: none;
}
.aiok-faq > summary::after {
  content: '+';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--brand-2);
  transition: transform 0.25s var(--ease);
}
.aiok-faq[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.aiok-faq__a {
  padding: 0 1.2rem 1.1rem;
  color: var(--muted);
}

/* CTA block + buttons */
.aiok-cta {
  margin: 2rem 0;
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--border-2);
  text-align: center;
  backdrop-filter: blur(8px);
}
.aiok-cta__title {
  font-weight: 900;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}
.aiok-cta__lead {
  color: var(--muted);
  margin: 0 0 1rem;
}
.aiok-cta__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
}
.aiok-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--grad);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 26px -10px var(--glow);
  transition: transform 0.15s var(--ease);
}
.aiok-btn:hover {
  transform: translateY(-2px);
}
.aiok-btn--ghost {
  background: var(--surface);
  color: var(--ink) !important;
  border: 1px solid var(--border-2);
  box-shadow: none;
}
/* CTA quote lines emitted by mu-plugin */
.aiok-cta-quote {
  margin: 1.4rem 0;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-2);
}
.aiok-cta-item {
  margin: 0.3rem 0;
  font-weight: 700;
}

/* Author box */
.aiok-author {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.aiok-author img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
}
.aiok-author__label {
  font-size: 0.72rem;
  color: var(--faint);
  margin: 0;
  letter-spacing: 0.08em;
}
.aiok-author__name {
  font-weight: 800;
  margin: 0.1rem 0;
}
.aiok-author__bio {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Related */
.aiok-related {
  margin: 2.6rem 0 0;
}
.aiok-related__title {
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0 0 1rem;
}
.aiok-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.aiok-related__card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s;
}
.aiok-related__card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.aiok-related__thumb {
  aspect-ratio: 16/9;
  background: var(--bg-2);
}
.aiok-related__thumb--ph {
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(124, 107, 255, 0.3), transparent 60%),
    radial-gradient(80% 80% at 80% 90%, rgba(34, 211, 238, 0.25), transparent 60%), var(--bg-2);
}
.aiok-related__name {
  padding: 0.8rem 0.9rem;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Breadcrumb */
.aiok-breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
.aiok-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.aiok-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.aiok-breadcrumb a:hover {
  color: var(--brand-2);
}

/* =========================================================
   Footer
   ========================================================= */
.aur-footer {
  position: relative;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(124, 107, 255, 0.05));
}
.aur-footer__inner {
  padding: 3rem 0 1.6rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}
.aur-footer__brand {
  font-weight: 900;
  font-size: 1.2rem;
}
.aur-footer__desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.6rem 0 0;
  max-width: 30rem;
  line-height: 1.8;
}
.aur-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
}
.aur-footer__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.aur-footer__nav a:hover {
  color: var(--ink);
}
.aur-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0 1.8rem;
  color: var(--faint);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* pagination */
.aur-pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 2rem 0 0;
}
.aur-pagination a,
.aur-pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.15s var(--ease);
}
.aur-pagination a:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
}
.aur-pagination .current {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

/* archive/page */
.aur-page {
  padding: 2rem 0 3rem;
}
.aur-page__wrap {
  max-width: var(--readw);
  margin: 0 auto;
}
.aur-archive__head {
  padding: clamp(2rem, 6vw, 3.4rem) 0 0.6rem;
}
.aur-archive__title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  margin: 0;
}
.aur-archive__desc {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .aur-grid,
  .aur-grid--feature {
    grid-template-columns: repeat(2, 1fr);
  }
  .aiok-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .aur-footer__inner {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .aur-nav__list {
    display: none;
  }
  .aur-burger {
    display: inline-grid;
  }
  .aur-grid,
  .aur-grid--feature {
    grid-template-columns: 1fr;
  }
  .aiok-related__grid {
    grid-template-columns: 1fr;
  }
  .aur-card--lg .aur-card__title {
    font-size: 1.25rem;
  }
}

/* =========================================================
   Reduced motion — accessibility
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .aur-aurora::before,
  .aur-aurora::after,
  .aur-aurora span {
    animation: none !important;
  }
}

/* =========================================================
   mu-plugin (ai-income-mediakit) override layer
   mu-plugin は wp_head で <style id="ai-income-mediakit-css"> を後出しし、
   .aiok-* をライト配色でハードコードする。同一詳細度では後勝ちで
   ダーク背景に崩れるため、html[data-theme] プレフィックスで詳細度を上げて
   確実に上書きし、本テーマのトークンでダーク/ライトへ自動追従させる。
   （HTML構造・rel・/go・JSON-LD/OGP には一切触れない＝装飾のみ）
   ========================================================= */
html[data-theme] .aiok-breadcrumb,
html[data-theme] .aiok-breadcrumb a {
  color: var(--muted);
}
html[data-theme] .aiok-breadcrumb a:hover {
  color: var(--brand-2);
}
html[data-theme] .aiok-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}
html[data-theme] .aiok-toc a {
  color: var(--ink);
}
html[data-theme] .aiok-toc a:hover {
  color: var(--brand-2);
}
html[data-theme] .aiok-compare {
  background: var(--surface);
  color: var(--ink);
}
html[data-theme] .aiok-compare th,
html[data-theme] .aiok-compare td {
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
html[data-theme] .aiok-compare thead th {
  background: var(--grad-soft);
  color: var(--ink);
}
html[data-theme] .aiok-compare tbody tr:hover {
  background: var(--surface-2);
}
html[data-theme] .aiok-faq {
  background: var(--surface);
  border: 1px solid var(--border);
}
html[data-theme] .aiok-faq > summary {
  color: var(--ink);
}
html[data-theme] .aiok-faq__a {
  color: var(--muted);
}
html[data-theme] .aiok-cta,
html[data-theme] .aiok-cta-quote {
  background: var(--grad-soft);
  border: 1px solid var(--border-2);
}
html[data-theme] .aiok-cta__title {
  color: var(--ink);
}
html[data-theme] .aiok-cta__lead,
html[data-theme] .aiok-cta-item {
  color: var(--muted);
}
html[data-theme] .aiok-btn {
  background: var(--grad);
  color: #fff;
  border: 1px solid transparent;
}
html[data-theme] .aiok-btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-2);
}
html[data-theme] .aiok-author {
  background: var(--surface);
  border: 1px solid var(--border);
}
html[data-theme] .aiok-author__label {
  color: var(--faint);
}
html[data-theme] .aiok-author__name {
  color: var(--ink);
}
html[data-theme] .aiok-author__bio {
  color: var(--muted);
}
html[data-theme] .aiok-related__card {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}
html[data-theme] .aiok-related__card:hover {
  border-color: var(--border-2);
}
html[data-theme] .aiok-related__title {
  color: var(--ink);
}

/* =========================================================
   Enhancement — 画像主導 & カテゴリ色 & マガジン構成
   （content-flavored placeholder / per-category hue / hero post / sections）
   ========================================================= */

/* content-flavored placeholder（featured 画像が無くても“内容に沿った”見た目） */
.aur-card__img--ph {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.4rem;
  text-align: center;
  padding: 0.8rem;
  background:
    radial-gradient(80% 80% at 22% 14%, hsl(var(--ph-h, 230) 92% 62% / 0.42), transparent 60%),
    radial-gradient(
      80% 80% at 86% 92%,
      hsl(calc(var(--ph-h, 230) + 42) 90% 60% / 0.34),
      transparent 60%
    ),
    var(--bg-2);
}
.aur-ph__label {
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  font-size: 1.05rem;
  line-height: 1.3;
}
.aur-ph__kw {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.14rem 0.65rem;
  border-radius: 9999px;
}

/* カテゴリ色チップ（--ph-h があればカテゴリ色、無ければ既定色） */
.aur-chip {
  background: hsl(var(--ph-h, 230) 80% 60% / 0.16);
  border-color: hsl(var(--ph-h, 230) 80% 62% / 0.4);
  color: var(--ink);
}

/* セクション見出しにカテゴリ色のバー */
.aur-section__title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.aur-section__title::before {
  content: '';
  width: 0.42rem;
  height: 1.05em;
  border-radius: 3px;
  background: hsl(var(--ph-h, 230) 85% 62%);
  box-shadow: 0 0 14px hsl(var(--ph-h, 230) 85% 62% / 0.5);
}

/* 注目記事ヒーロー（画像主導・大） */
.aur-hpost {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.aur-hpost:hover {
  border-color: var(--border-2);
  box-shadow:
    var(--shadow),
    0 30px 60px -20px var(--glow);
}
.aur-hpost__media {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  display: block;
}
.aur-hpost__media .aur-hpost__img,
.aur-hpost__media .aur-card__img--ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aur-hpost__img {
  transition: transform 0.6s var(--ease);
}
.aur-hpost:hover .aur-hpost__img {
  transform: scale(1.05);
}
.aur-hpost__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  justify-content: center;
}
.aur-hpost__body .aur-chip {
  align-self: flex-start;
}
.aur-hpost__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--brand-2);
}
.aur-hpost__title {
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.aur-hpost__excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.aur-hpost__more {
  font-weight: 800;
  color: var(--brand-2);
}
.aur-catsec {
  padding-top: 1rem;
}
@media (max-width: 820px) {
  .aur-hpost {
    grid-template-columns: 1fr;
  }
  .aur-hpost__media {
    min-height: 200px;
    aspect-ratio: 16/9;
  }
}

/* =========================================================
   Recirculation — 収益回遊「次に読む」(inc/recirculation.php・既定OFF)
   ========================================================= */
.aur-recirc {
  margin-top: 2.5rem;
}
.aur-recirc__lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -0.4rem 0 1.1rem;
}
.aur-recirc__grid {
  align-items: start;
}
/* 記事本文幅（--readw）内では2列に落として窮屈さを避ける。 */
.aur-single .aur-recirc__grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 640px) {
  .aur-single .aur-recirc__grid {
    grid-template-columns: 1fr;
  }
}
.aur-recirc__item {
  position: relative;
}
.aur-recirc__reason {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: var(--grad);
  box-shadow: var(--shadow-glow);
  pointer-events: none;
}
.aur-recirc__item--rev .aur-recirc__reason {
  background: linear-gradient(120deg, #f472b6 0%, #7c6bff 100%);
}
.aur-recirc--picks {
  margin: 0 0 2rem;
}
