/* ads.yoons.cafe — 2021 원본 톤앤매너(나눔스퀘어, #f8fafc, 기기 목업 구성) + shadcn/ui 디자인 시스템(slate).
   토큰과 컴포넌트 이름은 shadcn 기준: card / badge / accordion / tabs / table / button. */

@font-face { font-family: "NanumSquare"; font-weight: 400; font-display: swap; src: url("../fonts/NanumSquareR.woff") format("woff"); }
@font-face { font-family: "NanumSquare"; font-weight: 300; font-display: swap; src: url("../fonts/NanumSquareL.woff") format("woff"); }
@font-face { font-family: "NanumSquare"; font-weight: 700; font-display: swap; src: url("../fonts/NanumSquareB.woff") format("woff"); }
@font-face { font-family: "NanumSquare"; font-weight: 800; font-display: swap; src: url("../fonts/NanumSquareEB.woff") format("woff"); }

:root {
  --background: 210 40% 98%;          /* #f8fafc — 원본 배경과 동일 */
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --border: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --font: "NanumSquare", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

*, ::before, ::after { box-sizing: border-box; border: 0 solid hsl(var(--border)); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground));
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }
.muted { color: hsl(var(--muted-foreground)); }
.tabular { font-variant-numeric: tabular-nums; }

/* ── layout ───────────────────────────────────────────── */
.page { width: 100%; max-width: 962px; margin: 0 auto; padding: 56px 16px 0; }
.stack { display: grid; gap: 24px; }
.footer { padding: 48px 16px 40px; text-align: center; font-size: 12px; color: hsl(var(--muted-foreground)); }

