@charset "UTF-8";
/*
Theme Name: Cipher
Theme URI: https://gadget-touch.info/
Author: KATO Mizuki
Description: 2026年版ガジェットタッチのブログテーマ。
Version: 1.0.0
Text Domain: cipher
*/

/* ==========================================================================
   Table of Contents
   1. Tokens / Reset / Container
   2. Header / Nav / Header Search
   3. Intro Hero
   4. Featured / Hero Section
   5. Latest Grid / Article Card
   6. Footer
   7. Header Expanded Menu (Drawer)
   8. Responsive (global)
   9. Single - Breadcrumb / Article Head / Share Bar / Body / Footer / Related
   10. Single - Block Styles (callout / box variants / quote / table / code)
   11. Single - Commerce Cards / Smart Link / About Link Box
   12. Article Responsive
   13. Reading Progress / Toast
   14. Archive Hero / Search / Page / 404
   15. Futaba Review Box (move to Futaba plugin CSS, then remove)
   16. Custom Scrollbar
   ========================================================================== */

:root {
  --primary: #1F1F1F;
  --secondary: #6B6B6B;
  --tertiary: #E74C3C;
  --tertiary-gradient: linear-gradient(135deg, var(--tertiary) 0%, #f79568 45%);
  --neutral: #F7F8FA;
  --surface: #FFFFFF;
  --surface-warm: #FFF7F4;
  --border: #E5E7EB;
  --accent-soft: #FFEFE3;
  --muted: #F0F0F0;
  --link: #2563EB;
  --on-tertiary: #FFFFFF;
  --border-secondary: rgba(31, 31, 31, 0.2);
  --color-amazon: #f90;
  --color-rakuten: #bf0000;
  --color-yahoo: #FF0027;
  --color-docomo: #c03;
  --color-au: #eb5505;
  --color-sb: #949599;
  --color-line: #00B900;
  --color-twitter: #0F1419;
  --color-fb: #1777f2;
  --color-ig: linear-gradient(135deg, #427eff 0%, #f13f79 70%);
  --color-blue: #007EE5;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 9999px;

  --max-w: 1200px;

  --ff-jp: 'Noto Sans JP', "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  --ff-en: 'Inter', 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }
html { height: 100%; }
html { margin: 0; padding: 0; scrollbar-gutter: stable; }
body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--neutral);
  color: var(--primary);
  font-family: var(--ff-jp);
  font-size: 16px;
  line-height: 1.625;
  letter-spacing: .75px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}
body > main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────── HEADER ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(48px) saturate(2.2) brightness(1.05);
  -webkit-backdrop-filter: blur(48px) saturate(2.2) brightness(1.05);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.logo-heading { display: contents; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--ff-jp);
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}
.logo-mark {
  width: 50px; height: 50px;
  flex: none;
  display: block;
}
.logo-text { display: inline-flex; flex-direction: column; line-height: 1; gap: 3px; }
.logo-ja { font-size: 17px; font-weight: 700; }
.logo-en { font-family: var(--ff-en); font-size: 10px; font-weight: 500; color: var(--secondary); text-transform: uppercase; }

/* Primary nav — WordPress wp_nav_menu() outputs ul > li > a */
.nav {
  display: flex;
  align-items: center;
  justify-self: right;
}
.nav ul {
  display: contents;
  list-style: none;
  margin: 0; padding: 0;
}
.nav li { list-style: none; position: relative; }
.nav li > a {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  transition: background .15s ease, color .15s ease;
}
.nav li > a:hover { background: var(--accent-soft); color: var(--tertiary); }
.nav li.current-menu-item > a,
.nav li.current-page-ancestor > a { color: var(--tertiary); }
.nav li.current-menu-item > a::after,
.nav li.current-page-ancestor > a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--tertiary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  width: 96px;
  padding: 0 18px 0 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--secondary);
  transition: border-color .15s ease, box-shadow .15s ease, width .25s ease;
}
.header-search:hover {
  border-color: #e74c3c;
}
.header-search.is-open {
  border-color: var(--tertiary);
  box-shadow: 0 0 0 4px rgba(231,76,60,0.08);
  color: var(--primary);
  width: 280px;
}
.header-search svg { flex: none; color: var(--secondary); }
.header-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, max-width .25s ease;
}
.header-search.is-open input {
  max-width: 180px;
  opacity: 1;
  pointer-events: auto;
}
.header-search input::placeholder { color: var(--secondary); }
.header-search kbd {
  font-family: var(--ff-en);
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  background: var(--muted);
  border-radius: 6px;
  padding: 2px 6px;
  flex: none;
  transition: opacity .15s ease;
}
.header-search.is-open kbd {
  opacity: 0;
  pointer-events: none;
}
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  color: var(--primary);
  transition: background .15s ease;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--tertiary); }
.menu-btn { display: none; }
.menu-btn__close { display: none; }
.drawer-open .menu-btn__open  { display: none; }
.drawer-open .menu-btn__close { display: block; }

/* ─── INTRO HERO ─── */
.intro {
  padding: 56px 0 24px;
  position: relative;
}
.intro-title {
  display: block;
  margin: 0 0 20px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.25;
  background: var(--tertiary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.intro-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.95;
  color: var(--secondary);
  max-width: 560px;
}

/* ─── HERO SECTION (featured) ─── */
.hero-section { padding: 40px 0 24px; }
.hero-section a h3 { transition: color 0.2s ease; }
.hero-section a:hover h3 { color: #e74c3c; }
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}
.section-heading .accent {
  width: 4px; height: 22px;
  background: var(--tertiary);
  border-radius: 2px;
  align-self: center;
}
.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}
.section-heading .en {
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  text-transform: uppercase;
}
.section-heading .more {
  margin-left: auto;
  font-size: 13px;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease;
}
.section-heading .more:hover { color: var(--tertiary); }

.featured-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}
.featured-right {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -20px rgba(31,31,31,0.25); }
.feature-card .media { aspect-ratio: 16/10; }
.feature-card.hero .media { aspect-ratio: 16/10; }
.feature-card .body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.feature-card.hero .body { padding: 20px 22px 22px; gap: 10px; }
.feature-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--primary);
}
.feature-card.hero h3 {
  font-size: 19px;
  line-height: 1.5;
}
.feature-card .excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feature-card.hero .excerpt { font-size: 13px; -webkit-line-clamp: 2; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--border);
}
.chip.accent {
  background: var(--accent-soft);
  color: var(--tertiary);
  border-color: transparent;
  font-weight: 700;
}
.chip-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  font-family: var(--ff-en);
  font-size: 12px;
  color: var(--secondary);
  font-weight: 500;
}
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }
.meta .views, .meta .comments {
  display: inline-flex; align-items: center; gap: 4px;
}

