/* =========================
   Base / Variables
========================= */
:root {
  --app-bg:#fdfdf8;
  --surface:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --brand:#15803d;

  --container:1020px;
  --header-bg:#064e3b;
  --header-text:#ffffff;
  --header-text-dim:rgba(255,255,255,.85);
  --header-underline:#34d399;
  --header-sep:rgba(255,255,255,.12);
  --tap:44px;
}

/* =========================
   Reset / Basics
========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--app-bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display:block; max-width:100%; height:auto; }
a { color: inherit; text-decoration: none; }
table { border-collapse: separate; border-spacing: 0; }

/* =========================
   Header (Global Navigation)
========================= */
.whnav-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-sep);
}

.whnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.whnav-logo img {
  height: 36px;
  width: auto;
}

/* Menu */
.whnav-nav { display: block; }

.whnav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}

.whnav-link {
  display: inline-block;
  padding: 6px 4px;
  font-weight: 600;
  font-size: 15px;
  color: var(--header-text);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.whnav-link:hover {
  color: var(--header-underline);
  border-bottom-color: var(--header-underline);
}

.whnav-link.is-active {
  color: var(--header-text);
  border-bottom-color: var(--header-underline);
}

/* Burger (mobile) */
.whnav-burger {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--header-bg);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
}
.whnav-burger-bar {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  margin: 3px 0;
}

/* Header ↔ Main spacing */
.whnav-main { min-height: 1px; }
.contents {
  max-width: var(--container);
  margin: 12px auto 0;   /* 헤더 아래 간격 보장 */
  padding: 18px 14px;
  background: var(--surface);
}

/* =========================
   Page Headings
========================= */
.whr-h1 {
  margin: 4px 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.2px;
}

.whr-sub {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

/* =========================
   Ranking List (Cards)
========================= */
.whr-list {
  display: grid;
  gap: 14px; /* 세로 길이 과다 방지 */
}

.whr-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow .15s ease, transform .15s ease;
}
.whr-item:hover {
  box-shadow: 0 8px 18px rgba(0,0,0,.04);
  transform: translateY(-1px);
}

.whr-card {
  display: block; color: inherit; text-decoration: none;
}

.whr-grid {
  display: grid;
  grid-template-columns: 320px 1fr; /* 좌: 스크린샷 / 우: 정보 */
  gap: 14px;
  align-items: stretch;
}

.whr-left {
  border-right: 1px solid var(--border);
  background: #fafafa;
}

.whr-thumb {
  aspect-ratio: 2/1;
  width: 100%;
  overflow: hidden;
  background: #f3f4f6;
}
.whr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 우측 정보 */
.whr-right {
  display: grid;
  grid-template-rows: auto auto 1fr auto; /* head / benefit / desc / foot */
  padding: 12px 12px 12px 0;
}

/* 상단: 사이트명 + 별점 */
.whr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.whr-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 별점 */
.whr-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.whr-stars {
  position: relative; display: inline-block; line-height: 1;
}
.whr-stars::before {
  content: "★★★★★";
  letter-spacing: 2px;
  color: #e5e7eb;
  font-size: 16px;
}
.whr-stars > span {
  position: absolute; left: 0; top: 0;
  white-space: nowrap; overflow: hidden;
  width: calc(var(--rate) / 5 * 100%);
}
.whr-stars > span::before {
  content: "★★★★★";
  letter-spacing: 2px;
  color: #f59e0b; /* gold */
  font-size: 16px;
}
.whr-rating-num {
  font-size: 13px;
  color: var(--muted);
}

.whr-benefit {
  display: inline-block;
  padding:2px;
  background: #f8fafc;           /* 흰색에 가까운 회색 */
  border: 1px solid var(--border);
  color: #1e3a8a;                /* 진파랑 */
  font-weight: 700;
  font-size: 12.5px;
}

/* 설명 */
.whr-desc {
  margin: 8px 0 5px;
  color: #374151;
  font-size: 12.5px;
  line-height: 1.7;
}

/* 버튼 */
.whr-foot { margin-top: 2px; }
.whr-btn {
  width: 100%;
  text-align: center;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #0f5132;      /* 딥그린 보더 */
  background: #145a3a;            /* 낮은 채도 딥그린 */
  color: #ffffff;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
  font-size: 14px;
}
.whr-item:hover .whr-btn {
  box-shadow: 0 0 0 6px rgba(21,128,61,.12); /* 은은한 링 */
}
.whr-btn:active { transform: translateY(1px); }

/* =========================
   Guide / Table / Latest
========================= */
.whr-content {
  margin-top: 26px;
  color: #374151;
}
.whr-content h2 {
  margin: 20px 0 8px;
  font-size: 20px;
  font-weight: 800;
}
.whr-content h3 {
  margin: 16px 0 6px;
  font-size: 16.5px;
  font-weight: 800;
}
.whr-content p {
  margin: 0 0 12px;
  line-height: 1.8;
}

/* 비교표 */
.whr-table {
  width: 100%;
  margin: 10px 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  table-layout: fixed;
}
.whr-table thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.whr-table th,
.whr-table td {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.whr-table th { font-weight: 800; }
.whr-table tr:last-child td { border-bottom: 0; }

/* latest 박스 */
.latest {
  width: 100%;
  margin: 22px 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.latest .listBox { width:100%; border-collapse: collapse; }
.latestHead,
.latestLink {
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.latestLink { text-align: right; }
.latestLink a { color: #1f2937; text-decoration: none; }
.latestLink a:hover { text-decoration: underline; }

/* =========================
   Footer
========================= */
.whnav-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  margin-top: 32px;
}
.whnav-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 14px;
  text-align: center;
}
.whnav-footer-menu a {
  color: #15439b;
}
.whnav-footer-menu a:hover { text-decoration: underline; }

/* =========================
   Responsive
========================= */
@media (max-width: 860px) {
  .whnav-burger { display:inline-block; }
  .whnav-nav {
    position: fixed;
    right: 0; top: 0;
    height: 100vh; width: 75vw; max-width: 320px;
    background: var(--header-bg);
    transform: translateX(100%);
    transition: transform .2s ease;
    z-index: 9999;
    padding: 70px 16px 16px 16px;
    box-shadow: -16px 0 24px rgba(0,0,0,.1);
  }
  .whnav-nav.is-open { transform: translateX(0); }

  .whnav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .whnav-link { font-size: 16px; width: 100%; }

  body.whnav-no-scroll { overflow: hidden; }

  .whr-grid { grid-template-columns: 1fr; }
  .whr-left {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .whr-right { padding: 12px; }
  .whr-title { font-size: 14px; }
  .whr-sub { font-size: 14px; }
  .whr-benefit { font-size: 12px; }
}