/* ── hero ─────────────────────────────────────────────── */
.hero { display: grid; justify-items: center; gap: 14px; text-align: center; padding-bottom: 16px; }
.hero h1 { font-size: clamp(26px, 6.4vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.hero p { font-weight: 400; color: hsl(215.3 19.3% 34.5%); font-size: 15px; line-height: 1.75; max-width: 38em; letter-spacing: -0.01em; }

/* ── badge ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border-radius: 9999px; border-width: 1px; border-color: transparent;
  padding: 2px 10px; font-size: 12px; font-weight: 700; line-height: 18px;
}
.badge-default { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-outline { border-color: hsl(var(--border)); color: hsl(var(--foreground)); background: hsl(var(--card)); font-weight: 400; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ── card ─────────────────────────────────────────────── */
.card {
  position: relative; overflow: hidden;
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border-width: 1px; border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-sm);
}
.card-header { display: grid; gap: 6px; padding: 24px 24px 0; }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-description { font-size: 15px; font-weight: 400; color: hsl(215.3 19.3% 34.5%); line-height: 1.75; letter-spacing: -0.01em; }
.card-description .note { display: block; font-size: 13px; margin-top: 6px; color: hsl(var(--muted-foreground)); }
.card-content { padding: 24px; }

/* ── stats (2×2 구분선 그리드) ───────────────────────── */
/* 모바일: 한 줄에 하나씩 */
.stats { display: grid; grid-template-columns: 1fr; margin-top: 20px; border-top-width: 1px; }
.stat { padding: 18px 24px 20px; display: grid; gap: 2px; border-bottom-width: 1px; }
.stat:last-child { border-bottom-width: 0; }
.stat-label { font-size: 13px; color: hsl(var(--muted-foreground)); }
.stat-sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
.stat-value { font-size: clamp(36px, 11vw, 60px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* ── 광고 상품 카드: 원본 이미지 구성(stage)을 비율 좌표로 ─ */
.ad-card { display: flex; flex-direction: column; }
.ad-card .grade { order: -1; margin: 24px 24px 0; align-self: flex-start; }
.ad-card .card-header { padding-top: 12px; }
.stage { position: relative; margin-top: 8px; overflow: hidden; background: linear-gradient(to bottom, transparent, hsl(var(--muted) / .6)); }
.stage img { position: absolute; height: auto; max-width: none; }

.ad-main .stage { aspect-ratio: 930 / 400; }
.ad-main .i1 { left: 18.28%; top: 1.5%; width: 69.89%; }
.ad-main .i2 { left: 33.33%; top: 54.5%; width: 54.3%; filter: drop-shadow(0 8px 16px rgb(15 23 42 / .18)); }

.ad-bottom .stage { aspect-ratio: 930 / 475; }
.ad-bottom .i1 { left: 16.13%; top: 29.79%; width: 59.14%; }
.ad-bottom .i2 { left: 30.11%; top: 62.84%; width: 43.66%; filter: drop-shadow(0 6px 12px rgb(15 23 42 / .18)); }
.ad-bottom .i3 { left: 69.89%; top: 0.08%; width: 26.88%; }
.ad-bottom .i4 { left: 73.01%; top: 75.01%; width: 20.75%; }

.ad-top .stage { aspect-ratio: 340 / 300; width: 100%; max-width: 340px; margin: 0 auto; background: none; }
.ad-top .stage img { margin-top: -14.29%; }
.ad-top .i1 { left: 8.82%; top: 14.29%; width: 88.24%; }
.ad-top .i2 { left: 18.24%; top: 32.57%; width: 70.59%; filter: drop-shadow(0 8px 16px rgb(15 23 42 / .2)); }

/* ── accordion (details/summary) ─────────────────────── */
.accordion { padding: 0 24px 8px; }
.accordion-item { border-bottom-width: 1px; }
.accordion-item:last-child { border-bottom-width: 0; }
.accordion-trigger {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 18px 0; font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
}
.accordion-trigger::-webkit-details-marker { display: none; }
.accordion-trigger:hover .q { text-decoration: underline; text-underline-offset: 4px; }
.accordion-trigger .q { flex: 1; }
.accordion-trigger .chev { width: 16px; height: 16px; flex: none; color: hsl(var(--muted-foreground)); transition: transform .2s; }
.accordion-item[open] .chev { transform: rotate(180deg); }
.accordion-trigger:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 6px; }
.accordion-content { padding: 0 0 20px; font-size: 15px; font-weight: 400; line-height: 1.8; color: hsl(var(--foreground) / .85); display: grid; gap: 12px; }
.accordion-content strong { font-weight: 700; color: hsl(var(--foreground)); }
.list-dash { margin: 0; padding: 14px 16px 14px 32px; border-radius: var(--radius); background: hsl(var(--muted) / .6); }

/* ── table ───────────────────────────────────────────── */
.table-wrap { border-width: 1px; border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { height: 40px; padding: 0 14px; text-align: left; font-weight: 400; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / .5); border-bottom-width: 1px; }
.table td { padding: 12px 14px; border-bottom-width: 1px; font-weight: 400; }
.table tr:last-child td { border-bottom-width: 0; }
.table tbody tr:hover { background: hsl(var(--muted) / .5); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .full { color: hsl(var(--muted-foreground)); }

.rules { display: grid; border-width: 1px; border-radius: var(--radius); overflow: hidden; }
.rule { padding: 12px 16px; border-bottom-width: 1px; display: grid; gap: 2px; }
.rule:last-child { border-bottom-width: 0; }
.rule dt { font-weight: 700; font-size: 14px; }
.rule dd { margin: 0; font-size: 14px; color: hsl(215.3 19.3% 34.5%); line-height: 1.7; }

/* ── button / tabs ───────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: calc(var(--radius) - 2px); font-size: 14px; font-weight: 700; }
.btn-outline { border-width: 1px; background: hsl(var(--card)); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: hsl(var(--accent)); }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.tabs { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--radius); background: hsl(var(--muted)); }
.tabs a { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: calc(var(--radius) - 4px); font-size: 13px; color: hsl(var(--muted-foreground)); }
.tabs a[aria-current="page"] { background: hsl(var(--card)); color: hsl(var(--foreground)); font-weight: 700; box-shadow: var(--shadow-sm); }

/* ── report ─────────────────────────────────────────── */
.report-url { font-size: 13px; color: hsl(var(--muted-foreground)); word-break: break-all; }
.report-url a { text-decoration: underline; text-underline-offset: 3px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-box { position: relative; height: 240px; }
.empty { text-align: center; padding: 24px 0; color: hsl(var(--muted-foreground)); font-size: 14px; }
.center { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 24px; }

/* ── PC (≥960px): 원본 930px 카드와 같은 배치 ───────── */
@media (min-width: 960px) {
  .page { padding-top: 80px; }
  .stack { gap: 32px; }
  .hero { padding-bottom: 24px; }
  .hero p { font-size: 16px; }

  .card-header { padding: 40px 40px 0; }
  .stats-card .stats { margin: 28px 40px 40px; border-width: 1px; border-radius: var(--radius); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom-width: 0; }
  .stat:nth-child(odd) { border-right-width: 1px; }
  .stat:nth-child(-n+2) { border-bottom-width: 1px; }
  .stat { padding: 20px 28px 22px; }
  .stat-label { font-size: 14px; }

  .ad-card { display: block; }
  .ad-card .card-header { position: absolute; padding: 0; }
  .ad-card .grade { position: absolute; top: 40px; right: 40px; margin: 0; }
  .stage { position: absolute; margin: 0; aspect-ratio: auto; overflow: visible; }

  .ad-main { height: 550px; }
  .ad-main .card-header { top: 40px; left: 40px; width: 700px; }
  .ad-main .stage { top: 150px; left: 0; width: 100%; height: 400px; }

  .ad-bottom { height: 550px; }
  .ad-bottom .card-header { top: 44px; left: 48px; width: 580px; }
  .ad-bottom .stage { top: 75px; left: 0; width: 100%; height: 475px; }

  .ad-top { height: 350px; }
  .ad-top .card-header { top: 118px; left: 360px; width: 520px; }
  .ad-top .stage { top: 0; left: 0; width: 340px; max-width: none; height: 350px; margin: 0; }
  .ad-top .stage img { margin-top: 0; }

  .faq-card .card-header { padding: 32px 40px 8px; }
  .accordion { padding: 0 40px 16px; }

  .report-stats { grid-template-columns: repeat(4, 1fr); }
  .report-stats .stat { border-right-width: 1px; border-bottom-width: 0; }
  .report-stats .stat:last-child { border-right-width: 0; }
  .card-content { padding: 32px 40px 40px; }
  .chart-box { height: 300px; }
}

.footer-note { font-size: 12px; text-align: center; }
.list-dash li { padding-left: 2px; }

/* ── thiings 3D 아이콘 (히어로 5개 · 카드 제목 · 리포트 상단만) ─ */
.ti { display: inline-block; height: auto; flex: none; user-select: none; -webkit-user-drag: none; }
.ti-title { width: 30px; margin-right: 2px; filter: drop-shadow(0 2px 3px rgb(15 23 42 / .12)); }
.ti-hero { width: 72px; filter: drop-shadow(0 6px 10px rgb(15 23 42 / .15)); }

.hero { position: relative; isolation: isolate; }
.hero-floats { position: absolute; inset: -24px -8px 0; z-index: -1; pointer-events: none; }
.hero-floats .f { position: absolute; width: 44px; filter: drop-shadow(0 8px 12px rgb(15 23 42 / .14)); animation: bob 6s ease-in-out infinite; }
.f1 { left: 0; top: 0; transform: rotate(-12deg); }
.f2 { right: 4px; top: 8px; transform: rotate(14deg); animation-delay: -1s; }
.f3 { left: 15%; top: -20px; width: 32px; animation-delay: -2s; }
.f4 { right: 16%; top: -16px; width: 34px; transform: rotate(10deg); animation-delay: -3s; }
.f5 { display: none; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .hero-floats .f { animation: none; } }

@media (min-width: 960px) {
  .ti-title { width: 34px; }
  .hero-floats { inset: -40px -40px -10px; }
  .hero-floats .f { width: 72px; }
  .f1 { left: 2%; top: -6px; }
  .f2 { right: 3%; top: -2px; }
  .f3 { left: 12%; top: auto; bottom: 0; width: 64px; }
  .f4 { right: 11%; top: auto; bottom: -4px; width: 64px; }
  .f5 { display: block; left: 26%; top: -34px; width: 44px; animation-delay: -1.5s; }
}