/* Placeholder media — subtle wave pattern */
.media {
  position: relative;
  background: var(--surface-warm);
  overflow: hidden;
}
.media::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(231,76,60,0.08), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255,239,227,0.9), transparent 50%);
}
.media::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -20deg,
    transparent 0 14px,
    rgba(31,31,31,0.03) 14px 15px
  );
}
.media .label {
  position: absolute;
  left: 16px; bottom: 16px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: rgba(31,31,31,0.45);
  padding: 4px 10px;
  background: rgba(255,255,255,0.75);
  border-radius: 6px;
  z-index: 2;
}
.media .cat {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  color: var(--tertiary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}
.media[class*="variant-"] {
  background: var(--variant-color, var(--surface-warm));
}
.media[class*="variant-"]::before {
  background-image: var(
    --variant-overlay,
    radial-gradient(ellipse at 20% 30%, rgba(231,76,60,0.08), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255,239,227,0.9), transparent 50%)
  );
}
.media.variant-b {
  --variant-color: #EFE9E4;
  --variant-overlay: radial-gradient(ellipse at 70% 30%, rgba(31,31,31,0.05), transparent 60%);
}
.media.variant-c {
  --variant-color: #F0F0F0;
  --variant-overlay: radial-gradient(ellipse at 30% 70%, rgba(37,99,235,0.07), transparent 60%);
}
.media.variant-d { --variant-color: #FFF4EC; }
.media.variant-e { --variant-color: #F2F4F1; }

/* Actual post thumbnail overrides the placeholder gradient */
.media.has-thumbnail {
  background: var(--muted);
}
.media.has-thumbnail::before,
.media.has-thumbnail::after {
  display: none;
}
.media.has-thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.media.has-thumbnail .label { display: none; }

/* Horizontal feature variant (right column) */
.feature-card.horizontal {
  flex-direction: row;
  align-items: stretch;
}
.feature-card.horizontal .media {
  flex: 0 0 38%;
  aspect-ratio: auto;
  min-height: 100%;
}
.feature-card.horizontal .body { padding: 14px 18px; gap: 6px; }
.feature-card.horizontal h3 {
  font-size: 14.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feature-card.horizontal .excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.7;
  color: var(--secondary);
  margin-top: 4px;
}
.feature-card.horizontal .chip-row { display: none; }
.feature-card.horizontal .media .cat {
  top: 8px; left: 8px;
  font-size: 10px;
  padding: 3px 8px;
}
.feature-card.horizontal .media .label { display: none; }

/* ───────── LATEST GRID ───────── */
.latest-section { padding: 48px 0 24px; }

.latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: fadeUp .4s ease both;
}
.article-card:nth-child(2)  { animation-delay:  30ms; }
.article-card:nth-child(3)  { animation-delay:  60ms; }
.article-card:nth-child(4)  { animation-delay:  90ms; }
.article-card:nth-child(5)  { animation-delay: 120ms; }
.article-card:nth-child(6)  { animation-delay: 150ms; }
.article-card:nth-child(7)  { animation-delay: 180ms; }
.article-card:nth-child(8)  { animation-delay: 210ms; }
.article-card:nth-child(9)  { animation-delay: 240ms; }
.article-card:nth-child(10) { animation-delay: 270ms; }
.article-card:nth-child(11) { animation-delay: 300ms; }
.article-card:nth-child(12) { animation-delay: 330ms; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -22px rgba(31,31,31,0.22); }
.article-card:hover h3 { color: var(--tertiary); }
.article-card .media { aspect-ratio: 3/2; }
.article-card .body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.article-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 700;
  color: var(--primary);
  transition: color .3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card .meta { margin-top: auto; font-size: 11px; }

.no-posts {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--secondary);
  font-size: 15px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--ff-en);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.page-btn:hover {
  border-color: var(--tertiary);
  color: var(--tertiary);
}
.page-btn.is-current {
  background: var(--tertiary);
  color: var(--on-tertiary);
  border-color: var(--tertiary);
  font-weight: 700;
}
.page-btn.is-current:hover { filter: brightness(1.04); color: var(--on-tertiary); }
.page-btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}
.page-arrow { padding: 0; }
.page-ellipsis {
  font-family: var(--ff-en);
  color: var(--secondary);
  padding: 0 6px;
  font-size: 14px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--tertiary);
  border: 1px solid var(--tertiary);
  font-weight: 700;
  font-size: 14px;
  transition: background .15s ease;
}
.btn-secondary:hover { background: var(--accent-soft); }

