/* 追加スタイル（Tailwind 補助） */
/* top/index.html と同一トークン・ヘッダー寸法（.wrap / .header-inner / .site-header） */
:root {
  --max: 1120px;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.site-header {
  position: static;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 68px;
}

/* ブランド左・ポイント＆プロフィール右（中身の HTML はそのまま） */
.yt-header-inner {
  justify-content: space-between;
  column-gap: 12px;
}

.yt-header-brand {
  min-width: 0;
}

.yt-header-actions {
  flex: 0 0 auto;
  min-width: 0;
  justify-content: flex-end;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
  text-decoration: none;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui,
    -apple-system, sans-serif;
}

.site-header .brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.site-header .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }
}

/* スマホ：ヘッダーを折り返し、ポイント行がはみ出さないようにする */
@media (max-width: 640px) {
  .site-header .yt-header-inner {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-header .yt-header-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .site-header .yt-header-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .site-header .yt-header-brand-text {
    font-size: 1.05rem;
  }

  .header-inner {
    gap: 10px;
  }
}

/* ランキング index.php と同一（メイン枠・←ホームへの余白） */
.cmr-app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 20px 3rem;
  box-sizing: border-box;
}

.cmr-app__top-link {
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.9rem;
}

.cmr-app__top-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.cmr-app__top-link a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .cmr-app {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* カード上でタイトル（最大15文字）が1行に収まるサイズ */
.card-video-title {
  width: 100%;
  text-align: center;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.65rem, 2.85vw + 0.2rem, 0.9rem);
  letter-spacing: -0.02em;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
