

.hiwawa-page-ranking-vitality {
  --rk-primary: #ff6b35;
  --rk-primary-deep: #9a3412;
  --rk-primary-mid: #fb923c;
  --rk-accent-warm: #ff9f1c;
  --rk-period-active: linear-gradient(135deg, #ff9f1c 0%, #ff6b35 100%);
  --rk-period-shell: linear-gradient(165deg, #fffdfb 0%, #fff0e8 50%, #ffe8dc 100%);
  --rk-period-border: rgba(255, 107, 53, 0.22);
  --rk-podium-glow: rgba(255, 107, 53, 0.16);
  --rk-countdown: #9a3412;
  --rk-countdown-icon: #ea580c;
}

.ranking-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px 20px;
  padding: 14px 18px;
  margin-bottom: 24px;
  box-sizing: border-box;
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 55%, #eef2f7 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 8px 24px rgba(15, 23, 42, 0.07);
}

.hiwawa-page-ranking-vitality .ranking-period {
  background: var(--rk-period-shell);
  border-color: var(--rk-period-border);
  box-shadow:
    0 1px 2px rgba(255, 107, 53, 0.06),
    0 8px 28px rgba(255, 107, 53, 0.1);
}

.ranking-period__toggles {
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  gap: 3px;
  flex-shrink: 0;
}

.ranking-period__toggles .ranking-period__btn {
  flex: 1 1 0;
  min-width: 5.25rem;
  max-width: 8rem;
}

.ranking-period__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #64748b;
  background: transparent;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  border: none;
  box-shadow: none;
}

.ranking-period__btn:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.75);
}

.hiwawa-page-ranking-vitality .ranking-period__btn:hover {
  color: var(--rk-primary);
}

