/*
Theme Name: Aoi Ei
Theme URI: https://github.com/junichimanga/aoi_ei
Author: junichimanga
Author URI: https://github.com/junichimanga
Description: AI character 蒼井 詠 official website theme. Mobile-width centered layout with dark & mysterious design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aoi-ei
Tags: dark, blog, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
  --color-bg: #080808;
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-bg-card-hover: rgba(255, 255, 255, 0.06);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(37, 99, 235, 0.3);
  --color-accent: #2563EB;
  --color-accent-light: #60A5FA;
  --color-accent-deep: #1D4ED8;
  --color-text: #E2E8F0;
  --color-text-sub: #94A3B8;
  --color-text-heading: #FFFFFF;
  --color-code-bg: #0F172A;
  --font-sans: 'Zen Kaku Gothic Antique', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mobile-width: 375px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --glow-accent: 0 0 30px rgba(37, 99, 235, 0.15);
  --glow-text: 0 0 40px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   2. Reset / Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: 56px;
}

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

h1 {
  font-size: 1.75rem;
  text-shadow: var(--glow-text);
}

h2 {
  font-size: 1.375rem;
}

h3 {
  font-size: 1.125rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5em;
  word-break: break-word;
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-sub);
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  background: var(--color-code-bg);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: var(--color-code-bg);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* ==========================================================================
   4. Desktop Background & Mobile-Width Shell
   ========================================================================== */

/* PC background image layer */
.desktop-bg {
  display: none;
}

/* The main content shell — always mobile width */
.site-shell {
  width: 100%;
  max-width: var(--mobile-width);
  margin: 0 auto;
  min-height: calc(100vh - 56px);
  background: var(--color-bg);
  position: relative;
  z-index: 1;
}

.container {
  padding: 0 1rem;
}

.content-area {
  padding: 2rem 0;
}

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

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--color-text-sub);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Sidebars & notch hidden on mobile */
.phone-notch,
.sidebar-left,
.sidebar-right {
  display: none;
}

.site-layout {
  width: 100%;
}