/* ───────── FOOTER ───────── */
.site-footer {
  margin-top: 72px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
}
.site-footer.is-secondary {
  background: var(--secondary);
  border-top-color: transparent;
  color: #fff;
}
.site-footer.is-secondary .footer-grid { border-bottom-color: rgba(255,255,255,.15); }
.site-footer.is-secondary .footer-brand h4 { color: #fff; }
.site-footer.is-secondary .footer-brand p { color: rgba(255,255,255,.85); }
.site-footer.is-secondary .footer-col h5 { color: rgba(255,255,255,.6); }
.site-footer.is-secondary .footer-col a {
  color: rgba(255,255,255,.9);
  border-bottom-color: transparent;
}
.site-footer.is-secondary .footer-col a:hover {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.65);
}
.site-footer.is-secondary .social-btn {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}
.site-footer.is-secondary .social-btn:hover {
  background: var(--tertiary);
  border-color: transparent;
  color: #fff;
}
.site-footer.is-secondary .footer-bottom {
  color: rgba(255,255,255,.7);
  border-top-color: rgba(255,255,255,.15);
}
.site-footer.is-secondary .footer-bottom a { color: rgba(255,255,255,.8); }
.site-footer.is-secondary .footer-bottom a:hover { color: #fff; }
.site-footer.is-secondary .logo { color: #fff; }
.site-footer.is-secondary .logo-ja,
.site-footer.is-secondary .logo-en { color: #fff; }
/* 旧: grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; */
.footer-grid {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-right {
  display: flex;
  flex-direction: column;
}
.footer-right .footer-col {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.footer-right .footer-col:first-child { padding-top: 0; }
.footer-right .footer-col:last-child { border-bottom: none; padding-bottom: 0; }
.footer-right .footer-col ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-brand h4 {
  margin: 16px 0 10px;
  font-size: 16px;
  font-weight: 700;
}
.footer-brand p {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--secondary);
  max-width: 320px;
}
.socials {
  display: flex;
  gap: 8px;
}
.social-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.social-btn:hover {
  background: var(--accent-soft);
  color: var(--tertiary);
  border-color: transparent;
}
.social-btn--twitter:hover   { background: #000; color: #fff; border-color: transparent; }
.social-btn--instagram:hover { background: var(--color-ig); color: #fff; border-color: transparent; }
.social-btn--note:hover      { background: #000; color: #fff; border-color: transparent; }

.footer-col h5 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  font-family: var(--ff-en);
}
/* Footer nav — wp_nav_menu() renders ul > li > a */
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col li { list-style: none; }
.footer-col a {
  font-size: 13px;
  color: var(--secondary);
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.footer-col a:hover { color: var(--tertiary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 12px;
  color: var(--secondary);
  font-family: var(--ff-en);
}

/* ───────── HEADER EXPANDED MENU ───────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.header-expanded-wrapper {
  position: fixed;
  top: 72px; left: 0; right: 0;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(48px) saturate(2.2) brightness(1.05);
  -webkit-backdrop-filter: blur(48px) saturate(2.2) brightness(1.05);
  z-index: 70;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.header-expanded-inner .drawer-search { display: none; }
@media (max-width: 768px) {
  .header-expanded-inner .drawer-search { display: flex; }
}
.header-expanded-inner {
  overflow-y: auto;
  overscroll-behavior: contain;
  height: 100%;
  max-width: calc(var(--read-w) + 48px);
  margin: 0 auto;
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
.drawer-open { overflow: hidden; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-open .header-expanded-wrapper { clip-path: inset(0); pointer-events: auto; }
.drawer-open .site-header { border-bottom-color: transparent; }
/* Expanded nav — wp_nav_menu() renders ul > li > a */
.header-expanded-inner nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.header-expanded-inner nav li { list-style: none; }
.header-expanded-inner nav li > a {
  display: block;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--r-sm);
  color: var(--primary);
  transition: background .15s ease, color .15s ease;
}
.header-expanded-inner nav li > a:hover { background: var(--accent-soft); color: var(--tertiary); }
.header-expanded-inner nav li.current-menu-item > a { color: var(--tertiary); background: var(--accent-soft); }
.drawer-search {
  display: flex; align-items: center; gap: 8px;
  height: 44px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}
.drawer-search input { border: none; outline: none; background: transparent; flex: 1; font: inherit; font-size: 14px; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 16px; }

/* ─── MAGAZINE SECTION ─── */
.magazine-section { padding: 48px 0; }

.magazine-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.magazine-scroll::-webkit-scrollbar { display: none; }

.magazine-card {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-snap-align: start;
}
.magazine-card .media.has-thumbnail img {
  position: static;
  width: 100%;
  height: auto;
  display: block;
}

.magazine-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.magazine-lead {
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.5;
  margin: 0;
}
.magazine-card h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  transition: color 0.2s ease;
}
.magazine-card:hover h3 { color: var(--tertiary); }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 1024px) {
  .intro { padding: 40px 0 16px; }
  .intro-title { font-size: 36px; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-right { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); }
  .latest-grid { grid-template-columns: repeat(3, 1fr); }
  .nav { display: none; }
  .header-actions { grid-column: 3; }
  .menu-btn { display: grid; }
}
@media (max-width: 768px) {
  .intro { padding: 28px 0 8px; }
  .intro-title { font-size: 26px; }
  .intro-desc { font-size: 14px; line-height: 1.85; }
  .header-inner { grid-template-columns: auto 1fr auto; gap: 12px; }
  .header-search { display: none; }
  .hero-section { padding: 20px 0 8px; }
  .feature-card.horizontal .excerpt { display: none; }
  .section-heading h2 { font-size: 18px; }
  .section-heading { margin-bottom: 16px; }

  .featured-grid { gap: 12px; }
  .feature-card.hero .media { aspect-ratio: 16/9; }
  .feature-card.hero .body { padding: 14px 16px 16px; gap: 8px; }
  .feature-card.hero h3 { font-size: 15.5px; line-height: 1.5; }
  .feature-card.hero .excerpt { display: none; }
  .feature-card.hero .chip-row { display: none; }
  .feature-card.hero .meta { margin-top: 2px; font-size: 11px; }

  .featured-right { grid-template-columns: 1fr; gap: 8px; }
  .feature-card.horizontal { border-radius: var(--r-md); }
  .feature-card.horizontal .media { flex: 0 0 34%; aspect-ratio: auto; }
  .feature-card.horizontal .body { padding: 10px 14px; }
  .feature-card.horizontal h3 { font-size: 13px; -webkit-line-clamp: 2; }
  .feature-card.horizontal .meta { font-size: 10.5px; gap: 8px; }

  .latest-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .article-card .body { padding: 14px 16px 16px; }
  .article-card h3 { font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .magazine-section { padding: 28px 0; }
  .magazine-card { flex: 0 0 60vw; }
  .latest-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 28px; }
  .logo-mark { width: 50px; height: 50px; }
}

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 9. Single - Article Page ===== */

:root {
  --read-w: 820px;
  --ff-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

/* ===== 9. Single - Breadcrumb ===== */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 12px;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-en);
}
.breadcrumb a { transition: color .15s ease; }
.breadcrumb a:hover { color: var(--tertiary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--primary); font-weight: 500; font-family: var(--ff-jp); }

/* ===== 9. Single - Article Head ===== */
.article-head { padding: 28px 0 32px; }
.article-head .container,
.article-hero .container,
.article-body .container,
.article-footer .container { max-width: calc(var(--read-w) + 48px); }

.cats { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--tertiary);
  font-size: 12px;
  font-weight: 700;
  transition: filter .15s ease;
}
.cat-chip:hover { filter: brightness(0.96); }

h1.article-title {
  margin: 0 0 18px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
  text-wrap: pretty;
}
.article-lead {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--secondary);
  max-width: 100%;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFEFE3, #FFD6C2);
  display: grid;
  place-items: center;
  color: var(--tertiary);
  font-family: var(--ff-en);
  font-weight: 700;
  font-size: 14px;
  flex: none;
  border: 1px solid var(--border);
  overflow: hidden;
  object-fit: cover;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-name { font-size: 13px; font-weight: 500; }
.author-name .sub {
  display: block;
  font-family: var(--ff-en);
  font-size: 10px;
  font-weight: 500;
  color: var(--secondary);
  text-transform: uppercase;
  margin-top: 2px;
}
.meta-row .divider { width: 1px; height: 20px; background: var(--border); margin-left: auto; }
.meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
}

/* ===== 9. Single - Share Bar ===== */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  padding: 20px 0;
}
.share-label {
  flex: 0 0 100%;
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 45px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  position: relative;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.share-btn:active { transform: translateY(1px); }
.share-btn svg { flex: none; width: 16px; height: 16px; display: block; }
.share-btn.x svg,
.share-btn.hatena svg,
.share-btn.threads svg { width: 13px; height: 13px; }
.share-btn:hover { border-color: currentColor; background: var(--surface); }
.share-btn.x:hover { color: var(--primary); }
.share-btn.fb:hover { color: #1877F2; }
.share-btn.line:hover { color: #06C755; }
.share-btn:not(.x):not(.fb):not(.line):not(.hatena):not(.threads):hover { color: var(--tertiary); border-color: var(--tertiary); }
.share-btn.hatena:hover { color: #00A4DE; }
.share-btn.threads:hover { color: var(--primary); }
.share-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 13px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 20;
}
.share-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px) rotate(45deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity .08s ease, transform .08s ease;
  z-index: 19;
}
.share-btn[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity .15s ease, transform .15s ease;
}
.share-btn[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(45deg);
  transition: opacity .15s ease, transform .15s ease;
}

/* ===== 9. Single - Hero Image ===== */
.article-hero { padding: 8px 0 0; }
.hero-media {
  aspect-ratio: 3/2;
  border-radius: var(--r-lg);
  background: var(--surface-warm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero-media::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(231,76,60,0.1), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255,239,227,0.92), transparent 50%);
}
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(-20deg, transparent 0 16px, rgba(31,31,31,0.035) 16px 17px);
}
.hero-media.has-thumbnail { background: var(--muted); }
.hero-media.has-thumbnail::before,
.hero-media.has-thumbnail::after { display: none; }
.hero-media.has-thumbnail img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-label {
  position: absolute;
  left: 16px; bottom: 16px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: rgba(31,31,31,0.45);
  padding: 4px 10px;
  background: rgba(255,255,255,0.78);
  border-radius: 6px;
  z-index: 2;
}

/* ===== 9. Single - Body ===== */
.article-body { padding: 0 0 64px; }
.ad-notice {
  display: block;
  font-size: 12px;
  color: var(--secondary);
  padding: 8px 12px;
  background: var(--muted);
  border-radius: var(--r-xs);
  border-left: 3px solid var(--border);
  margin: 0;
  line-height: 1.6;
}
.gt-adsense-more,
.gt-adsense-after-footer {
  text-align: center;
}
.gt-adsense-more { margin: 24px 0; }
.gt-adsense-after-footer {
  max-width: calc(var(--read-w) + 48px);
  margin: 0 auto 40px;
  padding: 0 24px;
}

.prose > * + * { margin-top: 24px; }
.prose p {
  font-size: 16px;
  line-height: 1.95;
  color: var(--primary);
  margin: 1.5em 0;
}
.prose p strong {
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(231,76,60,0.18) 62% 88%, transparent 88%);
  padding: 0 2px;
}

/* Links in body text */
.prose p a,
.prose li a {
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(37,99,235,0.4);
  transition: color .15s ease, text-decoration-color .15s ease;
}
.prose p a:hover,
.prose li a:hover { color: var(--primary); text-decoration-color: rgba(31,31,31,0.4); }

/* Headings */
.prose h2 {
  position: relative;
  margin: 56px 0 20px;
  padding: 4px 0 4px 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  text-wrap: pretty;
}
.prose h2::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 4px;
  background: var(--tertiary);
  border-radius: 2px;
}
.prose h3 {
  position: relative;
  margin: 40px 0 14px;
  padding-left: 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  border-left: 3px solid var(--tertiary);
}
.prose h4 {
  margin: 28px 0 10px;
  padding-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
}

