/* Summary card images: fixed aspect ratio + cover */
.summary-image-link {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.summary-img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Accessibility: contrast fix for article summaries */
article.bb .f6.gray {
  color: #666;
}
article.bb a.blue {
  color: #1f5fbf;
}
article.bb a.blue:hover,
article.bb a.blue:focus {
  color: #1753a8;
}

/* Category cards */
.category-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Article cards */
article.bb a.color-inherit:hover {
  color: var(--blue, #0074d9);
}

/* YMYL disclosure */
.ymyl-disclosure {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #5d4037;
  border-radius: 0 4px 4px 0;
}
.ymyl-disclosure p {
  margin: 0;
}

/* Affiliate disclosure */
.affiliate-disclosure {
  font-size: 0.75rem;
  color: #999;
  margin: 2rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
}

/* Tables */
article table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
article th,
article td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
article th {
  background: #f5f5f5;
  font-weight: 600;
}
article tr:nth-child(even) {
  background: #fafafa;
}

/* ── Mobile font size adjustments (≤768px) ── */
@media (max-width: 768px) {
  /* Body / article text — scoped to .post-content to override .f4 */
  .single .post-content {
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    line-height: 1.75;
  }

  /* Headings (scoped to single post pages) */
  .single article h1,
  .single .f1 {
    font-size: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    line-height: 1.3;
  }

  .single article h2 {
    font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.15rem);
    line-height: 1.35;
  }

  .single article h3 {
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
    line-height: 1.45;
  }

  /* Card / summary titles (f3 = 1.5rem on desktop) */
  .f3 {
    font-size: 1.15rem;
  }

  /* Site header title (f2 = 2.25rem on desktop) */
  .f2 {
    font-size: 1.5rem;
  }
}

/* ── Desktop font size adjustments (≥769px) ── */
@media (min-width: 769px) {
  .single .post-content {
    font-size: clamp(1.0625rem, 0.98rem + 0.25vw, 1.125rem);
    line-height: 1.75;
  }

  .single .post-content > header h1 {
    font-size: clamp(2.125rem, 1.85rem + 0.75vw, 2.375rem);
    line-height: 1.28;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }
}

/* Share buttons */
.share-buttons { padding: 1rem 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.share-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  margin: 0 0.25rem;
  font-size: 0.875rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}
.share-btn:hover { background: #f5f5f5; border-color: #999; }
.share-x:hover { color: #000; }
.share-line:hover { color: #06c755; border-color: #06c755; }
.share-hatena:hover { color: #00a4de; border-color: #00a4de; }

/* Reference links (smaller text for 参考 sections) */
.reference-links {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666;
}
.reference-links h2 {
  font-size: 1rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .share-buttons span { display: block; margin-bottom: 0.5rem; }
  .share-btn { margin-bottom: 0.5rem; }
  .reference-links { font-size: 0.8125rem; }
}