/* Desktop: full-width header + phone frame + sidebars */
@media (min-width: 540px) {

  body {
    overflow: hidden;
    height: 100vh;
    padding-top: 0;
    background: #000;
  }

  /* Full-screen background image */
  .desktop-bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .desktop-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }

  /* ── Global Header: full-width bar at top ── */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    max-width: none;
    z-index: 1100;
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  .primary-nav {
    display: block;
  }

  .primary-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .primary-nav a {
    color: var(--color-text-sub);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition);
  }

  .primary-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
  }

  .primary-nav a:hover,
  .primary-nav .current-menu-item a {
    color: var(--color-text-heading);
  }

  .primary-nav a:hover::after,
  .primary-nav .current-menu-item a::after {
    width: 100%;
  }

  .menu-toggle {
    display: none;
  }

  /* Mobile menu hidden on desktop (use primary-nav instead) */
  .mobile-menu {
    display: none !important;
  }

  /* ── 3-column layout wrapper (below header) ── */
  .site-layout {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    pointer-events: none;
  }

  .site-layout > * {
    pointer-events: auto;
  }

  /* ── Phone frame — iPhone-like aspect ratio ── */
  .site-shell {
    width: var(--mobile-width);
    height: min(85vh, 812px);
    min-height: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 44px;
    border: 6px solid #1a1a1a;
    box-shadow:
      0 0 0 2px #333,
      0 25px 80px rgba(0, 0, 0, 0.6),
      0 0 120px rgba(37, 99, 235, 0.08);
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
  }

  .site-shell::-webkit-scrollbar {
    display: none;
  }

  /* Phone notch (Dynamic Island style) */
  .phone-notch {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1002;
    text-align: center;
    padding-top: 8px;
    background: var(--color-bg);
  }

  .phone-notch::before {
    content: '';
    display: inline-block;
    width: 100px;
    height: 24px;
    background: #111;
    border-radius: 14px;
  }

  /* ── Left Sidebar ── */
  .sidebar-left {
    display: flex;
    align-items: center;
    width: 220px;
    flex-shrink: 0;
    margin-right: 2.5rem;
  }

  .sidebar-left-inner {
    position: sticky;
    top: 50%;
    text-align: right;
    width: 100%;
  }

  .sidebar-logo {
    margin-bottom: 1.25rem;
  }

  .sidebar-logo img {
    max-width: 160px;
    height: auto;
    margin-left: auto;
  }

  .sidebar-site-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-heading);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  }

  .sidebar-profile {
    margin-bottom: 1.5rem;
  }

  .sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: auto;
    margin-bottom: 1rem;
    border: 2px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
  }

  .sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .sidebar-catchphrase {
    margin-bottom: 0.75rem;
  }

  .sidebar-catchphrase p {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text-heading);
    text-shadow: var(--glow-text), 0 2px 12px rgba(0, 0, 0, 0.6);
    line-height: 1.3;
    margin-bottom: 0;
  }

  .sidebar-desc p {
    font-size: 0.8125rem;
    color: var(--color-text-sub);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    margin-bottom: 0;
  }

  .sidebar-sns-left .footer-sns {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
  }

  .sidebar-sns-left .sns-icon {
    width: 28px;
    height: 28px;
    color: var(--color-text-sub);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
    transition: color var(--transition), transform var(--transition);
  }

  .sidebar-sns-left .sns-icon:hover {
    color: var(--color-accent-light);
    transform: translateY(-2px);
  }

  .sidebar-sns-left .sns-icon svg {
    width: 16px;
    height: 16px;
  }

  /* ── Right Sidebar ── */
  .sidebar-right {
    display: flex;
    align-items: center;
    width: 200px;
    flex-shrink: 0;
    margin-left: 2.5rem;
  }

  .sidebar-right-inner {
    position: sticky;
    top: 50%;
    width: 100%;
  }

  .sidebar-section-title {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-light);
    text-shadow: 0 0 8px rgba(37, 99, 235, 0.3);
    margin-bottom: 0.75rem;
  }

  .sidebar-nav {
    margin-bottom: 1.75rem;
  }

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

  .sidebar-nav li {
    margin-bottom: 0.75rem;
  }

  .sidebar-nav a {
    color: var(--color-text-sub);
    font-size: 0.8125rem;
    font-weight: 500;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    transition: color var(--transition);
    position: relative;
    padding-left: 1rem;
  }

  .sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 6px var(--color-accent);
    opacity: 0;
    transition: opacity var(--transition);
  }

  .sidebar-nav a:hover {
    color: var(--color-accent-light);
  }

  .sidebar-nav a:hover::before {
    opacity: 1;
  }

  /* Recent posts */
  .sidebar-recent {
    margin-bottom: 1.75rem;
  }

  .sidebar-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .sidebar-recent-list a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    transition: opacity var(--transition);
  }

  .sidebar-recent-list a:hover {
    opacity: 0.8;
  }

  .sidebar-recent-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .sidebar-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .sidebar-recent-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .sidebar-recent-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sidebar-recent-list time {
    font-size: 0.625rem;
    color: var(--color-text-sub);
  }

  .sidebar-sns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .sidebar-sns .footer-sns {
    flex-direction: column;
    gap: 0.75rem;
  }

  .sidebar-sns .sns-icon {
    color: var(--color-text-sub);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
  }

  .sidebar-sns .sns-icon:hover {
    color: var(--color-accent-light);
  }
}

/* Hide sidebars on smaller desktops where they don't fit */
@media (min-width: 540px) and (max-width: 959px) {
  .sidebar-left,
  .sidebar-right {
    display: none;
  }
}

/* ==========================================================================
   5. Accent Line (Remotion motif)
   ========================================================================== */

.accent-line {
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  box-shadow: 0 0 12px var(--color-accent);
  border-radius: 1px;
}

.accent-line--short {
  width: 60px;
  margin: 0.75rem auto;
}

.accent-line--full {
  width: 100%;
}

/* ==========================================================================
   6. Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.site-branding a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-text-heading);
}

.site-branding a:hover {
  color: var(--color-accent-light);
}

.custom-logo {
  width: var(--logo-width, 120px);
  height: auto;
  object-fit: contain;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-tagline {
  display: none;
}

/* Primary Navigation — always hidden on mobile-width layout, use hamburger */
.primary-nav {
  display: none;
}

/* Header SNS Icons — compact row */
.header-sns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sns-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-text-sub);
  transition: color var(--transition);
}

.sns-icon:hover {
  color: var(--color-accent-light);
}

.sns-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Overlay — fills the shell, not the screen */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  width: 100%;
  bottom: 0;
  background: rgba(8, 8, 8, 0.98);
  z-index: 999;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.mobile-menu.is-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu ul {
  text-align: center;
}