/* Lists */
.prose ul, .prose ol {
  margin: 0;
  font-size: 16px;
  line-height: 1.95;
}

/* Futaba plugin migration note:
   This exception belongs with the Futaba Review Box styles below.
   Move it to the Futaba plugin CSS together with section 15, then delete it here. */
.prose ul:not(.futaba-box__meta) li + li, .prose ol li + li { margin-top: 6px; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative;
  padding-left: 22px;
}
.prose ul li > p {
  margin: 0;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: calc((1.95em - 8px) / 2);
  width: 8px;
  height: 8px;
  background: var(--tertiary);
  border-radius: 2px;
  transform: rotate(45deg);
}
.prose ol { list-style: none; padding-left: 0; counter-reset: stepcounter; }
.prose ol li {
  position: relative;
  padding-left: 44px;
  min-height: 28px;
  counter-increment: stepcounter;
}
.prose ol li::before {
  content: counter(stepcounter, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.15em;
  width: 30px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--tertiary);
  border-radius: var(--r-sm);
  font-family: var(--ff-en);
  font-size: 11px;
  font-weight: 700;
}

/* ===== 10. Single - Table of Contents ===== */
#toc_container {
  max-width: 700px;
  margin: 40px auto;
  padding: 24px 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 14px 32px rgba(31, 31, 31, 0.05);
}

#toc_container .toc_title {
  position: relative;
  margin: 0 0 16px 0 !important;
  display: block;
  text-align: left;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.45;
  color: var(--primary);
  padding: 0 0 12px 16px;
}

#toc_container .toc_title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border);
}

#toc_container .toc_title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 12px;
  width: 4px;
  border-radius: 2px;
  background: var(--tertiary);
}

#toc_container ul,
#toc_container ol {
  margin: 0;
  padding: 0;
}

#toc_container ul li {
  position: relative;
  margin-bottom: 0 !important;
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid rgba(31, 31, 31, 0.06);
  line-height: 1.8;
}

#toc_container ul li:before {
  content: "";
  position: absolute;
  left: 4px;
  top: calc((1.8em - 8px) / 2 + 11px);
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--tertiary);
  transform: rotate(45deg);
}

#toc_container ul li ul li:before {
  background-color: rgba(231, 76, 60, 0.58);
  top: calc((1.8em - 8px) / 2 + 8px);
}

.toc_list li {
  list-style: none;
}

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

.toc_list li ul li span {
  margin-right: 30px;
}

.toc_list span {
  margin: 0 14px 0 0;
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
}

.toc_list li a {
  display: block;
  padding: 2px 0;
  color: var(--primary);
  text-decoration: none;
  transition: color .15s ease;
}

.toc_list li a:hover {
  text-decoration: none;
  color: var(--tertiary);
}

#toc_container ul ul,
#toc_container ol ol {
  margin-top: 6px;
}

#toc_container ul ul li,
#toc_container ol ol li {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 14px;
}

#toc_container ul li:last-child,
#toc_container ol li:last-child {
  border-bottom: none;
}

/* Embeds */
.prose .embed-container {
  position: relative;
  overflow: hidden;
  height: 0;
  margin: 0;
  padding-bottom: 56.25%;
}

.prose .embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

.prose .twitter .twitter-tweet,
.wp-block-embed-twitter .twitter-tweet {
  margin: 1.6em auto !important;
}

/* Figures */
.prose figure { margin: 36px 0; }
.prose figure img {
  border-radius: var(--r-md);
  height: auto;
  border: 1px solid var(--border);
}
.prose figcaption {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--secondary);
  text-align: center;
}

/* Design-prototype figure placeholders */
.prose figure .fig-media {
  aspect-ratio: 3/2;
  border-radius: var(--r-md);
  background: var(--surface-warm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.prose figure .fig-media.b { background: #EFE9E4; }
.prose figure .fig-media.c { background: #F0F0F0; }
.prose figure .fig-media::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 30%, rgba(231,76,60,0.08), transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(255,239,227,0.9), transparent 55%);
}
.prose figure .fig-media::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(-20deg, transparent 0 14px, rgba(31,31,31,0.03) 14px 15px);
}
.prose figure .fig-label {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: rgba(31,31,31,0.48);
  padding: 4px 10px;
  background: rgba(255,255,255,0.78);
  border-radius: 6px;
}
.prose figure.size-vertical { margin-inline: auto; }
.prose figure.portrait { text-align: center; }
.prose figure.portrait .fig-media {
  aspect-ratio: 2/3;
  width: 360px;
  max-width: 100%;
  margin: 0 auto;
}

/* WordPress image blocks */
.prose .wp-block-image { margin: 36px 0; }
.prose > .wp-block-image:first-child { margin-top: 0; }
.prose .wp-block-image img { border-radius: var(--r-md); border: 1px solid var(--border); display: block; margin-inline: auto; }
.prose .wp-block-gallery .wp-block-image img { display: revert; margin-inline: revert; }
/* 縦長の画像：幅を固定して中央寄せ */
.prose .wp-block-image.size-portrait img { max-width: 60%; margin-inline: auto; display: block; }
@media (max-width: 768px) {
    .prose .wp-block-image.size-portrait img { max-width: 70%; }
}

/* コンテンツはみ出し：サイト最大幅（--max-w）まで拡張 */
.prose .wp-block-image.size-wide-image {
    width: min(var(--max-w), 100vw);
    max-width: none;
    margin-left: calc(50% - min(var(--max-w), 100vw) / 2);
    margin-right: calc(50% - min(var(--max-w), 100vw) / 2);
}
.prose .wp-block-image.size-wide-image img { width: 100%; max-width: none; }

/* フルスクリーン用：ビューポート全幅 */
.prose .wp-block-image.size-full-image {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.prose .wp-block-image.size-full-image img { width: 100%; max-width: none; }
.prose .wp-block-image figcaption { margin-top: 12px; font-size: 12.5px; color: var(--secondary); text-align: center; }

/* ===== 10. Single - Quote ===== */
.prose blockquote,
.prose .wp-block-quote {
  margin: 36px 0;
  padding: 22px 24px 22px 52px;
  background: var(--muted);
  border: none;
  border-radius: var(--r-md);
  position: relative;
  font-size: 16px;
  line-height: 1.9;
  color: var(--primary);
}
.prose blockquote::before,
.prose .wp-block-quote::before {
  content: '\201C';
  position: absolute;
  top: 8px; left: 18px;
  font-family: var(--ff-en);
  font-size: 48px;
  font-weight: 700;
  color: var(--secondary);
  opacity: 0.3;
  line-height: 1;
}
.prose blockquote.is-style-accent,
.prose .wp-block-quote.is-style-accent {
  background: var(--surface-warm);
  border-left: none;
}
.prose blockquote.is-style-accent::before,
.prose .wp-block-quote.is-style-accent::before {
  color: var(--tertiary);
  opacity: 0.55;
}
.prose blockquote p,
.prose .wp-block-quote p { margin: 0; }
.prose blockquote cite,
.prose .wp-block-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--secondary);
  font-style: normal;
  font-family: var(--ff-en);
}
.prose blockquote cite::before,
.prose .wp-block-quote cite::before { content: '— '; }

