/* Tokens */
:root{
  --rank-bg:#ffffff;            /* 페이지/카드 배경 */
  --rank-surface:#ffffff;
  --rank-text:#111827;          /* 본문 텍스트 */
  --rank-muted:#3d3d3e;         /* 보조 텍스트 */
  --rank-line:#e5e7eb;          /* 경계선 */
  --rank-brand:#2563eb;         /* 포인트 블루 */
  --rank-gold:#f59e0b;          /* 별 색상 */
  --rank-radius:12px;
  --rank-max:920px;
  --rank-t:.18s ease;

  /* 헤더 다크톤 */
  --nav-bg:#222222;             /* 밝은 회색 배경 */
  --nav-text:#ffffff;           /* 검정 텍스트 */
  --nav-text-muted:#4b5563;     /* 약하게 회색 */
  --nav-text-footer:#162c4b;
}

/* Global */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:#f2f3f4;
  color:var(--rank-text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Apple SD Gothic Neo,Noto Sans KR,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  line-height:1.65; /* 컴팩트하게 */
}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible{outline:3px solid rgba(37,99,235,.28); outline-offset:2px; border-radius:8px}
img{display:block;max-width:100%;height:auto}

/* ===== Header (다크 배경 + 흰색 메뉴) ===== */
.nav-header{background:var(--nav-bg);}
.nav-inner{max-width:var(--rank-max);margin:0 auto;padding:14px 16px;display:flex;align-items:center;justify-content:space-between}
.nav-logo img{display:block;width:auto;filter:none}
.nav-nav{display:block}
.nav-menu{list-style:none;margin:0;padding:0;display:flex;gap:18px;align-items:center;}
.nav-link{
  display:inline-block;padding:8px 6px;
  font-weight:700;color:var(--nav-text);font-size:14px;
}
.nav-link{
  position:relative;
}
.nav-link::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:7px;
  width:0%;
  height:2px;
  background:#ffffff;
}
.nav-link:hover{
  color:#ffc260;
}
.nav-link.is-active{
  color:#ffc260;
}
.nav-burger{display:none;appearance:none;background:transparent;padding:8px;cursor:pointer;border:0px;}
.nav-burger-bar{display:block;width:20px;height:3px;background:#ffffff;margin:3px 0}
.nav-main{min-height:1px}

/* Mobile drawer */
@media (max-width:860px){
  .nav-burger{display:inline-block}
  .nav-nav{
    position:fixed;right:0;top:0;height:100vh;width:75vw;max-width:340px;
    background:var(--nav-bg);border-left:1px solid rgba(255,255,255,.12);
    transform:translateX(100%);transition:transform .2s ease;z-index:9999;padding:70px 16px 16px 16px;
    box-shadow:-12px 0 24px rgba(0,0,0,.25);
  }
  .nav-nav.is-open{transform:translateX(0)}
  .nav-menu{flex-direction:column;align-items:flex-start;gap:12px}
  .nav-link{width:100%}
  body.nav-no-scroll{overflow:hidden}
}

/* ===== Container / Titles ===== */
body .contents{
  max-width:var(--rank-max);
  margin:0 auto;
  padding:28px 26px 26px;  /* 세로 여백 축소 */
  background:var(--rank-surface);
  border:1px solid #d1d1d1;
  margin-top:10px;
  border-radius:5px;
}
/* ===== Titles ===== */
.rank-h1{
  font-size:clamp(18px,2.6vw,24px);
  margin:0 0 6px;
  font-weight:900;
  border-left:5px solid #ffc260;
  border-bottom:1px solid #777777;
  padding-left:5px;
}
.rank-sub{
  color:var(--rank-muted);
  margin:0 0 18px;
  padding-top:8px;
  font-size:14.5px;
}

/* ===== List / Card ===== */
.rank-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.rank-item{
  border:1px solid #d4d9e3;
  border-radius:5px;
  background:#ffffff;
}

.rank-card{
  display:block;
  border-radius:inherit;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  padding:0;
}
.rank-card:hover{
  transform:translateY(-1px);
  border-color:#b4b9c3;
  box-shadow:0 6px 18px rgba(0,0,0,0.05);
}

/* ===== Grid (Logo + Text) ===== */
.rank-grid{
  display:grid;
  grid-template-columns:200px 1fr;
  gap:8px;
  padding:10px 12px;
  align-items:center;
}

/* ===== Left (Logo only) ===== */
.rank-left{
  display:flex;
  align-items:center;
  justify-content:center;
}
.rank-thumb{
  width:200px;
  height:100px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rank-thumb img{
  width:80%;
  height:80%;
  object-fit:contain;
}

/* ===== Right (텍스트 섹션) ===== */
.rank-right{
  display:grid;
  grid-template-rows:auto auto 1fr auto;
}

/* 제목 + 별점 wrapper */
.rank-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  width:100%;
}

/* 제목 */
.rank-title{
  margin:0;
  font-size:19px;
  font-weight:900;
  white-space:nowrap;
}

/* 별점 */
.rank-stars{
  position:relative;
  font-size:18px;
  line-height:1;
  letter-spacing:1px;
  display:inline-block;
  white-space:nowrap;
}

.rank-stars::before{
  content:"▰▰▰▰▰";
  color:#e0e0e0;
}

.rank-stars > span{
  position:absolute;
  left:0;
  top:0;
  width:calc(var(--rate) / 5 * 100%);
  overflow:hidden;
}

.rank-stars > span::before{
  content:"▰▰▰▰▰";
  color:#ffaa00; /* 골드 */
}
/* ===== 단순 텍스트 강조 ===== */
.rank-volume{
  font-size:14px;
  font-weight:700;
  color:#172F6A;
  background:transparent;
  border:none;
  padding:0;
}

/* ===== 설명 ===== */
.rank-desc{
  margin:0;
  color:#222222;
  font-size:14px;
  line-height:1.55;
}

/* ===== 버튼 (모바일은 width 80%) ===== */
.rank-foot{
  margin-top:0px;
}

.rank-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:380px;
  padding:5px 6px;
  border-radius:5px;

  border:1px solid #1B357C;   /* 진한 Royal Blue 테두리 */
  background:#172F6A;         /* 메인 버튼 색 (진파랑) */
  color:#fff;
  font-weight:700;
  font-size:14px;
  transition:.18s ease;
}