.mobile-menu li {
  margin-bottom: 1.25rem;
}

.mobile-menu a {
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 500;
}

.mobile-menu a:hover {
  color: var(--color-accent-light);
}

.mobile-sns {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}

/* ==========================================================================
   7. Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 8, 8, 0.3), var(--color-bg));
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

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

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-shadow: var(--glow-text);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-sub);
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

.hero-cta:hover {
  background: var(--color-accent-deep);
  color: #fff;
  box-shadow: var(--glow-accent);
}

/* ==========================================================================
   8. Cards (Post, Video, Product)
   ========================================================================== */

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--glow-accent);
  border-color: var(--color-border-hover);
}

.card-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.card:hover .card-thumbnail img {
  transform: scale(1.03);
}

.card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.card-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--color-text-heading);
}

.card-title a:hover {
  color: var(--color-accent-light);
}

.card-excerpt {
  font-size: 0.8125rem;
  color: var(--color-text-sub);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--color-text-sub);
}

/* Video Card */
.video-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.video-card:hover {
  box-shadow: var(--glow-accent);
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-embed iframe,
.video-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-card-title {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Product Card */
.product-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--glow-accent);
}

.product-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-card-desc {
  font-size: 0.8125rem;
  color: var(--color-text-sub);
  margin-bottom: 0.75rem;
  flex: 1;
}

.product-card-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-accent-light);
  margin-bottom: 0.75rem;
}

.product-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.product-card-cta:hover {
  background: var(--color-accent-deep);
  color: #fff;
}

/* ==========================================================================
   9. Single Post
   ========================================================================== */

.single-post-thumbnail {
  margin: 0 -1rem;
  overflow: hidden;
}

.single-post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.single-post-header {
  text-align: center;
  padding: 1.75rem 0 1.25rem;
}

.single-post-cats {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

.single-post-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.875rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-sub);
}

.single-post-reading-time {
  position: relative;
  padding-left: 0.75rem;
}

.single-post-reading-time::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-sub);
}

.single-post-content {
  padding: 1.5rem 0 1rem;
  line-height: 1.9;
}

.single-post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--color-border);
}

.single-post-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.single-post-content p {
  margin-bottom: 1.5em;
}

.single-post-content ul,
.single-post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5em;
}

.single-post-content ul {
  list-style: disc;
}

.single-post-content ol {
  list-style: decimal;
}

.single-post-content li {
  margin-bottom: 0.5em;
}

.single-post-content img {
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

.single-post-content a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.3);
  transition: text-decoration-color var(--transition);
}

.single-post-content a:hover {
  text-decoration-color: var(--color-accent-light);
}

.single-post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-sub);
  font-style: italic;
}

.single-post-content pre {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.single-post-content code {
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.single-post-content pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

/* Tags */
.single-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}

.tag-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-accent-light);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  transition: background var(--transition), border-color var(--transition);
}

.tag-badge:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--color-accent-light);
}

/* Share */
.single-post-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
}

.share-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-sub);
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-sub);
  transition: all var(--transition);
}

.share-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.share-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Post Navigation */
.post-navigation {
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.post-nav-link:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.06);
}

.post-nav-next {
  justify-content: flex-end;
  text-align: right;
}

.nav-arrow {
  font-size: 1rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.post-navigation .nav-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-sub);
}

.nav-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   10. Page Templates
   ========================================================================== */

/* About Page */
.about-hero {
  padding: 2rem 0;
  text-align: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto 2rem;
}

.about-profile h1 {
  margin-bottom: 0.5rem;
}