/* ===== 10. Single - Callout ===== */
.prose .callout {
  margin: 32px 0;
  padding: 20px 22px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tertiary);
  border-radius: var(--r-md);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.prose .callout .co-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--tertiary);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
}
.prose .callout .co-body { flex: 1; }
.prose .callout .co-title { font-size: 13px; font-weight: 700; margin: 0 0 4px; color: var(--primary); }
.prose .callout p { font-size: 14.5px; line-height: 1.8; color: var(--secondary); margin: 0; }
.prose .wp-block-group.is-style-callout {
  margin: 32px 0;
  padding: 20px 22px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tertiary);
  border-radius: var(--r-md);
}
.prose .wp-block-group.is-style-callout p { font-size: 14.5px; line-height: 1.8; color: var(--secondary); margin: 0; }
.prose .wp-block-group.is-style-callout > *:first-child { margin-top: 0; }

/* ===== 10. Single - WP Button Block ===== */
.prose .wp-block-buttons { margin: 28px 0; }
.prose .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  background: var(--tertiary);
  color: var(--on-tertiary);
  border: 2px solid var(--tertiary);
}
.prose .wp-block-button__link:hover { background: #c0392b; border-color: #c0392b; }
.prose .wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--surface);
  color: var(--tertiary);
  border: 2px solid var(--tertiary);
}
.prose .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--accent-soft); }
.prose .wp-block-button.is-style-ghost .wp-block-button__link {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--border-secondary);
}
.prose .wp-block-button.is-style-ghost .wp-block-button__link:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 10. Single - Box Variants ===== */
.prose .box-white,
.prose .box-muted,
.prose .box-accent,
.prose .box-pr,
.prose .wp-block-group.is-style-box-white,
.prose .wp-block-group.is-style-box-muted,
.prose .wp-block-group.is-style-box-accent,
.prose .wp-block-group.is-style-box-pr { margin: 32px 0; padding: 24px 28px; border-radius: var(--r-lg); }
.prose .box-white,
.prose .wp-block-group.is-style-box-white { background: var(--surface); border: 1px solid var(--border); }
.prose .box-muted,
.prose .wp-block-group.is-style-box-muted { background: var(--muted); }
.prose .box-accent,
.prose .wp-block-group.is-style-box-accent {
  background: var(--surface-warm);
  border-left: 4px solid var(--tertiary);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.prose .box-pr,
.prose .wp-block-group.is-style-box-pr { background: var(--accent-soft); }
.prose .box-pr::before,
.prose .wp-block-group.is-style-box-pr::before {
  content: 'PR';
  display: block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 2px 10px;
  background: var(--tertiary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-pill);
}

/* まとめ/メモブロック */
.prose .wp-block-group.is-style-memo {
  margin: 32px 0;
  padding: 20px 24px;
  border-radius:var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tertiary);
}
.prose .wp-block-group.is-style-memo > *:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prose .wp-block-group.is-style-memo > *:first-child::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background-color: var(--tertiary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Box style compatibility after CSS refactoring */
.prose .is-style-box-white,
.prose .is-style-box-muted,
.prose .is-style-box-accent,
.prose .is-style-box-pr,
.prose .has-box-white-background-color.has-background,
.prose .has-box-muted-background-color.has-background,
.prose .has-box-accent-background-color.has-background,
.prose .has-box-pr-background-color.has-background {
  margin: 32px 0;
  padding: 24px 28px;
  border-radius: var(--r-lg);
}
.prose .is-style-box-white,
.prose .has-box-white-background-color.has-background {
  background: var(--surface);
  border: 1px solid var(--border);
}
.prose .is-style-box-muted,
.prose .has-box-muted-background-color.has-background {
  background: var(--muted);
}
.prose .is-style-box-accent,
.prose .has-box-accent-background-color.has-background {
  background: var(--surface-warm);
  border-left: 4px solid var(--tertiary);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.prose .is-style-box-pr,
.prose .has-box-pr-background-color.has-background {
  background: var(--accent-soft);
}
.prose .is-style-box-pr::before,
.prose .has-box-pr-background-color.has-background::before {
  content: 'PR';
  display: block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 2px 10px;
  background: var(--tertiary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-pill);
}
.prose :where(.box-white, .box-muted, .box-accent, .box-pr, .is-style-box-white, .is-style-box-muted, .is-style-box-accent, .is-style-box-pr, .has-box-white-background-color.has-background, .has-box-muted-background-color.has-background, .has-box-accent-background-color.has-background, .has-box-pr-background-color.has-background) > :first-child,
.prose :where(.box-white, .box-muted, .box-accent, .box-pr, .is-style-box-white, .is-style-box-muted, .is-style-box-accent, .is-style-box-pr, .has-box-white-background-color.has-background, .has-box-muted-background-color.has-background, .has-box-accent-background-color.has-background, .has-box-pr-background-color.has-background) > .wp-block-group__inner-container > :first-child {
  margin-top: 0;
}
.prose :where(.box-white, .box-muted, .box-accent, .box-pr, .is-style-box-white, .is-style-box-muted, .is-style-box-accent, .is-style-box-pr, .has-box-white-background-color.has-background, .has-box-muted-background-color.has-background, .has-box-accent-background-color.has-background, .has-box-pr-background-color.has-background) > :last-child,
.prose :where(.box-white, .box-muted, .box-accent, .box-pr, .is-style-box-white, .is-style-box-muted, .is-style-box-accent, .is-style-box-pr, .has-box-white-background-color.has-background, .has-box-muted-background-color.has-background, .has-box-accent-background-color.has-background, .has-box-pr-background-color.has-background) > .wp-block-group__inner-container > :last-child {
  margin-bottom: 0;
}
.prose .is-style-memo {
  margin: 32px 0;
  padding: 20px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tertiary);
}
.prose .is-style-memo > .wp-block-group__inner-container {
  display: block;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}
.prose .is-style-memo > .wp-block-group__inner-container::before {
  content: none;
  display: none;
}
.prose .is-style-memo > .wp-block-group__inner-container > *:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prose .is-style-memo > .wp-block-group__inner-container > *:first-child::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background-color: var(--tertiary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}
.prose .is-style-memo > :last-child,
.prose .is-style-memo > .wp-block-group__inner-container > :last-child {
  margin-bottom: 0;
}

/* ===== 10. Single - Code ===== */
.prose pre,
.prose .wp-block-code {
  margin: 32px 0;
  padding: 20px 22px;
  background: var(--primary);
  color: var(--neutral);
  border-radius: var(--r-md);
  font-family: var(--ff-mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
}
.prose pre .tok-key { color: #FFB3A0; }
.prose pre .tok-str { color: #C4E3B6; }
.prose pre .tok-com { color: #8B8B8B; }
.prose pre .tok-num { color: #FFD8B5; }
.prose code:not(pre code) {
  font-family: var(--ff-mono);
  font-size: 0.875em;
  padding: 2px 7px;
  background: var(--accent-soft);
  color: var(--tertiary);
  border-radius: 6px;
}

/* Side-by-side layout */
.prose .split {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
  align-items: start;
  margin: 32px 0;
}
.prose .split .fig-media { aspect-ratio: 4/3; border-radius: var(--r-md); }
.prose .split .split-text { font-size: 15px; line-height: 1.9; }

.prose .split-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}
.prose .split-images figure { margin: 0; }
.prose .split-images figcaption { margin-top: 10px; font-size: 12px; text-align: center; }

/* ===== 10. Single - Table ===== */
.prose .table-wrap {
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid var(--border-secondary);
  border-radius: var(--r-md);
  background: var(--surface);
}
.prose .wp-block-table {
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid var(--border-secondary);
  border-radius: var(--r-md);
  background: var(--surface);
}
.prose .wp-block-table thead {

}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ff-jp);
  font-size: 14px;
  color: var(--primary);
}
.prose table th,
.prose table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-secondary); }
.prose .wp-block-table th,
.prose .wp-block-table td {
  border: 0;
  border-bottom: 1px solid var(--border-secondary);
}
.prose table thead {
  border-bottom: 0;
}
.prose table th {
  background: var(--primary);
  color: #fff;
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: none;
}
.prose .wp-block-table:not(.is-style-spec-sheet) table th:first-child { border-top-left-radius: var(--r-md); }
.prose .wp-block-table:not(.is-style-spec-sheet) table th:last-child { border-top-right-radius: var(--r-md); }
.prose .wp-block-table:not(.is-style-stripes):not(.is-style-spec-sheet) table tbody tr:nth-child(even) td { background: var(--neutral); }
/* ストライプ */
.prose .wp-block-table.is-style-stripes table tbody tr:nth-child(odd) td { background: var(--neutral); }
.prose table tr:last-child td { border-bottom: none; }
.prose table td strong { font-weight: 700; color: var(--primary); }
.prose table .price { font-family: var(--ff-en); font-weight: 600; white-space: nowrap; }
.prose .wp-block-table figcaption { padding: 12px 16px; font-size: 12.5px; color: var(--secondary); text-align: center; border-top: 1px solid var(--border-secondary); }

/* スペックシート */
.prose .wp-block-table.is-style-spec-sheet table thead {
  display: table-header-group;
}
.prose .wp-block-table.is-style-spec-sheet table tbody th {
  background: var(--surface);
  color: var(--primary);
  font-family: var(--ff-jp);
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-secondary);
}
.prose .wp-block-table.is-style-spec-sheet table:has(thead) thead th:first-child {
  border-top-left-radius: var(--r-md);
}
.prose .wp-block-table.is-style-spec-sheet table:has(thead) thead th:last-child {
  border-top-right-radius: var(--r-md);
}
.prose .wp-block-table.is-style-spec-sheet table tbody :is(th, td):first-child {
  background: var(--accent-soft);
  font-weight: 700;
  width: 28%;
  color: var(--primary);
  border-right: 1px solid var(--border-secondary);
}
.prose .wp-block-table.is-style-spec-sheet table tbody tr:nth-child(even) :is(th, td):first-child {
  background: var(--accent-soft);
}
.prose .wp-block-table.is-style-spec-sheet table tbody :is(th, td):first-child strong {
  font-weight: 700;
  color: var(--primary);
}
.prose .wp-block-table.is-style-spec-sheet table tbody tr:nth-child(even) td:not(:first-child) {
  background: var(--neutral);
}
.prose .wp-block-table.is-style-spec-sheet table:has(thead) tbody tr:nth-child(odd) td:not(:first-child) {
  background: var(--neutral);
}
.prose .wp-block-table.is-style-spec-sheet table:has(thead) tbody tr:nth-child(even) td:not(:first-child) {
  background: var(--surface);
}
.prose .wp-block-table.is-style-spec-sheet table tr:last-child td { border-bottom: none; }

