/* ========================================
   열공 순위 모달
======================================== */
.ranking-modal-content {
  display: flex;
  justify-content: center;
  padding: 50px 50px 40px;
  gap: 32px;
}

.ranking-modal-content h4 {
  text-align: left;
  position: relative;
}

.ranking-modal-content h4 img {
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.ranking-modal-content h4 strong {
  display: inline-block;
  font-size: 24px;
  font-weight: 900;
  text-align: left;
  line-height: 30px;
  letter-spacing: -0.05em;
  vertical-align: middle;
  position: relative;
  z-index: 0;
}

/* 제목 하이라이트 */
.ranking-modal-content h4 strong::before {
  content: "";
  display: block;
  height: 10px;
  background-color: #fffa7a;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: -1;
  border-radius: 24px;
}

.ranking-modal-left ul {
  margin-top: 12px;
  margin-left: 12px;
}

.ranking-modal-left ul li {
  text-align: left;
  font-size: 16px;
  font-weight: bold;
  list-style-type: disc;
}

.ranking-modal-info {
  position: relative;
  text-align: left;
  margin-left: 12px;
  text-indent: -2px;
}

/* 주의사항 아이콘 */
.icon-cross {
  display: inline-block;
  height: 16px;
  position: relative;
}

.icon-cross::before {
  content: "";
  display: block;
  width: 6px;
  height: 2px;
  background-color: #5a371e;
  border-radius: 3px;
  position: absolute;
  left: -13px;
  top: 10px;
}

.icon-cross::after {
  content: "";
  display: block;
  width: 2px;
  height: 6px;
  background-color: #5a371e;
  border-radius: 3px;
  position: absolute;
  left: -11px;
  top: 8px;
}

.ranking-modal-right ul {
  margin-top: 12px;
  margin-left: 12px;
}

.ranking-modal-right ul li {
  text-align: left;
  font-size: 16px;
  font-weight: bold;
  list-style-type: disc;
}

/* 초코칩 보상 테이블 */
.chocochip-rankings {
  background-color: #f4f4f4;
  border-radius: 10px;
  padding: 20px;
  margin: 10px 0;
}

.chocochip-rankings img {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.chocochip-rankings ol {
  column-count: 2;
  column-fill: balance;
}

.chocochip-rankings ol li {
  text-align: left;
  font-size: 14px;
  font-weight: bold;
}

.chocochip-rankings ol li strong {
  font-weight: 900;
}

/* ========================================
   열공순위 메인 컨텐츠
======================================== */

/* 레이아웃 */
.page-ranking .contents-w {
  padding-bottom: 0;
  max-height: 49.125rem;
  min-height: 49.125rem;
}
.ranking-contents {
  display: grid;
  grid-template-columns: 3fr 8fr;
  height: 100%;
}

.ranking-sidebar {
  background-color: #fff9e2;
}

.ranking-my-summary {
  height: 100%;
}

.ranking-main-content {
  padding: 30px 60px 0;
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ranking-top-badge-area {
  text-align: center;
  flex: none;
}

/* 1등 / 201등 이상 / 순위 없을 때 */
.ranking-hero-section {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

/* 2~100등 VS 비교 */
.ranking-hero-section.versus {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ranking-board-area {
  margin-top: 38px;
  border-top: 1px dashed #ddd;
  padding: 10px 8px 0;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* ========================================
   컴포넌트
======================================== */

/* 사이드바 타이틀 */
.ranking-summary-title {
  background-color: #5a371e;
  border-radius: 0 10px 10px 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  display: inline-block;
  padding: 8px 20px 8px 89px;
  margin-top: 30px;
  position: relative;
  flex: none;
}

.ranking-summary-title img {
  position: absolute;
  bottom: 0;
  left: 24px;
}

.ranking-date-period {
  margin: 12px 0 0 40px;
  font-size: 16px;
  font-weight: bold;
}

.ranking-date-period span {
  font-weight: normal;
  padding-left: 2px;
}

/* 캐릭터 비주얼 */
.ranking-character-visual {
  position: relative;
  text-align: center;
  background: linear-gradient(to bottom, transparent calc(100% - 56px), #ffefb6 calc(100% - 56px));
}

.ranking-character-visual img {
  width: 210px;
  position: relative;
  z-index: 1;
}

.ranking-character-visual::before {
  content: "";
  display: block;
  position: absolute;
  width: 143px;
  height: 82px;
  background: url("../../_images/bg_rank_table.png") no-repeat 0/100%;
}

.ranking-character-visual::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 20px;
  right: 50px;
  width: 81px;
  height: 49px;
  background: url("../../_images/bg_rank_books.png") no-repeat 0/100%;
}

/* 정보 카드 */
.ranking-info-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  background-color: #ffefb6;
  height: 100%;
  padding: 0 50px;
}

.ranking-card {
  border: 2px solid #f7e4a0;
  border-radius: 20px;
  width: 240px;
  text-align: center;
  font-weight: 800;
  overflow: hidden;
}

.ranking-card-label {
  font-size: 20px;
  padding: 10px 0 12px;
  background-color: #fff9e3;
}

.ranking-card-value {
  background-color: #ffffff;
  padding: 10px 0 10px;
  font-weight: 900;
}

/* 순위 변동 뱃지 */
.ranking-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0px 8px 0 4px;
  border-radius: 22px;
  font-size: 16px;
  line-height: 1.375;
  margin-top: 4px;
}

.ranking-status img {
  margin-right: -2px;
  vertical-align: middle;
}

.ranking-status.up {
  background-color: #ffe3e6;
  color: #ff667e;
}

.ranking-status.down {
  background-color: #d9efff;
  color: #51abec;
}

.ranking-num-bold {
  font-size: 32px;
  font-weight: 900;
  color: #ff6371;
  vertical-align: text-bottom;
}

.ranking-period-badge {
  display: inline-block;
  text-align: center;
  background-color: #f4f4f4;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 130%;
  color: #888888;
  font-weight: bold;
}

/* 메시지 박스 */
.ranking-hero-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ranking-congrats-box {
  background: url("../../_images/bg_rank_note.svg") no-repeat 0 / 100% auto;
  padding: 41px 49px 46px 30px;
  margin-bottom: -9px;
  margin-top: 20px;
}

.ranking-congrats-title {
  color: #ff6371;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.34;
  background: url("../../_images/bg_rank_important_line.svg") no-repeat 0 100%;
}

.ranking-congrats-title img {
  vertical-align: super;
}

.ranking-congrats-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.05em;
}
/* 프로필 아바타 */
.ranking-avatar-container {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

/* 장식 효과 - 기본 (118px) */
.ranking-avatar-container.decorate::before {
  content: "";
  background:
    url("../../_images/icon_rank_deco_left.svg") no-repeat left 0 bottom,
    url("../../_images/icon_rank_deco_right.svg") no-repeat right 0 top;
  display: block;
  position: absolute;
  inset: -16px -26px 0 -20px;
}

/* 장식 효과 - 큰 사이즈 (150px, 1등용) */
.ranking-avatar-container.lg.decorate::before {
  background:
    url("../../_images/icon_rank_deco_left.svg") no-repeat left 0 bottom / 40px auto,
    url("../../_images/icon_rank_deco_right.svg") no-repeat right 0 top / 54px auto;
  inset: -17px -35px 0 -48px;
}

.ranking-avatar-container.lg .profile .profile-img {
  width: 150px;
}

.ranking-avatar-container .profile {
  position: relative;
}

.ranking-avatar-container .profile-crown {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-10px, -50%) rotate(-30deg);
}

.ranking-avatar-container .profile-badge {
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 46px;
  height: auto;
}

.ranking-avatar-container .profile .profile-img {
  width: 118px;
}

.ranking-avatar-container .profile .profile-rank-badge {
  position: absolute;
  bottom: 0;
  left: -14px;
  width: 58px;
  height: auto;
}

.ranking-avatar-container.lg .profile-crown {
  width: 78px;
}

.ranking-avatar-container.lg .profile-badge {
  width: 56px;
  height: auto;
}

/* 히어로 텍스트 */
.ranking-hero-text {
  display: inline-block;
  vertical-align: middle;
  margin-top: 14px;
}

.ranking-avatar-container + .ranking-hero-text {
  margin-left: 34px;
}

.ranking-hero-text + .ranking-avatar-container {
  margin-left: 34px;
}

.ranking-hero-rank {
  font-size: 23px;
  font-weight: 900;
  color: #ff667e;
}

.ranking-hero-text.lg .ranking-hero-rank {
  font-size: 30px;
}

.ranking-hero-text.lg .ranking-hero-rank .ranking-status {
  font-size: 23px;
}

.ranking-hero-rank .ranking-status img {
  width: 23px;
}

.ranking-hero-nickname {
  font-size: 28px;
  font-weight: 800;
  position: relative;
  line-height: 1.4;
  z-index: 0;
}

.ranking-hero-text.lg .ranking-hero-nickname {
  font-size: 34px;
}

/* 닉네임 하이라이트 */
.ranking-hero-nickname::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12px;
  background-color: #fffa7a;
  z-index: -1;
}

.ranking-hero-desc {
  font-size: 18px;
  font-weight: 700;
  color: #666;
  line-height: 1.4;
  margin-top: 2px;
}

.ranking-hero-text.lg .ranking-hero-desc {
  font-size: 22px;
}

/* VS 비교 - 두 번째 사람 */
.ranking-hero-text.second .ranking-hero-rank {
  color: #5a371e;
}

.ranking-hero-text.second .ranking-hero-nickname:after {
  background-color: #eeeeee;
}
/* 순위 목록 아이템 */
/* 순위 목록 */
.ranking-list-item {
  padding: 14px 34px;
  display: flex;
  align-items: center;
}

.ranking-my-row {
  background-color: #fff2f4;
  border-radius: 12px;
}

.ranking-col-num {
  margin-right: 30px;
  width: 42px;
  text-align: center;
}

/* 4등 이상은 숫자로 표시 */
.ranking-col-num .ranking-badge-circle {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
}

/* 1~3등은 이미지로 표시 */
.ranking-col-num img {
  width: 42px;
}

.ranking-col-thumb .profile {
  position: relative;
}

.ranking-col-thumb .profile .profile-img {
  width: 62px;
  border-radius: 100%;
}

.ranking-col-thumb .profile .profile-badge {
  width: 24px;
  position: absolute;
  bottom: 0;
  right: 0;
  transform: translateX(50%);
}

.ranking-col-info {
  margin-left: 16px;
  line-height: 1.4;
  margin-right: auto;
}

.ranking-col-info .ranking-user-name {
  font-size: 18px;
  font-weight: 800;
}

.ranking-col-info .ranking-user-tag {
  font-size: 14px;
  font-weight: normal;
  color: #666;
}

.ranking-col-score {
  margin-left: 10px;
  vertical-align: text-bottom;
}

.ranking-col-score .ranking-score-num {
  font-size: 26px;
  font-weight: 800;
  vertical-align: text-bottom;
}

/* 순위 사이 안내 메시지 */
.ranking-list-item .ranking-list-info {
  font-size: 16px;
  text-align: center;
  border-radius: 8px;
  color: #888888;
  display: block;
  background-color: #f7f7f7;
  width: 100%;
  padding: 9px 0;
}

/* VS 비교 그래프 */
.ranking-versus {
  color: #dddddd;
  font-size: 60px;
  font-weight: 900;
}

.ranking-hero-graph {
  margin-top: 20px;
  position: relative;
}

.ranking-hero-graph .hero-graph-bar {
  width: 100%;
  border-radius: 16px;
  height: 16px;
  position: relative;
  background-color: #ffccd0;
  overflow: hidden;
}

.hero-graph-bar .graph-bar {
  position: absolute;
  inset: 0;
  background-color: #ff6371;
}

.ranking-hero-graph .graph-value {
  font-size: 16px;
  font-weight: bold;
  color: #5a371e;
  margin-top: 8px;
}

.ranking-hero-graph .hero-first {
  float: left;
}

.ranking-hero-graph .hero-second {
  float: right;
}

.ranking-hero-graph .hero-bubble {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #eeeeee;
  border-radius: 30px;
  padding: 8px 11px;
  top: 24px;
  background: #fff;
}

.ranking-hero-graph .hero-bubble::before {
  content: "";
  display: block;
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid #eee;
  transform: rotate(135deg) skew(-10deg, -10deg);
  left: calc(50% - 4px);
  top: -5px;
  background-color: #fff;
  border-right-color: #fff;
  border-top-color: #fff;
}