.about-profile .about-subtitle {
  color: var(--color-accent-light);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.about-catchphrase {
  font-size: 1.0625rem;
  color: var(--color-text-heading);
  padding: 1.25rem;
  background: var(--color-bg-card);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  text-shadow: var(--glow-text);
  text-align: left;
}

/* Videos Page */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* Products Page */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* ==========================================================================
   11. Sidebar & Widgets
   ========================================================================== */

.widget-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.widget {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.widget-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.widget a {
  color: var(--color-text-sub);
  font-size: 0.8125rem;
}

.widget a:hover {
  color: var(--color-accent-light);
}

/* Search Widget */
.search-form {
  display: flex;
  gap: 0;
}

.search-form .search-field {
  flex: 1;
  padding: 0.625rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--color-text);
  outline: none;
  font-size: 0.875rem;
}

.search-form .search-field:focus {
  border-color: var(--color-accent);
}

.search-form .search-submit {
  padding: 0.625rem 0.75rem;
  background: var(--color-accent);
  color: #fff;
  border: 1px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background var(--transition);
}

.search-form .search-submit:hover {
  background: var(--color-accent-deep);
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0 1.5rem;
}

.footer-inner {
  padding: 0 1rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.25rem;
}

.footer-brand {
  text-align: center;
}

.footer-brand .site-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.footer-brand .footer-desc {
  color: var(--color-text-sub);
  font-size: 0.8125rem;
}

.footer-sns {
  display: flex;
  gap: 1rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.footer-nav a {
  color: var(--color-text-sub);
  font-size: 0.8125rem;
}

.footer-nav a:hover {
  color: var(--color-accent-light);
}

.footer-bottom {
  text-align: center;
  color: var(--color-text-sub);
  font-size: 0.75rem;
}

/* ==========================================================================
   13. SNS Feed Section
   ========================================================================== */

.sns-feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.sns-feed-grid .wp-block-embed {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
}

/* ==========================================================================
   14. Buttons & UI Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-deep);
  color: #fff;
  box-shadow: var(--glow-accent);
}

.btn-outline {
  border: 1px solid var(--color-accent);
  color: var(--color-accent-light);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent-light);
}

.read-more::after {
  content: '\2192';
  transition: transform var(--transition);
}

.read-more:hover::after {
  transform: translateX(4px);
}

/* Category Badge */
.cat-badge {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-accent-light);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   15. Character Banner
   ========================================================================== */

.character-banner {
  position: relative;
  height: 40vh;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.character-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  z-index: 0;
}

.character-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    rgba(8, 8, 8, 0.35) 25%,
    rgba(8, 8, 8, 0.35) 75%,
    var(--color-bg) 100%
  );
}

.character-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.character-banner-quote {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-heading);
  text-shadow: var(--glow-text);
  margin-bottom: 0;
}

/* ==========================================================================
   16. 404 Page
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: 5rem 1rem;
}

.error-404 h1 {
  font-size: 4rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  text-shadow: var(--glow-text);
}

.error-404 p {
  color: var(--color-text-sub);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   17. Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  padding: 2rem 0;
}

.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-sub);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ==========================================================================
   18. Animations
   ========================================================================== */

/* Fade in up (default) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
.fade-in-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.fade-in-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale fade */
.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children — add .stagger to parent */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.08s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.16s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.24s; }
.stagger > .fade-in:nth-child(5) { transition-delay: 0.32s; }
.stagger > .fade-in:nth-child(6) { transition-delay: 0.4s; }

/* Glow pulse */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.glow-pulse {
  animation: pulse-glow 4s ease-in-out infinite;
}

/* Accent line draw animation */
.accent-line--animated {
  width: 0;
  transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.accent-line--animated.is-visible {
  width: 60px;
}

/* Hover lift effect for cards */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Sidebar entrance (desktop) */
@keyframes sidebar-enter-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes sidebar-enter-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (min-width: 960px) {
  .sidebar-left-inner {
    animation: sidebar-enter-left 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.3s both;
  }

  .sidebar-right-inner {
    animation: sidebar-enter-right 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.5s both;
  }
}

/* Phone frame entrance */
@keyframes phone-enter {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 540px) {
  .site-shell {
    animation: phone-enter 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.1s both;
  }
}

/* ==========================================================================
   19. Archive / Search
   ========================================================================== */

.archive-header,
.search-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.archive-header h1,
.search-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.archive-description,
.search-header p {
  color: var(--color-text-sub);
  font-size: 0.8125rem;
}

/* ==========================================================================
   20. Post List (Articles Page)
   ========================================================================== */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-border);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-list-item {
  background: var(--color-bg);
}

.post-list-link {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1rem;
  transition: background var(--transition);
}

.post-list-link:hover {
  background: var(--color-bg-card);
}

.post-list-thumbnail {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.post-list-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.post-list-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.post-list-meta time {
  font-size: 0.6875rem;
  color: var(--color-text-sub);
}

.post-list-meta .cat-badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
}

.post-list-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.375rem;
  color: var(--color-text-heading);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-list-excerpt {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-list-item .read-more {
  font-size: 0.6875rem;
  align-self: flex-start;
}