/* ===== 11. Single - Commerce Cards ===== */
.kaerebalink-box,
.booklink-box,
.rinker-box,
.ah-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 16px;
  max-width: 700px;
  margin: 20px auto;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-sizing: border-box;
  line-height: 1.75;
  overflow: hidden;
}

.ah-image,
.ah-image-media {
  flex-basis: 35%;
}

.kaerebalink-image,
.booklink-image,
.rinker-image {
  flex-basis: 60%;
}

.kaerebalink-image img,
.booklink-image img,
.ah-image-media img,
.rinker-image img,
.ah-image img {
  margin: 0 auto 20px !important;
}

.ah-info {
  flex-basis: 61%;
}

.kaerebalink-info,
.booklink-info,
.rinker-detail {
  flex-basis: 100%;
}

.kaerebalink-name a,
.booklink-info a,
.rinker-title a,
.ah-info a {
  font-size: 14px;
  line-height: 1.7;
}

.kaerebalink-powered-date,
.booklink-powered-date,
.kaerebalink-powered-date a,
.booklink-powered-date a,
.kaerebalink-detail,
.booklink-detail,
.rinker-brand,
.rinker-price,
.rinker-release,
.rinker-date,
.ah-cat,
.ah-price {
  font-size: 12px;
  color: var(--secondary);
}

.rinker-link {
  margin-top: 10px;
}

.rinker-link img {
  display: none !important;
}

/* ===== 11. Single - Smart Link Card (.sh-box) ===== */
.sh-box {
  margin: 32px 0;
}

.sh-box a {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-sizing: border-box;
  gap: 16px;
  color: var(--primary);
  line-height: 1.75;
  transition: transform .25s ease, box-shadow .25s ease, border-color .15s ease;
}

.sh-box a:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 31, 31, 0.14);
  box-shadow: 0 12px 32px -22px rgba(31,31,31,0.22);
}
.sh-box a:hover .sh-title { color: var(--tertiary); }

.sh-image {
  flex: 0 0 38%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.sh-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0 !important;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--neutral);
}

.sh-detail {
  flex: 1 1 62%;
  min-width: 0;
}

.sh-detail-il::before,
.sh-detail-el::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 12px;
  margin-bottom: 10px;
  border-radius: var(--r-pill);
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
}

.sh-detail-il::before {
  content: '関連記事';
  background: var(--accent-soft);
  color: var(--tertiary);
}

.sh-detail-el::before {
  content: '外部リンク';
  background: var(--primary);
  color: #fff;
}