.ranking-period__btn.is-active {
  color: #fff;
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hiwawa-page-ranking-vitality .ranking-period__btn.is-active {
  background: var(--rk-period-active);
  box-shadow:
    0 2px 12px rgba(255, 107, 53, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ranking-period__countdown {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: #475569;
  max-width: min(100%, 22rem);
  text-align: right;
}

.ranking-period__countdown .fa-clock {
  font-size: 15px;
  opacity: 0.85;
}

.hiwawa-page-ranking-vitality .ranking-period__countdown {
  color: var(--rk-countdown);
}

.hiwawa-page-ranking-vitality .ranking-period__countdown .fa-clock {
  color: var(--rk-countdown-icon);
}

.ranking-period__countdown strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .ranking-period {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-period__toggles {
    width: 100%;
    align-self: flex-start;
    max-width: 100%;
  }

  .ranking-period__toggles .ranking-period__btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    padding-left: 12px;
    padding-right: 12px;
  }

  .ranking-period__countdown {
    margin-left: 0;
    justify-content: flex-start;
    text-align: left;
    align-self: stretch;
    font-size: 12px;
    padding: 10px 8px 4px;
    border-top: 1px dashed rgba(15, 23, 42, 0.1);
    margin: 0 -6px;
  }
}

.ranking-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 2.2vw, 22px);
  margin-bottom: 28px;
  padding: 16px 10px 28px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

@media (min-width: 900px) {
  .ranking-podium {
    padding-left: 0;
    padding-right: 0;
  }
}

.ranking-podium--vitality {
  background:
    radial-gradient(ellipse 85% 55% at 50% 100%, var(--rk-podium-glow) 0%, transparent 65%),
    linear-gradient(180deg, #fff8f3 0%, #ffffff 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ranking-podium__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  width: clamp(92px, 26vw, 118px);
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  transition: transform 0.22s ease, filter 0.2s ease;
}

.ranking-podium__item--r1 {
  order: 2;
  width: clamp(108px, 30vw, 138px);
}

.ranking-podium__item--r2 {
  order: 1;
}

.ranking-podium__item--r3 {
  order: 3;
}

.ranking-podium__item:not(.ranking-podium__item--empty):hover {
  transform: translateY(-5px);
  filter: brightness(1.02);
}

.ranking-podium__item--empty {
  cursor: default;
}

.ranking-podium__crown {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -4px;
  z-index: 4;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}

.ranking-podium__crown .fa-crown {
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  line-height: 1;
}

.ranking-podium__crown--r1 .fa-crown {
  color: #e6b800;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
}

.ranking-podium__crown--r2 .fa-crown {
  color: #a8a8a8;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.ranking-podium__crown--r3 .fa-crown {
  color: #b87333;
}

.ranking-podium__crown-num {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -40%);
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  line-height: 1;
}

.ranking-podium__figure {
  position: relative;
  z-index: 3;
  margin-bottom: -14px;
}

.ranking-podium__avatar {
  width: clamp(68px, 19vw, 86px);
  height: clamp(68px, 19vw, 86px);
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #f3f4f6 0%, #e8eaef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #d1d5db;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 0.75);
}

.ranking-podium__item--r1 .ranking-podium__avatar {
  width: clamp(80px, 23vw, 102px);
  height: clamp(80px, 23vw, 102px);
  border-color: #e6b800;
}

.ranking-podium__item--r2 .ranking-podium__avatar {
  border-color: #9ca3af;
}

.ranking-podium__item--r3 .ranking-podium__avatar {
  border-color: #b87333;
}

.ranking-podium__item--empty .ranking-podium__avatar {
  border-style: dashed;
  opacity: 0.92;
}

.ranking-podium__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-podium__avatar .fa-user {
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: #c4c9d4;
}

.ranking-podium__avatar-placeholder {
  opacity: 0.75;
}

.ranking-podium__pedestal {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ranking-podium__pedestal-lid {
  width: 88%;
  height: clamp(12px, 3vw, 16px);
  border-radius: 50%;
  margin-bottom: clamp(-7px, -1.8vw, -9px);
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.2) 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

.ranking-podium__item--r1 .ranking-podium__pedestal-lid {
  background: linear-gradient(90deg, #f5d547, #d4a017);
}

.ranking-podium__item--r2 .ranking-podium__pedestal-lid {
  background: linear-gradient(90deg, #e5e7eb, #9ca3af);
}

.ranking-podium__item--r3 .ranking-podium__pedestal-lid {
  background: linear-gradient(90deg, #d4945a, #9a5f28);
}

.ranking-podium__pedestal-body {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(16px, 4vw, 22px) 8px clamp(12px, 3vw, 16px);
  border-radius: 0 0 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow:
    inset 5px 0 14px rgba(255, 255, 255, 0.45),
    inset -5px 0 14px rgba(0, 0, 0, 0.05),
    0 10px 24px rgba(15, 23, 42, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.ranking-podium__item--r1 .ranking-podium__pedestal-body {
  min-height: clamp(110px, 28vw, 138px);
  background: linear-gradient(180deg, #e6c84a 0%, #f5e6a8 38%, rgba(255, 255, 255, 0.96) 100%);
}

.ranking-podium__item--r2 .ranking-podium__pedestal-body {
  min-height: clamp(86px, 22vw, 108px);
  background: linear-gradient(180deg, #b8bcc6 0%, #e8eaef 38%, rgba(255, 255, 255, 0.96) 100%);
}

.ranking-podium__item--r3 .ranking-podium__pedestal-body {
  min-height: clamp(72px, 18vw, 92px);
  background: linear-gradient(180deg, #c9904e 0%, #edd5b8 38%, rgba(255, 255, 255, 0.96) 100%);
}

.ranking-podium__name {
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2937;
  line-height: 1.3;
}

.ranking-podium__val {
  font-size: clamp(11px, 2.8vw, 12px);
  font-weight: 600;
  margin-top: 6px;
}

.ranking-podium--vitality .ranking-podium__val {
  color: var(--rk-primary);
}

.ranking-podium__vacant-line1 {
  font-size: clamp(12px, 3.2vw, 13px);
  font-weight: 800;
  color: #4b5563;
  letter-spacing: 0.02em;
}

.ranking-podium__vacant-line2 {
  font-size: clamp(10px, 2.6vw, 12px);
  color: #6b7280;
  margin-top: 6px;
  font-weight: 500;
}

.ranking-podium__item--r2::before,
.ranking-podium__item--r1::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.ranking-podium__item--r2::before {
  width: 10px;
  height: 18px;
  left: -2px;
  bottom: 28%;
  background: linear-gradient(180deg, #e5e7eb, #9ca3af);
  clip-path: polygon(40% 0, 100% 35%, 55% 35%, 80% 100%, 20% 45%, 45% 45%, 0 0);
  filter: blur(0.3px);
}

.ranking-podium__item--r1::after {
  width: 8px;
  height: 14px;
  right: 4px;
  bottom: 22%;
  background: linear-gradient(180deg, #fcd34d, #ca8a04);
  clip-path: polygon(50% 0, 100% 40%, 40% 40%, 70% 100%, 30% 55%, 60% 55%, 0 15%);
  opacity: 0.45;
}

@media (max-width: 480px) {
  .ranking-podium {
    padding: 12px 6px 22px;
    gap: 8px;
  }

  .ranking-podium__figure {
    margin-bottom: -12px;
  }
}

.ranking-main {
  padding: 12px 0 60px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h, 64px));
  min-height: calc(100dvh - var(--header-h, 64px));
  box-sizing: border-box;
}

.ranking-main > .wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.ranking-list:has(.ranking-empty) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}

.ranking-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(255, 107, 53, 0.28);
  margin-bottom: 24px;
}
.ranking-nav__tab {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.ranking-nav__tab.is-active {
  color: #9a3412;
  border-bottom-color: #ff6b35;
}
.ranking-nav__tab:hover {
  color: #ea580c;
}
.ranking-nav__tab i { margin-right: 6px; }

.ranking-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.ranking-list .ranking-empty {
  grid-column: 1 / -1;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.ranking-item:hover {
  background: #fff;
  border-color: rgba(255, 107, 53, 0.45);
  box-shadow: 0 6px 22px rgba(255, 107, 53, 0.12);
  transform: translateY(-2px);
}
.ranking-item__rank {
  width: 26px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
}
.ranking-item__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ranking-item__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ranking-item__avatar i { font-size: 18px; color: #ccc; }
.ranking-item__info { flex: 1; min-width: 0; }
.ranking-item__name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.ranking-item__val { font-size: 13px; color: #c2410c; font-weight: 600; flex-shrink: 0; }
.ranking-item__val i { margin-right: 3px; }

.ranking-empty { text-align: center; padding: 48px 0; color: #aaa; font-size: 15px; }

@media (max-width: 900px) {
  .ranking-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
