/* ranking/index.css */

.ranking-page {
  padding-top: 16px;
}

.ranking-hero {
  margin-bottom: 18px;
}

.hero-title-row-index {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  text-decoration: none;
  color: #232836;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.neumorph-btn {
  border: 1px solid rgba(255,255,255,0.85);
  background: linear-gradient(180deg, #f9fafc 0%, #eef1f6 100%);
  box-shadow: var(--shadow-soft-sm);
}

.neumorph-btn:active {
  transform: translateY(1px);
}

.ranking-hero-sub {
  max-width: 680px;
}

.ranking-panel {
  border-radius: 28px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(251,251,253,0.92) 0%, rgba(245,246,250,0.96) 100%);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow-soft);
}

.ranking-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ranking-panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.ranking-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 255px;
  padding: 16px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #fbfbfd 0%, #f3f5f9 100%);
  border: 1px solid rgba(255,255,255,0.96);
  box-shadow: var(--shadow-soft-sm);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ranking-card:hover {
  transform: translateY(-2px);
  box-shadow:
    12px 12px 24px rgba(24, 29, 39, 0.10),
    -10px -10px 22px rgba(255, 255, 255, 0.9);
  border-color: rgba(255,255,255,1);
}

.ranking-card:active {
  transform: translateY(0);
}

.ranking-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ranking-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-chip-bg, #eef4ff);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    4px 4px 12px rgba(24,29,39,0.05);
}

.ranking-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.ranking-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(20,24,34,0.05);
  color: #5c6474;
  font-size: 16px;
  box-shadow: var(--shadow-soft-sm);
}

.ranking-card-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #171b26;
}

.ranking-card-subtitle {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--card-accent, #5b8def);
  letter-spacing: 0.02em;
}

.ranking-card-desc {
  margin: 0;
  color: #6c7484;
  font-size: 13px;
  line-height: 1.65;
  flex: 1;
}

.ranking-card-footer {
  margin-top: 16px;
}

.ranking-card-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(237,240,246,0.96) 100%);
  border: 1px solid rgba(20,24,34,0.06);
  color: #313847;
  font-size: 13px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    4px 4px 10px rgba(24,29,39,0.05);
}

.ranking-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 100px;
  height: 100px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--card-soft, rgba(130, 170, 255, 0.12)) 0%, rgba(255,255,255,0) 72%);
  pointer-events: none;
}

/* theme colors */
.theme-childcare {
  --card-accent: #ef6a9f;
  --card-soft: rgba(239, 106, 159, 0.16);
  --card-chip-bg: #ffeaf2;
}

.theme-living {
  --card-accent: #4f86f7;
  --card-soft: rgba(79, 134, 247, 0.16);
  --card-chip-bg: #eaf1ff;
}

.theme-cost {
  --card-accent: #3aa987;
  --card-soft: rgba(58, 169, 135, 0.16);
  --card-chip-bg: #e9fbf4;
}

.theme-police {
  --card-accent: #f1aa35;
  --card-soft: rgba(241, 170, 53, 0.18);
  --card-chip-bg: #fff4dd;
}

.theme-korei {
  --card-accent: #8b7df5;
  --card-soft: rgba(139, 125, 245, 0.16);
  --card-chip-bg: #efeaff;
}

.theme-moving {
  --card-accent: #ef7f74;
  --card-soft: rgba(239, 127, 116, 0.16);
  --card-chip-bg: #ffeceb;
}

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

@media (max-width: 640px) {
  .ranking-panel {
    padding: 14px;
    border-radius: 24px;
  }

  .ranking-panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .ranking-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ranking-card {
    min-height: 230px;
    padding: 15px;
    border-radius: 22px;
  }

  .ranking-card-title {
    font-size: 26px;
  }

  .back-btn {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 14px;
  }
}