/* Ranking page (ranking.html) — page-specific styles */

body.page-ranking { background: var(--color-black); font-family: 'Noto Sans JP', var(--font-display), sans-serif; }

/* ===== Hero ===== */
.ranking-hero { padding: 80px 0 60px; background-image: url('../../img/marble-dark.jpg'); }
.ranking-hero .marble-section__overlay { background: rgba(12, 12, 12, 0.85); }
.ranking-hero__title { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.ranking-hero__lead { font-size: 0.85rem; color: var(--color-text-cream); line-height: 2; font-weight: 300; max-width: 500px; margin: 0 auto; }

/* ===== All rankings wrapper ===== */
.ranking-content { padding-top: 60px; padding-bottom: 100px; }
.ranking-group { margin-bottom: 80px; scroll-margin-top: 120px; }

/* ===== Period tabs (daily / weekly / monthly) ===== */
.ranking-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; }
.ranking-tab {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 28px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.ranking-tab:hover { color: var(--color-text-cream); border-color: var(--color-gold); }
.ranking-tab.is-active { color: var(--color-black); background: var(--color-gold); border-color: var(--color-gold); font-weight: 600; }
.ranking-panel { display: none; }
.ranking-panel.is-active { display: block; }
.ranking-group__head { text-align: center; margin-bottom: 40px; }
.ranking-group__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; letter-spacing: 0.1em; margin-bottom: 8px; }
.ranking-group__desc { font-size: 0.82rem; color: var(--color-text-muted); font-weight: 300; }
.ranking-group__rule { width: 40px; height: 1px; background: var(--color-gold); margin: 16px auto 0; }