.rank-btn::after{
  content:" ↗";
}

.rank-card:hover .rank-btn{
  background:#1E3A8A; /* hover 시 더 깊은 파랑 */
  border-color:#1E3A8A;
  transform:translateY(-1px);
}

.rank-textline {padding:0px;margin:6px 0px;}

@media (max-width:860px){
  .rank-grid{
    grid-template-columns:1fr;
    text-align:center;
  }
  .rank-btn{
    width:80%;
    margin:10px auto 0;
    margin-bottom:6px;
  }
  .rank-head{
    justify-content:center;
    text-align:center;
    width:100%;
    border-top:1px solid #d4d9e3;
    padding-top:6px;
  }
}
/* Responsive */
@media (max-width:1024px){
  .rank-grid{grid-template-columns:200px 1fr}
}
@media (max-width:860px){
  .rank-grid{grid-template-columns:1fr;gap:10px}
  .rank-btn {max-width: 800px;}
}
@media (max-width:520px){
  .rank-right{grid-template-rows:auto auto auto auto}
  .rank-title{font-size:17px}
  .rank-stars{font-size:17px}
  .rank-btn {max-width: 800px;}
}

/* 본문(가이드/FAQ) — 컴팩트 */
.rank-content{margin-top:26px;color:#111827}
.rank-content h2{margin:20px 0 8px;font-size:19px;font-weight:900;border-left:5px solid #777777;padding-left:5px;}
.rank-content h3{margin:12px 0 6px;font-size:16px;font-weight:800;}
.rank-content p{margin:0 0 10px;color:var(--rank-muted)}
.rank-block{background:#fff;border:1px solid var(--rank-line);border-radius:var(--rank-radius);padding:14px;margin:14px 0}
.rank-note{font-size:13px;color:var(--rank-muted);border-left:3px solid var(--rank-brand);padding-left:8px}

/* Footer */
.nav-footer{background:#f2f3f4;color:#0f172a;font-size:14px;}
.nav-footer-inner{max-width:var(--rank-max);margin:0 auto;padding:18px 16px;text-align:center}
.nav-footer-copy{color:#0f172a}
.nav-footer-menu a{color:#1B357C}

/* 기본 테이블 */
.responsive-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #374151;
}

.responsive-table th,
.responsive-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.responsive-table thead {
  background: #f9fafb;
}
