/*
 * YouTube Ranking - SEO / visual enhancement layer
 * 2026-09-19
 * Existing assets/style.css remains the base stylesheet.
 */

.section-lead,
.ranking-description,
.page-intro > p:not(.eyebrow),
.seo-discovery-copy p,
.channel-seo-copy p,
.faq-section p {
  line-height: 1.85;
}

.ranking-description {
  margin: 8px 0 22px;
  color: #4b5563;
}

.seo-discovery,
.page-intro,
.faq-section,
.channel-seo-copy,
.related-section,
.latest-detail.visual-latest {
  margin: 34px 0;
}

.seo-discovery {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  gap: 24px;
  align-items: stretch;
  padding: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #fff7f7 48%, #f8fafc 100%);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .07);
}

.seo-discovery h2,
.page-intro h1,
.faq-section h2,
.channel-seo-copy h2,
.related-section h2,
.visual-latest h2 {
  margin-top: 6px;
}

.seo-chip-cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.seo-chip-cloud a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 11px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  background: #fff;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.seo-chip-cloud a:hover,
.seo-chip-cloud a:focus-visible {
  transform: translateY(-2px);
  border-color: #d1d5db;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}

.page-intro {
  padding: 28px 30px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff7f7, #fff, #f8fafc);
  border: 1px solid #e5e7eb;
}

.page-intro .eyebrow,
.seo-discovery .eyebrow,
.visual-latest .eyebrow {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  color: #b91c1c;
}

.visual-intro {
  position: relative;
  overflow: hidden;
}

.visual-intro::after {
  content: "▶";
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(56px, 9vw, 112px);
  line-height: 1;
  color: rgba(220, 38, 38, .07);
  pointer-events: none;
}

.category-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 38px;
}

.category-visual-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 9px 26px rgba(15, 23, 42, .06);
  transition: transform .16s ease, box-shadow .16s ease;
}

.category-visual-card:hover,
.category-visual-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 15px 34px rgba(15, 23, 42, .11);
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 92px);
  gap: 2px;
  min-height: 186px;
  background: #f3f4f6;
}

.category-collage:empty::before {
  content: "YouTube";
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-weight: 900;
  letter-spacing: .08em;
}

.category-collage img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}

.category-visual-card .category-en {
  margin: 16px 18px 2px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.category-visual-card strong {
  margin: 0 18px 4px;
  font-size: 18px;
  line-height: 1.45;
}

.category-visual-card > span:last-child {
  margin: 0 18px 17px;
  color: #6b7280;
  font-size: 13px;
}

.faq-section {
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
}

.faq-section details {
  border-top: 1px solid #e5e7eb;
}

.faq-section details:last-child {
  border-bottom: 1px solid #e5e7eb;
}

.faq-section summary {
  cursor: pointer;
  padding: 17px 4px;
  font-weight: 800;
  line-height: 1.55;
}

.faq-section details p {
  margin: -4px 4px 18px;
  color: #4b5563;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 24px;
  color: #6b7280;
  font-size: 13px;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.seo-channel-detail {
  align-items: start;
}

.seo-channel-detail .channel-avatar-large {
  width: min(300px, 34vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
}

.channel-catch {
  margin: 6px 0 18px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.75;
}

.channel-description {
  margin: 24px 0 18px;
  padding: 20px 22px;
  border-radius: 16px;
  background: #f8fafc;
}

.channel-description h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.channel-description p {
  margin: 0;
  line-height: 1.85;
}

.updated-at {
  color: #6b7280;
  font-size: 12px;
}

.visual-latest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .95fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
}

.visual-latest img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

.visual-latest h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.55;
}

.visual-latest time {
  color: #6b7280;
  font-size: 13px;
}

.channel-seo-copy {
  padding: 24px 26px;
  border-left: 5px solid #dc2626;
  border-radius: 0 18px 18px 0;
  background: #fff7f7;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 13px;
  align-items: center;
  padding: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 7px 19px rgba(15, 23, 42, .05);
}

.related-card img,
.related-placeholder {
  grid-row: 1 / 3;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: #f3f4f6;
}

.related-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.related-card span:last-child {
  color: #6b7280;
  font-size: 12px;
}

.search-form {
  display: flex;
  gap: 10px;
  margin: 22px 0 30px;
}

.search-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font: inherit;
}

.search-form button {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 900px) {
  .seo-discovery,
  .visual-latest {
    grid-template-columns: 1fr;
  }

  .category-visual-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .seo-discovery,
  .page-intro,
  .faq-section,
  .channel-seo-copy,
  .visual-latest {
    padding: 20px;
    border-radius: 17px;
  }

  .seo-chip-cloud,
  .category-visual-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .category-collage {
    grid-template-rows: repeat(2, 110px);
  }

  .seo-channel-detail .channel-avatar-large {
    width: 100%;
    height: auto;
    max-width: 360px;
    aspect-ratio: 1 / 1;
  }

  .visual-intro::after {
    display: none;
  }

  .search-form {
    flex-direction: column;
  }
}

.pagination { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:24px 0; }
.visual-latest a { color:inherit; }
@media (max-width:760px) {
  body > header { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; }
  header .brand { width:auto; min-width:0; white-space:normal; overflow-wrap:anywhere; }
  header .language { position:static; grid-column:2; grid-row:1; width:auto; margin:0; }
  header .language label { display:block; }
  header .language select { width:76px; max-width:100%; }
  header nav { grid-column:1 / -1; grid-row:2; min-width:0; width:100%; }
}