/* ===== Podium (top 3) ===== */
.ranking-podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; max-width: 800px; margin: 0 auto 32px; }
.ranking-podium__item { flex: 1; max-width: 220px; text-align: center; display: block; text-decoration: none; color: inherit; }
.ranking-podium__item--first { flex: 1.3; max-width: 280px; }
.ranking-podium__photo-wrap { position: relative; margin: 0 auto 12px; width: 140px; height: 180px; }
.ranking-podium__item--first .ranking-podium__photo-wrap { width: 180px; height: 220px; }
.ranking-podium__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(12, 12, 12, 0.9);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #a8a8a8;
}
.ranking-podium__badge span { font-family: var(--font-display); font-size: 0.7rem; color: #d4d4d4; font-weight: 600; }
.ranking-podium__badge--gold { border-color: var(--color-gold); }
.ranking-podium__badge--gold span { color: var(--color-gold); }
.ranking-podium__badge--bronze { border-color: #b87333; }
.ranking-podium__badge--bronze span { color: #d4a06a; }
.ranking-podium__badge .ranking-trend { font-size: 1rem; font-weight: 700; line-height: 1; }
.ranking-podium__badge .ranking-trend--up { color: #7cc37f; }
.ranking-podium__badge .ranking-trend--down { color: #e08787; }
.ranking-podium__badge .ranking-trend--stable { color: var(--color-text-muted); }
.ranking-podium__frame {
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(135deg, #a8a8a8 0%, #d4d4d4 50%, #a8a8a8 100%);
  transition: transform 0.3s ease;
}
.ranking-podium__frame--gold { background: linear-gradient(135deg, var(--color-gold) 0%, #f0d68a 50%, var(--color-gold) 100%); }
.ranking-podium__frame--bronze { background: linear-gradient(135deg, #b87333 0%, #d4a06a 50%, #b87333 100%); }
.ranking-podium__item:hover .ranking-podium__frame { transform: scale(1.05); }
.ranking-podium__frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.ranking-podium__name { font-family: var(--font-display); font-size: 1rem; font-weight: 500; letter-spacing: 0.08em; margin-bottom: 4px; }
.ranking-podium__item--first .ranking-podium__name { font-size: 1.2rem; }
.ranking-podium__meta { font-size: 0.7rem; color: var(--color-text-muted); margin-bottom: 4px; }
.ranking-podium__tag { font-size: 0.72rem; color: var(--color-gold); font-weight: 400; }
.ranking-podium__points { font-size: clamp(0.75rem, 2.4vw, 1rem); color: var(--color-text-cream); font-weight: 600; margin-top: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking-podium__points span { font-size: 0.68rem; color: var(--color-text-muted); font-weight: 300; margin-left: 2px; }

/* ===== 4th and below list ===== */
.ranking-list { max-width: 600px; margin: 0 auto; }
.ranking-list__row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); text-decoration: none; color: inherit; }
.ranking-list__num { position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 6px; border-radius: 50%; background: var(--color-dark-grey); border: 1px solid var(--color-border); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--color-text-muted); }
.ranking-list__trend {
  position: absolute;
  top: -9px;
  right: -9px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border-radius: 12px;
  background: var(--color-black);
  border: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.ranking-list__trend--up { color: #7cc37f; border-color: #7cc37f; }
.ranking-list__trend--down { color: #e08787; border-color: #e08787; }
.ranking-list__trend--stable { color: var(--color-text-muted); }
.ranking-list__trend--new { color: var(--color-gold); border-color: var(--color-gold); font-size: 0.62rem; padding: 0 5px; }
.ranking-list__photo { flex-shrink: 0; overflow: hidden; width: 48px; height: 48px; border-radius: 10px; }
.ranking-list__photo img { width: 100%; height: 100%; object-fit: cover; }
.ranking-list__body { flex: 1; min-width: 0; }
.ranking-list__name { font-size: 0.9rem; font-weight: 500; letter-spacing: 0.05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list__meta { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 2px; }
.ranking-list__tag { flex-shrink: 0; margin-left: auto; padding-left: 12px; max-width: 38%; font-size: 0.72rem; color: var(--color-gold); font-weight: 400; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list__points { flex-shrink: 0; font-size: clamp(0.82rem, 3.2vw, 1.1rem); color: var(--color-text-cream); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking-list__points span { font-size: 0.65rem; color: var(--color-text-muted); font-weight: 300; margin-left: 2px; }

/* ===== CTA ===== */
.ranking-cta { margin-top: 32px; }

/* ===== Mobile: No.1 on top (full width), No.2/No.3 side by side below — keeps all three photos large ===== */
@media (max-width: 480px) {
  .ranking-podium { flex-wrap: wrap; row-gap: 24px; column-gap: 12px; }
  .ranking-podium__item--first { order: -1; flex: 0 0 100%; max-width: none; }
  .ranking-podium__item { flex: 1 1 0; max-width: none; }
  .ranking-podium__photo-wrap { width: 130px; height: 167px; }
  .ranking-podium__item--first .ranking-podium__photo-wrap { width: 200px; height: 244px; }

  /* Balance the period tabs so all three take equal width in one row */
  .ranking-tabs { flex-wrap: nowrap; gap: 8px; }
  .ranking-tab { flex: 1; padding: 10px 6px; font-size: 0.68rem; letter-spacing: 0.05em; text-align: center; }

  .ranking-list__row { gap: 10px; padding: 14px 12px; flex-wrap: wrap; }
  .ranking-list__photo { width: 64px; height: 64px; }
  .ranking-list__name { font-size: 1.05rem; }
  .ranking-list__tag { flex: 0 0 100%; max-width: 100%; margin-left: 0; padding-left: 0; padding-top: 6px; text-align: left; font-size: 0.68rem; white-space: normal; }
}
@media (max-width: 360px) {
  .ranking-podium__photo-wrap { width: 112px; height: 144px; }
  .ranking-podium__item--first .ranking-podium__photo-wrap { width: 176px; height: 215px; }

  .ranking-tab { font-size: 0.6rem; padding: 9px 2px; }
  .ranking-list__row { gap: 8px; }
}
