/*
 * REDTUNE_FILE_CHARTER_v1
 * PLANE: Frontend
 * ROLE: Top route presentation
 * RESPONSIBILITY: Live discovery and directly comparable rankings using the approved site typography.
 * SIDE_EFFECTS: None. This stylesheet consumes the shared design tokens.
 * END_REDTUNE_FILE_CHARTER_v1
 */

.rt-home { --rt-top-live-blue: #2980b9; background: var(--rt-bg); }
.rt-top-page {
  width: min(var(--rt-wide), calc(100% - var(--rt-gutter) * 2));
  padding-block: clamp(28px, 4vw, 56px) 80px;
}
.rt-top-home, .rt-top-flow { width: 100%; }
.rt-top-flow { display: grid; }
.rt-top-hero { padding-block: 24px clamp(48px, 6vw, 88px); margin-bottom: clamp(36px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: 32px 64px; border-bottom: 1px solid var(--rt-line-soft); }
.rt-top-hero-title { margin: 0; color: var(--rt-ink); font: 700 clamp(32px, 4vw, 56px)/1.5 "Redtune Noto Serif JP", "Noto Serif JP", serif; letter-spacing: -.03em; }
.rt-top-hero-search { width: 100%; max-width: 430px; justify-self: end; }
.rt-top-hero-search label { display: block; margin-bottom: 12px; color: var(--rt-ink); font-size: 14px; font-weight: 600; }
.rt-top-search-field { display: flex; align-items: center; min-width: 0; border: 1px solid var(--rt-line-strong); border-radius: 999px; background: var(--rt-canvas); }
.rt-top-search-field:focus-within { outline: 2px solid var(--rt-accent); outline-offset: 3px; }
.rt-top-search-field input[type="search"] { min-width: 0; width: 100%; min-height: 56px; padding: 12px 0 12px 20px; border: 0; border-radius: inherit; background: transparent; color: var(--rt-ink); font: 400 16px/1.5 var(--rt-font-sans); outline: 0; box-shadow: none; }
.rt-top-search-field button { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--rt-ink); cursor: pointer; }
.rt-top-search-field button:hover { background: var(--rt-neutral-3); }
.rt-top-search-field .rt-symbol { font-size: 24px; }
.rt-top-panel { min-width: 0; padding-block: clamp(36px, 4.4vw, 64px); border-top: 1px solid var(--rt-line-soft); }
.rt-top-live-panel { padding-top: 0; display: grid; gap: 24px; border-top: 0; }
.rt-top-section-head { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.rt-top-section-main { min-width: 0; }
.rt-top-section-title { margin: 0; color: var(--rt-ink); font: 700 clamp(26px, 2.6vw, 36px)/1.5 "Redtune Noto Serif JP", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; letter-spacing: -.025em; }
.rt-top-page [data-rt-live-updated] { display: none; }
.rt-top-section-link { justify-self: end; min-height: 44px; padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; color: var(--rt-accent-ink); font: 500 14px/1.5 var(--rt-font-sans); white-space: nowrap; text-decoration: none; }
.rt-top-section-link svg { width: 20px; height: 20px; flex: 0 0 20px; }
.rt-top-section-link:hover { color: var(--rt-top-live-blue); }
.rt-top-section-link:focus-visible { outline: 2px solid var(--rt-top-live-blue); outline-offset: 4px; }
.rt-top-live-heading-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.rt-top-live-heading { font-size: clamp(28px, 2.8vw, 40px); }
.rt-top-stage-update { margin: 0; color: var(--rt-muted); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.rt-top-live-grid { margin: 0; padding: 0; list-style: none; min-width: 0; display: flex; align-items: start; gap: 24px; touch-action: pan-y pinch-zoom; }
.rt-top-carousel { min-width: 0; position: relative; }
.rt-top-carousel-viewport { overflow: hidden; cursor: grab; }
.rt-top-carousel-viewport.is-dragging, .rt-top-carousel-viewport.is-dragging a { cursor: grabbing; }
.rt-top-carousel-viewport img { user-select: none; -webkit-user-drag: none; }
.rt-top-live-card { flex: 0 0 calc((100% - 48px) / 3); min-width: 0; content-visibility: visible; }
.rt-top-carousel-controls { display: flex; align-items: center; justify-content: flex-end; }
.rt-top-carousel-controls[hidden] { display: none; }
.rt-top-carousel-position { min-width: 76px; margin-right: 4px; color: var(--rt-muted); text-align: right; font: 500 12px/1.5 var(--rt-font-number); font-variant-numeric: tabular-nums; }
.rt-top-carousel-arrow { position: absolute; top: var(--rt-top-arrow-y); z-index: 2; translate: 0 -50%; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 72%); border-radius: 50%; background: rgb(255 255 255 / 76%); color: var(--rt-ink); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); cursor: pointer; }
.rt-top-carousel-arrow svg { width: 18px; height: 18px; }
.rt-top-carousel-arrow.is-prev { left: -24px; }
.rt-top-carousel-arrow.is-next { right: -24px; }
.rt-top-carousel-arrow[hidden] { display: none; }
.rt-top-carousel-arrow:hover:not(:disabled) { background: rgb(255 255 255 / 90%); }
.rt-top-carousel-arrow:disabled { color: var(--rt-subtle); cursor: default; }
.rt-top-rankings { display: grid; gap: 24px; }
.rt-top-rank-board, .rt-top-ranking-rails { min-width: 0; }
.rt-top-ranking-rails { display: grid; gap: 40px; }
.rt-top-ranking-scope { display: grid; gap: 20px; }
.rt-top-ranking-scope-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.rt-top-ranking-scope-heading { min-width: 0; }
.rt-top-ranking-scope-heading .rt-symbol { display: none; }
.rt-top-ranking-scope-head h3 { margin: 0; color: var(--rt-ink); font-size: 22px; font-weight: 600; line-height: 1.5; }
.rt-top-ranking-metric-grid { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rt-top-site-reactions { margin-top: 28px; }
.rt-top-site-reactions .rt-top-reaction-scope-title { margin: 0; color: var(--rt-ink); font-size: 22px; font-weight: 600; line-height: 1.5; }
.rt-top-ranking-metric-card { min-width: 0; padding: 20px; display: grid; align-content: start; gap: 8px; border: 1px solid var(--rt-line-soft); border-radius: 18px; background: #fdfdfd; }
.rt-top-ranking-metric-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rt-top-ranking-metric-head h4, .rt-top-ranking-metric-head h5 { margin: 0; color: var(--rt-ink); font-size: 16px; font-weight: 600; line-height: 1.6; }
.rt-top-ranking-period { flex: 0 0 auto; width: fit-content; padding: 3px; display: grid; grid-template-columns: repeat(2, minmax(44px, auto)); border-radius: 999px; background: var(--rt-neutral-3); }
.rt-top-ranking-metric-link { color: inherit; text-decoration: none; }
.rt-top-ranking-metric-link:hover { color: inherit; text-decoration: none; }
.rt-top-ranking-period button { min-height: 36px; padding: 4px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--rt-muted); font: 500 12px/1.3 var(--rt-font-sans); white-space: nowrap; cursor: pointer; }
.rt-top-ranking-period button[aria-pressed="true"] { color: var(--rt-ink); }
.rt-top-ranking-period:not([data-rt-segment-ready]) button[aria-pressed="true"] { background: var(--rt-canvas); box-shadow: 0 1px 4px rgb(17 24 39 / 8%); }
.rt-top-ranking-list { min-width: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.rt-top-ranking-item + .rt-top-ranking-item { border-top: 1px solid var(--rt-line-soft); }
.rt-top-ranking-item a { min-width: 0; padding-block: 12px; display: grid; grid-template-columns: 16px 48px minmax(0, 1fr); align-items: center; gap: 2px 12px; }
.rt-top-ranking-item:is(.is-live, .is-video) a { grid-template-columns: 16px 120px minmax(0, 1fr); }
.rt-top-ranking-rank { grid-row: 1 / 3; color: var(--rt-muted); font: 500 13px/1.5 var(--rt-font-number); text-align: center; }
.rt-top-ranking-thumb { width: 48px; aspect-ratio: 1; grid-row: 1 / 3; overflow: hidden; border-radius: 6px; }
.rt-top-ranking-thumb.is-channel { border-radius: 50%; }
.rt-top-ranking-thumb:is(.is-live, .is-video) { width: 120px; aspect-ratio: 16 / 9; }
.rt-top-ranking-thumb.is-short { aspect-ratio: 9 / 16; }
.rt-top-ranking-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rt-top-ranking-title { min-width: 0; overflow: hidden; color: var(--rt-ink); font-size: 12px; font-weight: 500; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.rt-top-ranking-item:is(.is-live, .is-video, .is-short) .rt-top-ranking-title { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rt-top-ranking-item a:hover .rt-top-ranking-title { color: var(--rt-accent-ink); }
.rt-top-ranking-value { grid-column: 3; color: var(--rt-ink); font-size: 22px; line-height: 1.3; white-space: nowrap; }

.rt-top-new-face, .rt-top-new-video { display: grid; gap: 28px; }
.rt-top-new-face-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rt-top-new-face-card { min-width: 0; padding: 20px; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 16px; border: 1px solid #eee; border-radius: 14px; background: #fdfdfd; transition: background-color 180ms ease-out; }
.rt-top-new-face-card:hover { background: #fff; }
.rt-top-new-face-card > img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.rt-top-new-face-body { min-width: 0; display: grid; gap: 5px; }
.rt-top-new-face-name { overflow: hidden; color: var(--rt-ink); font-size: 15px; font-weight: 600; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.rt-top-new-face-meta { color: var(--rt-muted); font-size: 12px; line-height: 1.6; }
.rt-top-discovery-group { min-width: 0; display: grid; gap: 20px; }
.rt-top-discovery-group h3 { margin: 0; color: var(--rt-ink); font: 600 18px/1.5 var(--rt-font-sans); }
.rt-top-new-video-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.rt-top-new-video-card { min-width: 0; display: grid; align-content: start; gap: 12px; }
.rt-top-new-video-media { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 14px; }
.rt-top-new-video-list.is-short { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rt-top-new-video-card.is-short .rt-top-new-video-media { aspect-ratio: 9 / 16; }
#rt-top-promotion-list .rt-top-new-video-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
#rt-top-promotion-list .rt-top-new-video-media { aspect-ratio: 16 / 9; background: #fdfdfd; }
#rt-top-promotion-list .is-short .rt-top-new-video-media img { object-fit: contain; }
.rt-top-new-video-media img { width: 100%; height: 100%; object-fit: cover; }
.rt-top-new-video-body { min-width: 0; display: grid; gap: 5px; }
.rt-top-new-video-title { display: -webkit-box; overflow: hidden; color: var(--rt-ink); font-size: 15px; font-weight: 600; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rt-top-new-video-channel { overflow: hidden; color: var(--rt-muted); font-size: 12px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.rt-top-new-video-channel { min-width: 0; display: flex; align-items: center; gap: 8px; }
.rt-top-new-video-channel img { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.rt-top-new-video-channel span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rt-top-ranking-empty,
.rt-top-loading,
.rt-top-load-error { grid-column: 1 / -1; min-height: 7rem; margin: 0; display: flex; align-items: center; color: var(--rt-muted); font-size: 13px; line-height: 1.7; }
.rt-top-load-error { padding: 18px; border: 1px solid color-mix(in srgb, var(--rt-down) 28%, transparent); border-radius: 18px; color: var(--rt-down); }

@media (max-width: 1050px) {
  .rt-top-live-card { flex-basis: calc((100% - 24px) / 2); }
  .rt-top-ranking-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-top-new-face-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .rt-top-section-head { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .rt-top-hero { grid-template-columns: minmax(0, 1fr); padding-top: 8px; gap: 28px; }
  .rt-top-hero-search { max-width: none; }
  .rt-top-live-grid { gap: 16px; }
  .rt-top-live-card { flex-basis: 88%; }
  .rt-top-carousel-arrow.is-prev { left: -12px; }
  .rt-top-carousel-arrow.is-next { right: -12px; }
  .rt-top-live-heading-row { gap: 10px 16px; }
  .rt-top-live-panel .rt-top-section-link { margin-left: auto; }
  .rt-top-ranking-metric-grid { grid-template-columns: 1fr; }
  .rt-top-ranking-metric-card { padding: 18px; }
  .rt-top-ranking-item a { gap: 2px 13px; padding-block: 14px; }
  .rt-top-ranking-value { font-size: 21px; }
  .rt-top-new-face-list { grid-template-columns: 1fr; gap: 12px; }
  .rt-top-new-video-list { grid-template-columns: 1fr; gap: 22px; }
  .rt-top-new-video-card { grid-template-columns: minmax(112px, 38%) minmax(0, 1fr); align-items: center; gap: 12px; }
  .rt-top-new-video-media { border-radius: 8px; }
  .rt-top-new-video-title { font-size: 14px; }
  .rt-top-new-video-list.is-short { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-top-new-video-list.is-short .rt-top-new-video-card { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
  .rt-top-ranking-period button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .rt-top-new-face-card { transition: none; }
}

/* Optional publications share the TOP grid and disappear entirely when empty. */
.rt-top-publication-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; margin-top: 28px; }
.rt-top-publication-card { min-width: 0; }
.rt-top-publication-cover { aspect-ratio: 16 / 9; display: grid; grid-template-columns: 1fr auto; align-content: space-between; padding: 24px; overflow: hidden; border-radius: 16px; background: #f0f5f8; color: #2478ad; text-decoration: none; }
.rt-top-publication-cover.is-image { display: block; padding: 0; background: var(--rt-neutral-3); }
.rt-top-publication-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rt-top-publication-eyebrow { grid-column: 1 / -1; font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.rt-top-publication-month { font-size: clamp(32px, 4vw, 60px); font-weight: 500; line-height: 1; }
.rt-top-publication-year { align-self: end; font-size: 13px; }
/* Report covers are decorative editions, not charts of unmeasured data. */
.rt-top-publication-cover.is-report { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; background: #edf2f4; color: #173e55; padding: clamp(18px, 2vw, 26px); }
.rt-top-report-kicker { font: 600 10px/1.4 var(--rt-font-sans); letter-spacing: .16em; }
.rt-top-report-art { position: absolute; z-index: -1; width: 64%; height: 138%; right: -15%; top: -20%; fill: none; stroke: #247eae; stroke-width: 17; transform: rotate(-22deg); }
.rt-top-report-art circle:nth-child(2) { stroke: #72a9c5; stroke-width: 13; }
.rt-top-report-art circle:nth-child(3) { stroke: #c0d6e1; stroke-width: 11; }
.rt-top-report-imprint { display: grid; justify-items: start; gap: 14px; }
.rt-top-report-word { font: 700 clamp(32px, 3.4vw, 52px)/.95 var(--rt-font-serif-bold); letter-spacing: -.055em; }
.rt-top-report-issue { font: 500 10px/1.4 var(--rt-font-metric); letter-spacing: .035em; }
.rt-top-publication-date { display: block; margin-top: 16px; font-size: 13px; color: var(--rt-muted); }
.rt-top-publication-card h3 { height: 3em; margin: 12px 0 8px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font: 600 17px/1.5 var(--rt-font-sans); overflow-wrap: anywhere; }
.rt-top-publication-card h3 a { color: var(--rt-ink); text-decoration: none; }
.rt-top-publication-card h3 a:hover { color: #2478ad; }
.rt-top-publication-description { margin: 0; color: var(--rt-muted); font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 900px) { .rt-top-publication-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; } }
@media (max-width: 480px) { .rt-top-publication-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

@media (max-width: 620px) {
  .rt-top-section-head, .rt-top-ranking-scope-head { align-items: start; column-gap: 12px; }
  .rt-top-section-title { font-size: 22px; overflow-wrap: anywhere; }
  .rt-top-ranking-scope-head h3 { font-size: 20px; overflow-wrap: anywhere; }
  .rt-top-live-heading-row { gap: 6px; }
  .rt-top-section-link { padding-inline: 12px; }
}