.sh-title {
  display: -webkit-box;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--primary);
  transition: color .3s ease;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sh-excerpt {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--secondary);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sh-url {
  order: 3;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 3px 10px 3px 8px;
  background: var(--muted);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-url::before {
  content: '';
  display: inline-block;
  width: 11px;
  height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ===== 11. Single - Commerce / External Buttons ===== */
.shoplinkamazon,
.shoplinkkindle,
.shoplinkrakuten,
.link-amazon,
.link-rakuten,
.link-rakuten-ichiba,
.link-yahoo,
.link-freelink1,
.link-freelink2 {
  margin: 5px 10px;
}

.shoplinkamazon a,
.shoplinkkindle a,
.shoplinkrakuten a,
.ah-link a,
.link-amazon a,
.link-rakuten a,
.link-rakuten-ichiba a,
.link-yahoo a,
.link-freelink1 a,
.link-freelink2 a,
.entry-body-btn a {
  display: block;
  max-width: 700px;
  margin: 10px auto;
  padding: 10px;
  box-sizing: border-box;
  border-radius: var(--r-pill) !important;
  text-align: center;
  text-decoration: none !important;
  font-size: 1em;
  font-weight: 700;
  color: #fff;
  background: var(--tertiary);
}

.shoplinkamazon a:hover,
.shoplinkkindle a:hover,
.shoplinkrakuten a:hover,
.ah-link a:hover,
.link-amazon a:hover,
.link-rakuten a:hover,
.link-rakuten-ichiba a:hover,
.link-yahoo a:hover,
.link-freelink1 a:hover,
.link-freelink2 a:hover,
.entry-body-btn a:hover {
  background: #c0392b;
}

.shoplinkamazon a,
.shoplinkkindle a,
.link-amazon a,
.entry-body-btn a[href*="amazon.co.jp"],
.entry-body-btn a[href*="amzn.to"] {
  background: var(--color-amazon);
}

.shoplinkamazon a:hover,
.shoplinkkindle a:hover,
.link-amazon a:hover,
.entry-body-btn a[href*="amazon.co.jp"]:hover,
.entry-body-btn a[href*="amzn.to"]:hover {
  background: #b36b00;
}

.shoplinkrakuten a,
.link-rakuten a,
.link-rakuten-ichiba a,
.entry-body-btn a[href*="rakuten.co.jp"] {
  background: var(--color-rakuten);
}

.shoplinkrakuten a:hover,
.link-rakuten a:hover,
.link-rakuten-ichiba a:hover,
.entry-body-btn a[href*="rakuten.co.jp"]:hover {
  background: #730000;
}

.link-yahoo,
.btn-yahoo a,
.is-style-btn-yahoo a {
  background: var(--color-yahoo);
}

.link-yahoo a:hover,
.btn-yahoo a:hover,
.is-style-btn-yahoo a:hover  {
  background: #b3001b;
}

.link-freelink2 a {
  background: #0097ab;
}

.link-freelink2 a:hover {
  background: #00535f;
}

.btn-docomo a,
.is-style-btn-docomo a {
  background: var(--color-docomo);
}

.btn-docomo a:hover,
.is-style-btn-docomo a:hover {
  background: #800020;
}

.btn-au a,
.is-style-btn-au a {
  background: var(--color-au);
}

.btn-au a:hover,
.is-style-btn-au a:hover {
  background: #a03a03;
}

.btn-sb a,
.is-style-btn-sb a {
  background: var(--color-sb);
}

.btn-sb a:hover,
.is-style-btn-sb a:hover {
  background: #6e6f73;
}

.btn-black a,
.is-style-btn-black a {
  background: #3d3d3d;
}

.btn-black a:hover,
.is-style-btn-black a:hover {
  background: #000;
}

.btn-green a,
.is-style-btn-green a {
  background: var(--color-line);
}

.btn-green a:hover,
.is-style-btn-green a:hover {
  background: #006d00;
}

.btn-blue a,
.is-style-btn-blue a {
  background: var(--color-blue);
}

.btn-blue a:hover,
.is-style-btn-blue a:hover {
  background: #005499;
}

/* ===== 11. Single - About Link Box ===== */
.ah-link {
  flex-basis: 100%;
  padding: 20px 10px 0;
}

.ah-link a::before {
  vertical-align: middle;
  line-height: 1;
  margin-right: 10px;
  -webkit-font-smoothing: antialiased;
  content: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2215%22%20height%3D%2215%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M15.3%208.7c2.8%202.8%202.8%207.3%200%2010.1l-3.1%203.1c-2.8%202.8-7.3%202.8-10.1%200s-2.8-7.3%200-10.1l1.7-1.7c.5-.5%201.3-.2%201.3.5%200%20.8.2%201.7.5%202.5.1.3%200%20.6-.2.8l-.6.6c-1.3%201.3-1.4%203.5-.1%204.8%201.3%201.3%203.5%201.3%204.8%200l3.1-3.1c1.3-1.3%201.3-3.5%200-4.8-.2-.2-.3-.3-.5-.4-.2-.1-.3-.4-.3-.6%200-.5.2-1%20.5-1.4l1-1c.3-.3.7-.3%201-.1.4.2.7.5%201%20.8zm6.6-6.6c-2.8-2.8-7.3-2.8-10.1%200L8.7%205.2C6%208%205.9%2012.5%208.7%2015.3c.3.3.6.6%201%20.8.3.2.7.2%201-.1l1-1c.4-.4.6-.9.5-1.4%200-.2-.1-.5-.3-.6-.1-.1-.3-.2-.5-.4-1.3-1.3-1.3-3.5%200-4.8l3.1-3.1c1.3-1.3%203.5-1.3%204.8%200%201.3%201.3%201.3%203.5-.1%204.8l-.6.6c-.2.2-.3.5-.2.8.3.8.4%201.6.5%202.5%200%20.7.8%201%201.3.5l1.7-1.7c2.8-2.8%202.8-7.3%200-10.1z%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E');
}

.ah-link a {
  max-width: 70%;
}

.ah-image img {
  border-radius: 20px;
}

.gist-meta img {
  display: none;
}


/* ===== 9. Single - Article Footer ===== */
.article-footer { padding: 0 0 24px; }

.category-row,
.tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}
.category-row { border-top: 1px solid var(--border); }
.tags-row { border-top: 1px solid var(--border); }
.category-row + .tags-row { border-top: none; padding-top: 0; }
.taxo-label {
  flex: 0 0 100%;
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tag-chip::before { content: '#'; color: var(--tertiary); margin-right: 4px; font-weight: 700; }
.tag-chip:hover { background: var(--accent-soft); color: var(--tertiary); border-color: transparent; }

/* ===== 9. Single - Author Card ===== */
.author-card {
  margin-top: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: start;
}
.author-card .avatar.large { width: 72px; height: 72px; font-size: 22px; object-fit: cover; }
.author-card .ac-name { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.author-card .ac-role {
  font-family: var(--ff-en);
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.author-card .ac-bio { font-size: 13.5px; line-height: 1.85; color: var(--secondary); margin: 0 0 14px; }
.author-card .ac-links { display: flex; gap: 8px; }
.ac-link {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--neutral);
  border: 1px solid var(--border);
  color: var(--primary);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ac-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.ac-link--twitter   { background: #000; border-color: transparent; color: #fff; }
.ac-link--instagram { background: var(--color-ig); border-color: transparent; color: #fff; }
.ac-link--note      { background: #000; border-color: transparent; color: #fff; }
.ac-link--twitter:hover, .ac-link--instagram:hover, .ac-link--note:hover { color: #fff; }

/* ===== 9. Single - Related Articles ===== */
.related {
  padding: 56px 0 24px;
  background: var(--neutral);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.related .article-card h3 { font-size: 14px; }
.related .article-card .body { padding: 16px 18px 18px; gap: 8px; }
.related .article-card .meta { font-size: 11px; margin-top: 4px; }

/* ===== 13. Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== 10. Single - Block Editor Color Boxes ===== */
.has-primary-color { color: var(--primary) !important; }
.has-secondary-color { color: var(--secondary) !important; }
.has-tertiary-color { color: var(--tertiary) !important; }
.has-link-color { color: var(--link) !important; }
.has-neutral-color { color: var(--neutral) !important; }
.has-surface-color { color: var(--surface) !important; }
.has-muted-color { color: var(--muted) !important; }
.has-surface-warm-color { color: var(--surface-warm) !important; }
.has-accent-soft-color { color: var(--accent-soft) !important; }
.has-box-white-color { color: var(--surface) !important; }
.has-box-muted-color { color: var(--muted) !important; }
.has-box-accent-color { color: var(--surface-warm) !important; }
.has-box-pr-color { color: var(--accent-soft) !important; }

.has-primary-background-color { background-color: var(--primary) !important; }
.has-secondary-background-color { background-color: var(--secondary) !important; }
.has-tertiary-background-color { background-color: var(--tertiary) !important; }
.has-link-background-color { background-color: var(--link) !important; }
.has-neutral-background-color { background-color: var(--neutral) !important; }
.has-surface-background-color { background-color: var(--surface) !important; }
.has-muted-background-color { background-color: var(--muted) !important; }
.has-surface-warm-background-color { background-color: var(--surface-warm) !important; }
.has-accent-soft-background-color { background-color: var(--accent-soft) !important; }

.has-background {
  border-radius: var(--r-md);
}

.has-box-white-background-color.has-background {
  padding: 24px 28px;
  border: 1px solid var(--border);
}
.has-box-muted-background-color.has-background {
  padding: 24px 28px;
}
.has-box-accent-background-color.has-background {
  padding: 24px 28px;
  border: 1px solid #f2ddd4;
}
.has-box-pr-background-color.has-background {
  padding: 24px 28px;
}
.has-box-pr-background-color.has-background::before {
  content: 'PR';
  display: block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 2px 10px;
  background: var(--tertiary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-pill);
}

/* Box refinements */
.prose .box-white,
.prose .is-style-box-white,
.prose .wp-block-group.is-style-box-white,
.prose .has-surface-background-color.has-background,
.prose .has-box-white-background-color.has-background,
.has-surface-background-color.has-background,
.has-box-white-background-color.has-background {
  background: var(--surface) !important;
  background-color: var(--surface) !important;
}

.prose .has-surface-background-color.has-background,
.has-surface-background-color.has-background,
.prose .has-box-muted-background-color.has-background,
.has-box-muted-background-color.has-background {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.prose .has-box-accent-background-color.has-background,
.has-box-accent-background-color.has-background {
  border-radius: var(--r-lg);
  border-left: 1px solid #f2ddd4;
}

.prose .is-style-box-pr,
.prose .wp-block-group.is-style-box-pr {
  border: 1px solid #f2ddd4;
}

.prose .is-style-box-pr p,
.prose .wp-block-group.is-style-box-pr p {
  margin: 0;
}

.prose .wp-block-group.is-style-memo {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
  padding: 24px 28px;
  border-radius: var(--r-lg);
  background: var(--surface-warm);
  border: 1px solid #f2ddd4;
  border-left: 4px solid var(--tertiary);
}

.prose .wp-block-group.is-style-memo::before {
  content: '';
  grid-column: 1;
  grid-row: 1;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E74C3C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 13px;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.18);
}

.prose .wp-block-group.is-style-memo > .wp-block-group__inner-container {
  display: contents;
}

.prose .wp-block-group.is-style-memo > .wp-block-group__inner-container::before,
.prose .wp-block-group.is-style-memo > .wp-block-group__inner-container > *:first-child::before {
  content: none;
  display: none;
}

.prose .wp-block-group.is-style-memo > :not(.wp-block-group__inner-container):first-child,
.prose .wp-block-group.is-style-memo > .wp-block-group__inner-container > :first-child {
  grid-column: 2;
  grid-row: 1;
  display: block;
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid #f2ddd4;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.prose .wp-block-group.is-style-memo > :not(.wp-block-group__inner-container):not(:first-child),
.prose .wp-block-group.is-style-memo > .wp-block-group__inner-container > :not(:first-child) {
  grid-column: 2;
  margin: 12px 0 0;
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.9;
}

/* ===== 12. Article Responsive ===== */
@media (max-width: 768px) {
  h1.article-title { font-size: 24px; line-height: 1.4; }
  .article-lead { font-size: 14px; line-height: 1.8; }
  .meta-row { gap: 10px; padding: 12px 0; }
  .meta-row .divider { display: none; }
  .meta-row .meta-item { margin-left: auto; }
  .share-bar { gap: 8px; }
  .share-btn { height: 34px; padding: 0 12px; font-size: 12px; }
  .prose h2 { font-size: 20px; margin: 40px 0 14px; }
  .prose h3 { font-size: 16px; margin: 28px 0 10px; }
  .prose p { font-size: 15px; line-height: 1.9; }
  #toc_container { margin: 32px auto; padding: 20px 18px; border-radius: var(--r-md); }
  #toc_container .toc_title { margin-bottom: 12px !important; padding: 0 0 10px 14px; font-size: 18px; }
  #toc_container ul li { padding: 6px 0 6px 22px; font-size: 14px; line-height: 1.7; }
  #toc_container ul li:before { left: 3px; top: calc((1.7em - 8px) / 2 + 8px); }
  .prose .split { grid-template-columns: 1fr; }
  .prose .split-images { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .author-card { grid-template-columns: 56px 1fr; padding: 20px; gap: 16px; }
  .author-card .avatar.large { width: 56px; height: 56px; font-size: 18px; }
}
@media (max-width: 480px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ===== 13. Reading Progress Bar ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--tertiary);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ===== 14. Archive Hero ===== */
.archive-hero {
  background: var(--surface-warm);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
}
.archive-hero-eyebrow {
  margin: 0 0 8px;
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tertiary);
}
.archive-hero-title {
  margin: 0 0 12px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
}
.archive-hero-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--secondary);
  max-width: 640px;
}
.archive-hero-count {
  margin: 0;
  font-size: 13px;
  color: var(--secondary);
}
@media (max-width: 768px) {
  .archive-hero { padding: 40px 0 32px; }
  .archive-hero-title { font-size: 26px; }
}

/* ===== 14. Search ===== */
.search-count {
  display: inline-block;
  margin-left: 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary);
  vertical-align: middle;
}
.search-empty {
  padding: 48px 0;
  text-align: center;
}
.search-empty-msg {
  margin: 0 0 24px;
  color: var(--secondary);
}
.search-empty .search-form {
  max-width: 480px;
  margin: 0 auto;
}

/* ===== 14. Page Template ===== */
.page-hero {
  background: var(--surface-warm);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
}
.page-hero-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}
.page-section {
  padding: 56px 0 80px;
}
.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-links {
  margin-top: 32px;
  font-size: 14px;
  color: var(--secondary);
}
@media (max-width: 768px) {
  .page-hero { padding: 40px 0 32px; }
  .page-hero-title { font-size: 24px; }
  .page-section { padding: 40px 0 64px; }
}

/* ===== 14. 404 ===== */
.error-section {
  padding: 80px 0 120px;
}
.error-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.error-code {
  margin: 0 0 8px;
  font-family: var(--ff-en);
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
  color: var(--tertiary);
}
.error-title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
}
.error-desc {
  margin: 0 0 32px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--secondary);
}
.error-actions {
  margin-bottom: 32px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: var(--tertiary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: opacity .15s ease;
}
.btn-primary:hover { opacity: .85; }
.error-search { max-width: 360px; margin: 0 auto; }


@media screen and (min-width: 450px) {
  .sh-box a {
    justify-content: space-between;
  }

  .sh-image,
  .rinker-image {
    flex-basis: 30%;
  }

  .sh-detail,
  .rinker-detail {
    flex-basis: 65%;
  }

  .sh-image img,
  .rinker-image img {
    margin: 0 auto !important;
  }

  .rinker-box {
    justify-content: space-between;
  }
}

@media (max-width: 449px) {
  .sh-box a {
    display: grid;
    grid-template-columns: 36% 1fr;
    padding: 16px;
    gap: 14px;
  }

  .sh-detail {
    min-width: 0;
  }

  .sh-url {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0;
  }

  .sh-title {
    font-size: 14px;
    line-height: 1.65;
  }

  .sh-excerpt {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.7;
  }
}

@media screen and (min-width: 640px) {
  .aboutblog-masthead {
    font-size: 2.5em;
  }

  .aboutblog-desc {
    text-align: center;
  }

  .sh-excerpt {
    display: -webkit-box;
  }

  .main-entry-writer {
    display: flex;
    justify-content: space-between;
  }

  .entry-writer-name {
    margin: 0;
  }
  
  .entry-writer-sns {
    justify-content: normal;
  }
}

/* ===== 12. Share Bar Small Screen ===== */
@media (max-width: 480px) {
  .share-btn span { display: none; }
  .share-btn { width: 50px; height: 50px; padding: 0; justify-content: center; }
  .share-btn svg { width: 20px; height: 20px; }
  .share-btn.x svg,
  .share-btn.hatena svg,
  .share-btn.threads svg { width: 17px; height: 17px; }
}

/* ===== 14. Archive - Term Intro ===== */
.term-intro {
  max-width: calc(var(--read-w) + 48px);
  margin: 0 auto 40px;
  padding: 32px 0 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.term-intro-header {
  margin-bottom: 20px;
}

.term-intro-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--primary);
}

.term-intro-body > :first-child {
  margin-top: 0;
}

.term-intro-body > :last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .term-intro {
    margin-bottom: 32px;
    padding: 28px 0 30px;
  }

  .term-intro-title {
    font-size: 21px;
  }
}

/* ===== 16. Custom Scrollbar ===== */
:root {
  scrollbar-color: #e74c3c var(--surface);
  scrollbar-width: thin;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background: #e74c3c;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c0392b;
}
