@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Inter:wght@400;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
}

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

body {
  font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
}

.site-logo span.badge {
  background: #2563eb;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.925rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--text-muted);
}

.site-nav a:hover {
  color: var(--text-main);
}

/* Layout */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.main-layout > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    margin-top: 1.25rem;
  }
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

/* Article Typography */
.article-content {
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-content h1 {
  font-size: 1.85rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  font-weight: 900;
  color: #0f172a;
}

@media (max-width: 640px) {
  .article-card {
    padding: 1.25rem !important;
  }

  .article-content h1 {
    font-size: 1.4rem;
    line-height: 1.35;
  }

  .article-content h2 {
    font-size: 1.25rem;
  }
}

.article-content h2 {
  font-size: 1.45rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

.article-content h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary);
}

.article-content h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.article-content p {
  margin-bottom: 1.4rem;
  font-size: 1rem;
  color: #334155;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
  color: #334155;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  max-width: 100%;
  font-size: 0.875rem;
}

/* Callouts / Blockquotes */
.article-content blockquote {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content blockquote p {
  margin-bottom: 0.5rem;
}

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

/* Tables - Horizontal scroll on mobile without vertical character squishing */
.article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  word-break: normal;
  overflow-wrap: normal;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: normal;
}

.article-content th {
  background: #f1f5f9;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
  white-space: nowrap;
}

.article-content td:first-child {
  min-width: 190px;
  font-weight: 600;
}

.article-content td:not(:first-child) {
  white-space: nowrap;
}

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

/* AdSense Containers */
.ad-slot {
  display: block;
  width: 100%;
  margin: 1.5rem 0;
  text-align: center;
}

.ad-slot-horizontal {
  min-height: 90px;
  width: 100%;
}

.ad-slot-rectangle {
  min-height: 250px;
  width: 100%;
}

/* Tags */
.tag-badge {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 600;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0;
  margin-top: 4rem;
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #ffffff;
}

/* Breadcrumb & Post Header */
.breadcrumb-nav {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-nav a {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

.article-card {
  padding: 2.25rem;
}

.post-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1.5rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.category-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
}

.post-tags {
  margin-top: 1rem;
}

.mid-ad-wrapper {
  margin: 2.5rem 0;
}

/* Responsive YouTube Container */
.youtube-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.youtube-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.chapter-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: -1rem 0 2rem;
  font-size: 0.9rem;
  color: #334155;
}

.affiliate-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  padding: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Semantic Affiliate Product Cards */
.affiliate-card {
  background: #f8fafc;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.affiliate-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.affiliate-card__badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.affiliate-card__price {
  font-weight: 800;
  color: var(--text-main);
  font-size: 1.1rem;
}

.affiliate-card__title {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.affiliate-card__desc {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 1rem;
}

.affiliate-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-affiliate {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-affiliate:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-affiliate--amazon {
  background: #ff9900;
  color: #111111;
}

.btn-affiliate--amazon:hover {
  color: #111111;
}

.btn-affiliate--rakuten {
  background: #bf0000;
  color: #ffffff;
}

.btn-affiliate--rakuten:hover {
  color: #ffffff;
}

/* Interactive FAQ Accordion */
details.faq-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: '＋';
  font-weight: 900;
  color: var(--primary);
  margin-left: 0.75rem;
}

details.faq-item[open] summary::after {
  content: '－';
}

details.faq-item p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
}

/* Author Box & Sidebar */
.author-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-top: 3rem;
}

.author-box__inner {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.author-box__avatar {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.author-box__title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
}

.author-box__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0 !important;
}

.sidebar-card {
  margin-bottom: 2rem;
}

.sidebar-card--mt {
  margin-top: 2rem;
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.sidebar-device-list {
  font-size: 0.85rem;
  color: #475569;
  padding-left: 1.25rem;
}

.sidebar-topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.sidebar-topic-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-topic-item:last-child {
  border-bottom: none;
}

.sidebar-topic-link {
  color: #334155;
}

/* Homepage Hero & Dynamic Feed */
.hero-banner {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-banner__inner {
  max-width: 700px;
}

.hero-banner__badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
}

.hero-banner__title {
  font-size: 2.1rem;
  line-height: 1.3;
  font-weight: 900;
  margin: 1rem 0 0.75rem 0;
  color: #ffffff;
}

.hero-banner__desc {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .hero-banner {
    padding: 1.5rem 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .hero-banner__title {
    font-size: 1.45rem;
  }
}

.feed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.feed-header__title {
  font-size: 1.35rem;
  font-weight: 800;
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  color: var(--text-main);
}

.feed-header__count {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Filter Bar & Search */
.feed-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.feed-search-wrap {
  position: relative;
  width: 100%;
}

.feed-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.feed-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.feed-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
}

.feed-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-pill-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.filter-pill-btn.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Post Feed List */
.post-feed-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-card[hidden] {
  display: none !important;
}

.post-card__inner {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.post-card__thumb-wrap {
  flex: 0 0 240px;
  max-width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  display: block;
}

@media (max-width: 640px) {
  .post-card__thumb-wrap {
    flex: 1 1 100%;
  }
}

.post-card__thumb {
  width: 100%;
  height: 145px;
  object-fit: cover;
  display: block;
}

.post-card__video-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.post-card__body {
  flex: 1;
  min-width: 240px;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.post-card__cat {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.post-card__title {
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 800;
  margin-bottom: 0.55rem;
}

.post-card__link {
  color: var(--text-main);
  text-decoration: none;
}

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

.post-card__excerpt {
  color: #475569;
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dynamic Load More + Numbered Paginator */
.pagination-wrapper {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.btn-load-more {
  width: 100%;
  max-width: 380px;
  padding: 0.85rem 1.5rem;
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.btn-load-more:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-load-more[hidden] {
  display: none !important;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

.page-btn.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.feed-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}


