/*
Theme Name: Lifelog Blog
Theme URI: https://life-log.me
Author: techlive inc.
Author URI: https://techlive.jp
Description: Lifelogのコンテンツマーケティング用カスタムテーマ。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lifelog-blog
Tags: blog, custom, marketing, clean, modern
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

:root {
  --primary-color: #0d9488;
  --secondary-color: #0f766e;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-gray: #f9fafb;
  --border-color: #e5e7eb;
  --max-width: 1200px;
  --max-width-wide: 1400px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

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

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

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

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* トップページとアーカイブページは横幅を広く */
.home.blog .container,
.archive .container {
  max-width: var(--max-width-wide);
}

/* フッターは全ページで横幅を広く */
.site-footer .container {
  max-width: var(--max-width-wide);
}

.site-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #94a3b8;
  margin-top: var(--spacing-xl);
}

.footer-main {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-title {
  color: #f1f5f9;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.footer-description {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  color: #cbd5e1;
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #cbd5e1;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.footer-menu,
.footer-info {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu li,
.footer-info li {
  margin-bottom: 0.75rem;
}

.footer-menu a,
.footer-info a {
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  display: inline-block;
}

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

.footer-info li {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.footer-info-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-info-link svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md) 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.copyright {
  font-size: 0.875rem;
  color: #94a3b8;
}

.footer-legal {
  display: flex;
  gap: var(--spacing-md);
}

.footer-legal a {
  font-size: 0.875rem;
  color: #cbd5e1;
  transition: color 0.3s ease;
}

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

@media (max-width: 767px) {
  .footer-main {
    padding: var(--spacing-lg) 0 var(--spacing-md);
  }

  .footer-main .container {
    padding: 0 0.75rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .footer-bottom {
    padding: var(--spacing-sm) 0;
  }

  .footer-bottom .container {
    padding: 0 0.75rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
    gap: var(--spacing-sm);
  }
}

.main-content {
  padding: var(--spacing-lg) 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-branding {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-branding .custom-logo-link {
  display: block;
  line-height: 0;
}

.site-branding .custom-logo {
  max-height: 50px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  line-height: 1;
}

.site-title a {
  color: var(--text-color);
  transition: color 0.3s ease;
}

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

.site-description {
  color: var(--text-light);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-app-link {
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.header-app-link:hover {
  background: var(--primary-color);
  color: white;
}

.contact-button {
  background: var(--primary-color);
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.contact-button:hover {
  background: var(--secondary-color);
  color: white;
}

.header-inner .menu-toggle {
  display: none;
}

/* Blog Description Section */
.blog-description {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  padding: var(--spacing-xl) 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.blog-description::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.blog-description::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  z-index: 0;
}

.description-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.description-title {
  font-family: 'Kiwi Maru', serif;
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
  color: white;
  line-height: 1.4;
}

.description-text {
  font-size: 1.125rem;
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
}

.description-subtext {
  font-size: 1rem;
  margin: 0 0 var(--spacing-lg) 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.description-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.app-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.app-link-button.primary {
  background: white;
  color: #0d9488;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-link-button.primary:hover {
  background: #f0fdfa;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: #0d9488;
}

.app-link-button.secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.8);
}

.app-link-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  transform: translateY(-2px);
  color: white;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  position: relative;
}

.main-navigation .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  width: 40px;
  height: 40px;
}

.menu-toggle-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  left: 0;
  transition: transform 0.3s ease;
}

.menu-toggle-icon::before {
  top: -8px;
}

.menu-toggle-icon::after {
  bottom: -8px;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon {
  background-color: transparent;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon::after {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu-wrapper {
  display: flex;
  width: 100%;
}

/* 閉じるボタンはデフォルトで非表示（モバイルのみ表示） */
.menu-close {
  display: none;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-navigation li {
  position: relative;
  margin: 0;
}

.main-navigation a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  display: block;
  transition: color 0.3s ease, background-color 0.3s ease;
}

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

/* プルダウンメニュー（サブメニュー） */
.main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 999;
  padding: 0.5rem 0;
  list-style: none;
  display: block;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-navigation .sub-menu li {
  width: 100%;
}

.main-navigation .sub-menu a {
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.main-navigation .sub-menu a:hover {
  background-color: var(--bg-gray);
}

/* サブメニューのインジケーター（矢印） */
.main-navigation .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.5rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.main-navigation .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* 入れ子のサブメニュー（2階層目） */
.main-navigation .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 0.5rem;
}

.main-navigation .sub-menu .menu-item-has-children > a::after {
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 4px solid currentColor;
  transform: rotate(0deg);
}

.main-navigation .sub-menu .menu-item-has-children:hover > a::after {
  transform: translateX(2px);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* Mobile Menu Buttons */
.mobile-menu-buttons {
  display: none;
  position: fixed;
  bottom: 0;
  left: -100%;
  right: 0;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: left 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-buttons.visible {
  left: 0;
  opacity: 1;
  visibility: visible;
}

.mobile-menu-buttons a {
  display: block;
  padding: 1rem var(--spacing-md);
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.mobile-app-button {
  background: white;
  color: var(--primary-color) !important;
  border-top: 1px solid var(--border-color);
}

.mobile-app-button:hover {
  background: var(--bg-gray);
  color: var(--primary-color) !important;
}

.mobile-contact-button {
  background: var(--primary-color);
  color: white !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-contact-button:hover {
  background: var(--secondary-color);
  color: white !important;
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.breadcrumb {
  background: linear-gradient(to right, #f8fafc 0%, #f1f5f9 100%);
  padding: var(--spacing-sm) 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.breadcrumb-link:hover {
  color: var(--primary-color);
  background-color: rgba(13, 148, 136, 0.08);
}

.breadcrumb-home-icon {
  flex-shrink: 0;
}

.breadcrumb-separator {
  color: var(--text-light);
  flex-shrink: 0;
  margin: 0 0.125rem;
}

.breadcrumb-current {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* アーカイブページのパンくずリストは横幅を広く */
.archive .breadcrumb-inner {
  max-width: var(--max-width-wide);
}

/* ==========================================================================
   Posts & Articles
   ========================================================================== */

.section-title {
  font-size: 1.75rem;
  font-weight: bold;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 3px solid var(--primary-color);
}

.recommended-posts,
.latest-posts {
  margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   Recommended Posts (横長デザイン)
   ========================================================================== */

.recommended-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
  .recommended-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .recommended-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.recommended-card {
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: row;
  height: 100px;
  cursor: pointer;
  position: relative;
}

.recommended-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.recommended-card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.recommended-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 100%;
  overflow: hidden;
  background: var(--bg-gray);
}

.recommended-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.recommended-category {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.recommended-content {
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.recommended-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.recommended-title a {
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ==========================================================================
   Latest Posts (モダンなカードデザイン)
   ========================================================================== */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.latest-card {
  background: var(--bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  position: relative;
}

.latest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.latest-card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.latest-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 1.89 / 1;
  overflow: hidden;
  background: var(--bg-gray);
}

.latest-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.latest-category {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.4rem;
}

.latest-content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.latest-header {
  margin-bottom: 0.25rem;
}

.latest-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--spacing-xs) 0;
  line-height: 1.4;
}

.latest-title a {
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.latest-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--text-light);
  font-size: 0.75rem;
  margin-top: auto;
}

.latest-meta time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.latest-summary {
  color: var(--text-light);
  font-size: 0.8rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.entry-header {
  margin-bottom: var(--spacing-sm);
}

.entry-title {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
}

.entry-meta {
  color: var(--text-light);
  font-size: 0.875rem;
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.entry-content {
  margin-top: var(--spacing-md);
  line-height: 1.9;
  font-size: 1.0625rem;
  color: var(--text-color);
}

/* Paragraphs */
.entry-content p {
  margin-bottom: var(--spacing-md);
  line-height: 1.9;
}

/* Headings */
.entry-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 3px solid var(--primary-color);
  line-height: 1.4;
}

.entry-content h2:first-child {
  margin-top: 0;
}

.entry-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-color);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-sm);
  border-left: 4px solid var(--primary-color);
  line-height: 1.4;
}

.entry-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
}

/* Links */
.entry-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, 0.3);
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
}

.entry-content a:hover {
  color: var(--secondary-color);
  text-decoration-color: var(--secondary-color);
}

/* Strong and Emphasis */
.entry-content strong {
  font-weight: 700;
  color: var(--text-color);
}

.entry-content em {
  font-style: italic;
}

/* Images */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: var(--spacing-lg) 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Blockquote */
.entry-content blockquote {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-md)
    var(--spacing-lg);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  color: var(--text-color);
  font-style: italic;
}

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

/* Code */
.entry-content code {
  padding: 0.15rem 0.4rem;
  background: rgba(13, 148, 136, 0.1);
  color: var(--secondary-color);
  border-radius: 4px;
  font-size: 0.9em;
  font-family: inherit;
}

.entry-content pre {
  margin: var(--spacing-lg) 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-gray);
  color: var(--text-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  line-height: 1.8;
}

.entry-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
  font-size: 0.95rem;
}

/* Code Block Wrapper */
.code-block-wrapper {
  position: relative;
}

.code-block-wrapper pre {
  margin: 0;
}

.code-block-wrapper + .code-block-wrapper,
.entry-content .code-block-wrapper,
.single-post-content .code-block-wrapper {
  margin: var(--spacing-lg) 0;
}

.code-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-light);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}

.code-block-wrapper:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.code-copy-btn.copied {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Lists */
.entry-content ol,
.entry-content ul {
  margin: var(--spacing-md) 0;
  margin-left: 1rem;
  padding-left: 0.5rem;
  list-style-position: outside;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol li,
.entry-content ul li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  padding-left: 0.5rem;
}

.entry-content ol li::marker,
.entry-content ul li::marker {
  color: var(--primary-color);
  font-weight: 600;
}

.entry-content ol ol,
.entry-content ul ul,
.entry-content ol ul,
.entry-content ul ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  margin-left: 1rem;
  padding-left: 0.5rem;
}

/* Tables */
.entry-content table {
  width: 100%;
  margin: var(--spacing-lg) 0;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.entry-content table thead {
  background: #e2e8f0;
  color: var(--text-color);
  border-bottom: 2px solid #cbd5e1;
}

.entry-content table th {
  padding: var(--spacing-sm) var(--spacing-md);
  font-weight: 700;
  text-align: left;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.entry-content table td {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.entry-content table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.entry-content table tbody tr:hover {
  background: #f1f5f9;
}

.entry-content table tbody tr:last-child td {
  border-bottom: none;
}

/* Horizontal Rule */
.entry-content hr {
  margin: var(--spacing-xl) 0;
  border: none;
  border-top: 2px solid var(--border-color);
}

/* About page */
.about-page {
  width: 100%;
  padding: 0;
}

/* About Hero Section */
.about-hero {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.about-hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.3;
}

.about-hero-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* About Content Container */
.about-content {
  width: 100%;
}

/* About Card */
.about-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-color);
}

.about-card-icon {
  color: var(--primary-color);
  flex-shrink: 0;
}

.about-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  line-height: 1.3;
}

.about-card-body {
  line-height: 1.8;
  color: var(--text-color);
}

.about-card-body p {
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.about-card-body p:last-child {
  margin-bottom: 0;
}

/* About Topics */
.about-topics {
  display: grid;
  gap: var(--spacing-md);
}

.about-topic-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.about-topic-item svg {
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-topic-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.about-topic-item p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* Company Info */
.about-company-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.about-company-info h3:first-child {
  margin-top: 0;
}

.about-company-info p {
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.about-company-info a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.about-company-info a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* About App Card (CTA) */
.about-app-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: rgba(13, 148, 136, 0.2);
}

.about-cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-top: var(--spacing-sm);
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.about-cta-button:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
}

.about-cta-button svg {
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-hero {
    padding: var(--spacing-md);
  }

  .about-hero-title {
    font-size: 1.5rem;
  }

  .about-hero-subtitle {
    font-size: 0.875rem;
  }

  .about-card {
    padding: var(--spacing-sm);
  }

  .about-card-title {
    font-size: 1.25rem;
  }

  .about-topic-item {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-company-info h3 {
    font-size: 1rem;
  }
}

/* About page and other page content */
.about-body ol,
.about-body ul,
.single-post-content ol,
.single-post-content ul {
  margin: var(--spacing-md) 0;
  margin-left: 1rem;
  padding-left: 0.5rem;
  list-style-position: outside;
}

.about-body ol,
.single-post-content ol {
  list-style-type: decimal;
}

.about-body ul,
.single-post-content ul {
  list-style-type: disc;
}

.about-body ol li,
.about-body ul li,
.single-post-content ol li,
.single-post-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
  padding-left: 0.5rem;
}

.about-body ol ol,
.about-body ul ul,
.about-body ol ul,
.about-body ul ol,
.single-post-content ol ol,
.single-post-content ul ul,
.single-post-content ol ul,
.single-post-content ul ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  margin-left: 1rem;
  padding-left: 0.5rem;
}

.read-more {
  display: inline-block;
  margin-top: var(--spacing-sm);
  color: var(--primary-color);
  font-weight: 500;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--bg-gray);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

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

.pagination .prev,
.pagination .next {
  padding: 0 var(--spacing-md);
}

.pagination .dots {
  border: none;
  background: transparent;
  min-width: auto;
  padding: 0 var(--spacing-xs);
  color: var(--text-light);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  margin-top: 0;
  padding-top: var(--spacing-lg);
}

.widget {
  background: var(--bg-gray);
  padding: var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  font-weight: bold;
}

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

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

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

/* Popular Posts Widget */
.popular-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.popular-post-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.popular-post-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 4px;
}

.ranking-badge {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #6b7280;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px 0 4px 0;
  z-index: 1;
}

.ranking-badge.rank-top {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ranking-badge .crown-icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  display: block;
}

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

.popular-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.popular-post-title:hover {
  color: var(--primary-color);
}

.popular-post-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Search Widget */
.widget-search {
  background: transparent;
  padding: 0;
  margin-bottom: var(--spacing-md);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.search-form:focus-within {
  border-color: var(--primary-color);
}

.search-form label {
  flex: 1;
  margin: 0;
}

.search-field {
  width: 100%;
  padding: 0.75rem;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: transparent;
}

.search-field::placeholder {
  color: var(--text-light);
}

.search-submit {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.search-submit:hover {
  color: var(--primary-color);
  background-color: var(--bg-gray);
}

/* Banner Widget */
.widget-banner {
  background: transparent;
  padding: 0;
  margin-bottom: var(--spacing-md);
}

.banner-area {
  margin: 0;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Archive Pages
   ========================================================================== */

.archive-header {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  padding: var(--spacing-lg) 0;
  color: white;
  text-align: center;
}

.archive-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 var(--spacing-sm) 0;
  color: white;
}

.archive-description {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto;
}

.archive-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  padding-top: var(--spacing-xs);
}

@media (min-width: 768px) {
  .archive-layout {
    grid-template-columns: 2fr 1fr;
  }

  .archive-title {
    font-size: 2.5rem;
  }
}

.archive-posts {
  margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   Single Post Page (投稿ページ)
   ========================================================================== */

/* 投稿ページ全体 */
.single-post {
  background: var(--bg-color);
}

/* 記事コンテナ */
.single-post-container {
  max-width: 900px;
  margin: var(--spacing-lg) auto 0;
  padding: var(--spacing-lg);
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* アイキャッチ画像 */
.single-post-thumbnail {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
  border-radius: 8px;
}

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

/* 記事ヘッダー */
.single-post-header {
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

/* カテゴリーバッジ */
.single-post-categories {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
}

.category-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  color: white;
}

/* 記事タイトル */
.single-post-title {
  font-size: 2.25rem;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

/* メタ情報 */
.single-post-meta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9375rem;
  flex-wrap: wrap;
}

.single-post-meta svg {
  margin-right: 0.375rem;
  flex-shrink: 0;
  vertical-align: middle;
}

.post-date,
.post-modified,
.post-views,
.post-reading-time {
  display: inline-flex;
  align-items: center;
}

.post-reading-time svg {
  position: relative;
  top: -1px;
}

/* 目次 */
.table-of-contents {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.toc-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-weight: bold;
  font-size: 1.125rem;
  color: var(--text-color);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
  outline: none;
}

.toc-header:hover,
.toc-header:focus,
.toc-header:active {
  background: transparent;
  outline: none;
  box-shadow: none;
}

.toc-toggle-icon {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.table-of-contents.is-collapsed .toc-toggle-icon {
  transform: rotate(-180deg);
}

.toc-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  max-height: 5000px;
  opacity: 1;
  margin-top: var(--spacing-sm);
}

.table-of-contents.is-collapsed .toc-content {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.toc-icon {
  color: var(--primary-color);
  flex-shrink: 0;
}

.toc-title {
  font-weight: 700;
}

.toc-list {
  margin: 0;
  padding-left: 1.5rem;
  counter-reset: toc-counter;
  list-style: none;
}

.toc-list > li {
  counter-increment: toc-counter;
  margin-bottom: 0.75rem;
  position: relative;
}

.toc-list > li::before {
  content: counter(toc-counter) '.';
  position: absolute;
  left: -1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.toc-sublist {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
  counter-reset: toc-subcounter;
  list-style: none;
}

.toc-sublist > li {
  counter-increment: toc-subcounter;
  margin-bottom: 0.5rem;
  position: relative;
  font-size: 0.9375rem;
}

.toc-sublist > li::before {
  content: counter(toc-counter) '.' counter(toc-subcounter);
  position: absolute;
  left: -1.5rem;
  font-weight: 500;
  color: var(--text-light);
}

.toc-link {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  line-height: 1.6;
}

.toc-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 記事本文 */
.single-post-content {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text-color);
  margin-bottom: var(--spacing-xl);
}

/* 段落 */
.single-post-content p {
  margin-bottom: 1.75rem;
}

/* 見出しスタイル */
.single-post-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--primary-color);
  border-radius: 4px;
  color: white;
  position: relative;
  line-height: 1.4;
}

.single-post-content h2:first-child {
  margin-top: 0;
}

.single-post-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid;
  border-image: linear-gradient(
      to right,
      var(--primary-color) 0%,
      var(--primary-color) 30%,
      var(--border-color) 70%,
      var(--border-color) 100%
    )
    1;
  color: var(--text-color);
  line-height: 1.4;
}

.single-post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  position: relative;
  padding-left: 0;
  line-height: 1.5;
}

.single-post-content h4::before {
  display: none;
}

.single-post-content h5 {
  font-size: 1.125rem;
  font-weight: bold;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  color: var(--text-color);
}

.single-post-content h6 {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

/* リンク */
.single-post-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

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

/* リスト */
.single-post-content ul,
.single-post-content ol {
  margin-bottom: 1.75rem;
  padding-left: 2rem;
}

.single-post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

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

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

.single-post-content ul li::marker,
.single-post-content ol li::marker {
  color: var(--primary-color);
  font-weight: 600;
}

/* Strong */
.single-post-content strong {
  font-weight: 700;
  color: var(--text-color);
  background: linear-gradient(transparent 60%, rgba(13, 148, 136, 0.15) 60%);
}

.single-post-content strong.no-underline {
  background: none;
}

/* Em */
.single-post-content em {
  font-style: italic;
  color: var(--text-color);
}

/* 引用 */
.single-post-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(to right, #f8fafc 0%, #f1f5f9 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-light);
}

.single-post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 画像 */
.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.single-post-content figure.no-shadow img {
  box-shadow: none;
}

.single-post-content figure {
  margin: 2rem 0;
}

.single-post-content figure img {
  margin-bottom: 0;
}

.single-post-content figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

/* コード */
.single-post-content code {
  padding: 0.15rem 0.4rem;
  background: rgba(13, 148, 136, 0.1);
  color: var(--secondary-color);
  border-radius: 4px;
  font-size: 0.9em;
  font-family: inherit;
}

.single-post-content pre {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-gray);
  color: var(--text-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  line-height: 1.8;
}

.single-post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.95rem;
}

/* テーブル */
.single-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}

.single-post-content th,
.single-post-content td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.single-post-content th {
  background: #e2e8f0;
  font-weight: 700;
  color: var(--text-color);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #cbd5e1;
}

.single-post-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

.single-post-content tbody tr:hover {
  background: #f1f5f9;
  transition: background 0.2s ease;
}

.single-post-content tr:last-child td {
  border-bottom: none;
}

/* 水平線 */
.single-post-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-color),
    transparent
  );
  margin: 2.5rem 0;
}

/* ページリンク */
.page-links {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.page-links-title {
  font-weight: bold;
  margin-right: var(--spacing-xs);
}

.page-links a,
.page-links > span {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  transition: all 0.2s ease;
}

.page-links a:hover {
  border-color: var(--primary-color);
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary-color);
}

/* 記事フッター（タグ） */
.single-post-footer {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.post-tags {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
  flex-wrap: wrap;
}

.post-tags svg {
  color: var(--text-light);
  flex-shrink: 0;
}

.tag-link {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--bg-gray);
  color: var(--text-light);
  border-radius: 6px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* 関連記事 */
.related-posts {
  margin-top: var(--spacing-xl);
  background: var(--bg-gray);
  padding: var(--spacing-xl) 0;
}

.related-posts-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.related-posts-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  color: var(--text-color);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.related-posts-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

/* タブレット: 2カラム */
@media (min-width: 768px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* デスクトップ: 3カラム */
@media (min-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* モバイル対応 */
@media (max-width: 767px) {
  .single-post-container {
    margin: var(--spacing-md) 0 0 0;
    padding: 0.5rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  /* スマホでは記事ヘッダーを左寄せ */
  .single-post-header {
    text-align: left;
  }

  .single-post-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
  }

  /* スマホではタイトルの改行を無効化 */
  .single-post-title br {
    display: none;
  }

  /* メタ情報の余白を調整 */
  .single-post-meta {
    row-gap: 0;
    column-gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
  }

  /* パンくずリストを2行までに制限 */
  .breadcrumb-inner {
    row-gap: 0;
    column-gap: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
  }

  .breadcrumb-inner > * {
    display: inline;
    vertical-align: middle;
  }

  .breadcrumb-inner svg {
    display: inline-block;
    vertical-align: middle;
  }

  .breadcrumb-link {
    display: inline;
    vertical-align: middle;
  }

  .breadcrumb-home-icon {
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-right: 0.25rem;
  }

  .breadcrumb-current {
    display: inline;
    vertical-align: middle;
  }

  .single-post-content {
    font-size: 1rem;
  }

  .single-post-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    padding: 0.875rem 1rem;
  }

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

  .single-post-content h4 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
  }

  .related-posts-title {
    font-size: 1.5rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .recommended-grid {
    gap: 0.375rem;
  }

  /* スマホでコンテナのパディングを減らす */
  .single .container {
    padding: 0 var(--spacing-xs);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet - 2カラム表示 */
@media (min-width: 768px) {
  .site-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
  }

  .sidebar {
    margin-top: 0;
  }

  /* 新着記事・おすすめ記事・アーカイブページ - タブレットで2カラム */
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* トップページとアーカイブページはメインコンテンツをより広く */
  .home.blog .site-layout,
  .archive-layout {
    grid-template-columns: 3fr 1fr;
  }
}

/* Desktop - 3カラム表示 */
@media (min-width: 1024px) {
  /* 新着記事・おすすめ記事・アーカイブページ - デスクトップで3カラム */
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra Large Desktop */
@media (min-width: 1200px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .entry-title {
    font-size: 1.5rem;
  }

  .header-inner {
    min-height: 60px;
  }

  .site-branding .custom-logo {
    max-height: 40px;
  }

  .site-title {
    font-size: 1.25rem;
  }

  /* スマホではお問い合わせボタンを非表示 */
  .header-contact {
    display: none;
  }

  /* スマホでハンバーガーメニューを表示 */
  .header-inner .menu-toggle {
    display: block;
  }

  .blog-description {
    padding: var(--spacing-lg) 0;
  }

  .blog-description::before {
    width: 300px;
    height: 300px;
  }

  .blog-description::after {
    width: 250px;
    height: 250px;
  }

  .description-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
  }

  .description-text {
    font-size: 1rem;
    text-align: left;
  }

  .description-text br {
    display: none;
  }

  .description-subtext {
    font-size: 0.9rem;
    text-align: left;
  }

  .description-actions {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .app-link-button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* モバイルで記事を1カラム表示 */
  .article-grid {
    grid-template-columns: 1fr;
  }

  /* おすすめ記事のサムネイルサイズをモバイルで調整 */
  .recommended-card {
    height: 90px;
  }

  .recommended-thumbnail {
    width: 100px;
  }

  .recommended-title {
    font-size: 0.9rem;
  }

  .latest-title {
    font-size: 0.95rem;
  }

  /* モバイルメニュー */
  .menu-toggle {
    display: block;
  }

  .main-navigation .container {
    flex-wrap: wrap;
  }

  .main-navigation {
    height: 0;
    overflow: visible;
    border: none;
  }

  .main-navigation .container {
    height: 0;
    overflow: visible;
    padding: 0;
  }

  /* オーバーレイ */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* スライドメニュー */
  .menu-wrapper {
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    width: 100%;
    background-color: var(--bg-color);
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: left 0.3s ease;
    padding-top: 80px;
  }

  .menu-wrapper.toggled {
    left: 0;
  }

  /* 閉じるボタン */
  .menu-close {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    border-radius: 50%;
  }

  .menu-close:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: rotate(90deg);
  }

  .menu-close svg {
    width: 24px;
    height: 24px;
  }

  .menu-wrapper.toggled ~ .menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* スマホではヘッダーのボタンを非表示 */
  .header-links {
    display: none;
  }

  /* モバイルメニュー内のボタンを表示 */
  .mobile-menu-buttons {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

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

  .main-navigation a {
    padding: 1rem var(--spacing-md);
  }

  /* モバイルのサブメニュー */
  .main-navigation .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background-color: var(--bg-gray);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-navigation .sub-menu.toggled {
    max-height: 500px;
  }

  .main-navigation .sub-menu a {
    padding-left: 2.5rem;
    font-size: 0.875rem;
  }

  .main-navigation .sub-menu .sub-menu {
    margin-left: 0;
  }

  .main-navigation .sub-menu .sub-menu a {
    padding-left: 3.5rem;
  }

  .main-navigation .menu-item-has-children > a::after {
    float: right;
    margin-top: 0.25rem;
  }

  .main-navigation .menu-item-has-children.toggled > a::after {
    transform: rotate(180deg);
  }

  .main-navigation .sub-menu .menu-item-has-children > a::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
  }

  .main-navigation .sub-menu .menu-item-has-children.toggled > a::after {
    transform: rotate(180deg);
  }

  /* スマホでアーカイブヘッダーとパンくずリストを全幅に（親要素をはみ出す） */
  body.archive .archive-header,
  body.search .archive-header {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    padding: 0 !important;
  }

  body.archive .archive-header .container,
  body.search .archive-header .container {
    padding: var(--spacing-lg) 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body.archive .archive-title,
  body.search .archive-title {
    font-size: 1.5rem !important;
  }

  body.archive .breadcrumb,
  body.search .breadcrumb {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    padding: 0 !important;
  }

  body.archive .breadcrumb-inner,
  body.search .breadcrumb-inner {
    padding: var(--spacing-sm) var(--spacing-sm) !important;
    max-width: none !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   No Results (記事が見つからない場合)
   ========================================================================== */

.no-results {
  max-width: 600px;
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-xl);
  text-align: center;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.no-results-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 0 auto var(--spacing-md);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 50%;
  color: var(--text-light);
}

.no-results-icon svg {
  opacity: 0.6;
}

.no-results-title {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
}

.no-results-message {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.no-results-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

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

.button-primary:hover {
  background: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.button svg {
  width: 18px;
  height: 18px;
}

/* モバイル対応 */
@media (max-width: 767px) {
  .no-results {
    padding: var(--spacing-md) var(--spacing-xs);
    margin: var(--spacing-md) auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .no-results-icon {
    width: 100px;
    height: 100px;
  }

  .no-results-icon svg {
    width: 60px;
    height: 60px;
  }

  .no-results-title {
    font-size: 1.5rem;
  }

  .no-results-message {
    font-size: 0.9rem;
  }

  .no-results-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Lifelog Link Section
   ========================================================================== */

.lifelog-link-section {
  margin: var(--spacing-md) 0;
  padding: 0;
}

.lifelog-link {
  display: block;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.lifelog-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lifelog-banner-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* PC時はバナーを70%幅でセンター配置 */
@media (min-width: 769px) {
  .lifelog-link-section {
    text-align: center;
  }

  .lifelog-link {
    display: inline-block;
    width: 70%;
  }
}

/* ==========================================================================
   Supervisor Section
   ========================================================================== */

.supervisor-section {
  margin: var(--spacing-md) 0;
  padding: 0;
}

.supervisor-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.supervisor-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

.supervisor-icon {
  color: var(--primary-color);
  flex-shrink: 0;
}

.supervisor-label-text {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.supervisor-body {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.supervisor-avatar {
  flex-shrink: 0;
}

.supervisor-avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.supervisor-info {
  flex: 1;
  min-width: 0;
}

.supervisor-header {
  margin-bottom: 0.75rem;
}

.supervisor-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.25rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.supervisor-name-image {
  height: 1.5rem;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.supervisor-position {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(13, 148, 136, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.supervisor-bio {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 0;
}

/* モバイル対応 */
@media (max-width: 767px) {
  .lifelog-link-section {
    margin: var(--spacing-sm) 0;
    padding: 0;
  }

  .supervisor-section {
    margin: var(--spacing-sm) 0;
    padding: 0;
  }

  .supervisor-card {
    padding: var(--spacing-sm);
    border-radius: 8px;
  }

  .supervisor-body {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .supervisor-avatar {
    grid-column: 1;
    grid-row: 1;
  }

  .supervisor-avatar-image {
    width: 80px;
    height: 80px;
  }

  .supervisor-info {
    display: contents;
  }

  .supervisor-header {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }

  .supervisor-name {
    font-size: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .supervisor-name-image {
    margin-left: 12px;
  }

  .supervisor-bio {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.875rem;
    text-align: left;
  }

  /* About page mobile */
  .about-page {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .about-title {
    font-size: 1.5rem;
  }

  .about-section h2 {
    font-size: 1.25rem;
  }

  .about-section h3 {
    font-size: 1.125rem;
  }
}

/* ==========================================================================
   Legal Pages (Privacy Policy & Terms)
   ========================================================================== */

/* プライバシーポリシーと利用規約ページのシンプルなスタイル */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.95rem !important;
  line-height: 1.8 !important;
  color: var(--text-color);
}

.legal-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.legal-header .entry-title {
  font-size: 2rem;
  font-weight: 700;
}

/* 見出しをシンプルに */
.legal-content h2 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-top: var(--spacing-lg) !important;
  margin-bottom: var(--spacing-sm) !important;
  padding: 0 0 var(--spacing-xs) 0 !important;
  background: none !important;
  color: var(--text-color) !important;
  border-bottom: 2px solid var(--border-color) !important;
  border-left: none !important;
  border-radius: 0 !important;
}

.legal-content h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-top: var(--spacing-md) !important;
  margin-bottom: var(--spacing-sm) !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  color: var(--text-color) !important;
}

.legal-content h4 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin-top: var(--spacing-sm) !important;
  margin-bottom: var(--spacing-xs) !important;
  color: var(--text-color) !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

.legal-content h4::before {
  display: none !important;
}

/* 段落 */
.legal-content p {
  margin-bottom: var(--spacing-sm) !important;
}

/* リスト */
.legal-content ul,
.legal-content ol {
  margin: var(--spacing-sm) 0 !important;
  padding-left: 1.5rem !important;
}

.legal-content li {
  margin-bottom: 0.5rem !important;
}

.legal-content ul li::marker,
.legal-content ol li::marker {
  color: var(--text-color) !important;
  font-weight: normal !important;
}

/* リンク */
.legal-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--secondary-color);
}

/* 強調をシンプルに */
.legal-content strong {
  font-weight: 700 !important;
  background: none !important;
}

/* テーブル */
.legal-content table {
  font-size: 0.9rem;
}

/* モバイル対応 */
@media (max-width: 767px) {
  .legal-header .entry-title {
    font-size: 1.5rem;
  }

  .legal-content h2 {
    font-size: 1.25rem !important;
  }

  .legal-content h3 {
    font-size: 1.125rem !important;
  }
}

/* ==========================================================================
   Contact Form 7
   ========================================================================== */

.wpcf7 {
  width: 100%;
}

.wpcf7 form {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Form Labels */
.wpcf7 label {
  display: block;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--spacing-xs);
  font-size: 0.9rem;
}

/* Required Label Layout */
.wpcf7 p:has(.wpcf7-validates-as-required) label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Required Indicator */
.wpcf7 p:has(.wpcf7-validates-as-required) label::after {
  content: '必須';
  padding: 0.125rem 0.5rem;
  background: #dc2626;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

/* Form Control Wrapper */
.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  position: relative;
}

/* Input Fields */
.wpcf7 input[type='text'],
.wpcf7 input[type='email'],
.wpcf7 input[type='tel'],
.wpcf7 input[type='url'],
.wpcf7 input[type='number'],
.wpcf7 input[type='date'],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-color);
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 input[type='text']:focus,
.wpcf7 input[type='email']:focus,
.wpcf7 input[type='tel']:focus,
.wpcf7 input[type='url']:focus,
.wpcf7 input[type='number']:focus,
.wpcf7 input[type='date']:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Textarea */
.wpcf7 textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

/* Select */
.wpcf7 select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-sm) center;
  padding-right: calc(var(--spacing-sm) * 2 + 12px);
}

/* Form Rows */
.wpcf7 p {
  margin-bottom: var(--spacing-md);
}

.wpcf7 p:last-of-type {
  margin-bottom: 0;
}

.wpcf7 .wpcf7-form-control.wpcf7-acceptance {
  margin-right: var(--spacing-xs);
}

/* Checkbox and Radio */
.wpcf7 input[type='checkbox'],
.wpcf7 input[type='radio'] {
  margin-right: var(--spacing-xs);
  cursor: pointer;
}

/* Submit Button */
.wpcf7 input[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 200px;
}

.wpcf7 input[type='submit']:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.wpcf7 input[type='submit']:active {
  transform: translateY(0);
}

/* Validation Error */
.wpcf7-not-valid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.wpcf7-not-valid-tip {
  display: block;
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  font-weight: 500;
}

/* Response Messages */
.wpcf7-response-output {
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.wpcf7-mail-sent-ok {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.wpcf7-spam-blocked {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

/* Spinner */
.wpcf7 .ajax-loader {
  display: inline-block;
  margin-left: var(--spacing-sm);
  vertical-align: middle;
}

/* Screen Reader Text */
.wpcf7 .screen-reader-response {
  position: absolute;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

/* Form Title/Description (if using within form) */
.wpcf7 .form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
}

.wpcf7 .form-description {
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .wpcf7 form {
    padding: var(--spacing-md);
  }

  .wpcf7 input[type='submit'] {
    width: 100%;
    min-width: auto;
  }

  .wpcf7 .form-title {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Recommended Books Widget (おすすめの本)
   ========================================================================== */

.widget-recommended-books {
  background-color: var(--bg-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  margin-bottom: var(--spacing-md);
}

.widget-recommended-books .widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

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

.recommended-book-item {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.recommended-book-item:first-child {
  padding-top: 0;
}

.recommended-book-link {
  display: flex;
  gap: var(--spacing-sm);
  color: var(--text-color);
  transition: opacity 0.2s ease;
}

.recommended-book-link:hover {
  opacity: 0.8;
  color: var(--text-color);
}

.recommended-book-image {
  flex-shrink: 0;
  width: 70px;
}

.recommended-book-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recommended-book-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.recommended-book-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommended-book-author {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ==========================================================================
   Single Post Page Layout (投稿ページ2カラムレイアウト)
   ========================================================================== */

.single-page-wrapper {
  display: flex;
  gap: var(--spacing-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.single-page-wrapper .site-main {
  flex: 1;
  min-width: 0;
}

.single-page-wrapper .sidebar {
  flex-shrink: 0;
  width: 300px;
}

.single-page-wrapper .sidebar-single {
  position: sticky;
  top: 50px;
  align-self: flex-start;
}

.single-page-wrapper .sidebar-single .widget-recommended-books {
  margin-bottom: 0;
}

/* スマホではサイドバーを非表示 */
@media (max-width: 1024px) {
  .single-page-wrapper {
    flex-direction: column;
    padding: 0 var(--spacing-sm);
  }

  .single-page-wrapper .sidebar {
    display: none;
  }
}

@media (max-width: 767px) {
  .single-page-wrapper {
    padding: 0 0.75rem;
  }
}

/* 関連記事（全幅表示） */
.related-posts-fullwidth {
  background-color: var(--bg-gray);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
}

.related-posts-fullwidth .related-posts-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}
