/* FanBoard 토큰(jyp-developers/fanboard app/src/tokens.css)에서 가져온 값 */
:root {
  --bg: #ffffff;
  --bg-soft: #f8f8f9;
  --bg-muted: #f3f3f4;
  --line: #e9eaec;
  --text: #191919;
  --text-2: #5f6064;
  --text-3: #6e6f73;
  --neg-text: #c23b00;
  --primary: #009be6;
  --primary-ink: #007bb8;
  --primary-ink-hover: #00669a;
  --primary-hover: #007bb8;
  --primary-soft: #edf9ff;
  --bar: #cfe9f8;
  --neg: #ff5100;
  --neg-soft: #ffeae0;
  --pos: #00a862;
  --pos-soft: #e9fff6;
  --slot-a: #009be6;
  --slot-b: #8b5cf6; /* FanBoard 모아보기 칸 B = --color-purple */
  --radius-sm: 4px;
  --radius-lg: 8px;
  --radius-panel: 12px;
  --shadow: 0 0 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .12);
  --font: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--primary-ink); color: #fff; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; }
a { color: var(--primary-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--radius-sm); }

.br-wide { display: none; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--primary-ink); color: #fff;
  font-weight: 700; font-size: 16px; text-decoration: none;
  border-radius: var(--radius-lg);
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--primary-ink-hover); }
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; background: #fff; color: var(--primary-ink); box-shadow: inset 0 0 0 1px rgba(0, 123, 184, .4); }
.btn--sm:hover { background: var(--primary-soft); color: var(--primary-ink-hover); }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 17px; }

/* 머리 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo img { width: 104px; height: auto; }

/* 첫 화면 */
.hero { padding-top: 32px; padding-bottom: 8px; }
.hero h1 {
  font-size: clamp(28px, 7.6vw, 52px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.lead { margin-top: 14px; font-size: 16px; color: var(--text-2); max-width: 34em; }
.cta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cta__note { font-size: 13px; color: var(--text-3); }

/* 예시 그래프 */
.board {
  margin-top: 32px;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding: 16px var(--gutter) 18px;
  border-top: 1px solid var(--line);
}
.board__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.board__span { color: var(--text-3); font-size: 13px; }
.sample {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-3); background: var(--bg-muted);
  padding: 2px 6px; border-radius: var(--radius-sm);
}
.legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw--all { background: var(--bar); }
.sw--neg { background: var(--neg); }
.sw--pin { background: var(--text); border-radius: 50%; width: 8px; height: 8px; }

.chart {
  position: relative;
  display: flex; align-items: flex-end; gap: 2px;
  height: 176px; margin-top: 30px;
  border-bottom: 1px solid #d8d9db;
  cursor: pointer;
}
.chart:focus-visible { outline-offset: 6px; }
.bar {
  position: relative; flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.bar__all {
  display: flex; flex-direction: column;
  background: var(--bar); border-radius: 2px 2px 0 0;
  transform-origin: bottom;
  transition: background-color .15s ease;
}
.bar__neg { background: var(--neg); border-radius: 2px 2px 0 0; }
.bar:hover .bar__all { background: #a9d8f3; }
.bar[aria-selected="true"] .bar__all { background: var(--primary); }
.bar[aria-selected="true"] .bar__neg { background: #ff7a3d; }
.pin {
  position: absolute; left: 50%; transform: translate(-50%, -100%);
  width: 18px; height: 18px; margin-top: -6px;
  display: grid; place-items: center;
  background: #fff; border-radius: 50%; box-shadow: var(--shadow);
}
.pin img { width: 12px; height: 12px; }
.daysep { position: absolute; top: -8px; bottom: 0; width: 1px; background: var(--line); pointer-events: none; }
.axis { position: relative; height: 22px; font-size: 11px; color: var(--text-3); }
.axis span { position: absolute; top: 5px; white-space: nowrap; }

.hour { margin-top: 10px; }
.hour__meta { font-size: 13px; color: var(--text-2); }
.hour__meta b { color: var(--text); }
.hour__meta .neg-count { color: var(--neg-text); font-weight: 600; }
.posts { margin-top: 6px; }
.posts li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid var(--bg-muted);
  font-size: 14px;
}
.posts li:last-child { border-bottom: 0; }
.posts .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.posts .src { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.posts .c { font-size: 12px; color: var(--text-3); width: 44px; text-align: right; }
.board__hint { margin-top: 10px; font-size: 12px; color: var(--text-3); }

/* 칩 */
.chip {
  display: inline-flex; align-items: center; flex: none;
  font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 7px; border-radius: var(--radius-sm);
}
.chip--neg { background: var(--neg-soft); color: #b23600; }
.chip--pri { background: var(--primary-soft); color: #006a9f; }
.chip--pos { background: var(--pos-soft); color: #00804b; }
.chip--quiet { background: var(--bg-muted); color: var(--text-3); }

/* 섹션 */
.sec { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.strip {
  display: flex; align-items: flex-end; gap: 1px;
  height: 28px; margin-bottom: 22px; max-width: 360px;
}
.strip i { flex: 1; background: var(--bg-muted); border-radius: 1px 1px 0 0; transition: background-color .6s var(--ease); }
.strip.is-on i.on { background: var(--primary); }
.strip--neg.is-on i.on { background: var(--neg); }
.strip--ab.is-on i.on:nth-child(odd) { background: var(--slot-b); }
.sec__head h2 {
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.32; font-weight: 800; letter-spacing: -.025em;
  text-wrap: balance;
}
.sec__head p { margin-top: 12px; color: var(--text-2); max-width: 36em; }
.sample-note { margin-top: 12px; font-size: 12px; color: var(--text-3); }

/* 쌓이는 순서 */
.steps { margin-top: 28px; counter-reset: s; }
.steps li { position: relative; padding: 0 0 22px 28px; }
.steps li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary);
}
.steps li::after {
  content: ""; position: absolute; left: 8px; top: 22px; bottom: 2px;
  width: 1px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 17px; font-weight: 700; }
.steps p { margin-top: 4px; color: var(--text-2); font-size: 15px; max-width: 34em; }

/* 실시간 이슈 세 줄 */
.trio { margin-top: 28px; display: grid; gap: 28px; }
.col h3 { font-size: 17px; font-weight: 700; }
.rule { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.rows { margin-top: 12px; border-top: 1px solid var(--text); }
.rows li {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.rows .t { flex: 1; min-width: 0; }
.rows .n { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.rows .up { font-size: 13px; font-weight: 700; color: var(--neg-text); }
.rows--rank { counter-reset: r; }
.rows--rank li::before {
  counter-increment: r; content: counter(r);
  width: 18px; font-weight: 700; color: var(--text-3); font-size: 13px;
}

/* 아티스트 화면 */
.artist { margin-top: 28px; display: grid; gap: 28px; }
.uploads h3 { font-size: 15px; font-weight: 700; }
.uploads ul { margin-top: 10px; border-top: 1px solid var(--text); }
.uploads li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.uploads .k { font-size: 12px; color: var(--text-3); width: 40px; flex: none; }
.uploads .t { flex: 1; min-width: 0; }
.uploads .when { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.feat li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.feat li:first-child { padding-top: 0; }
.feat b { display: block; color: var(--text); font-size: 16px; margin-bottom: 2px; }

/* 모아보기 비교 */
.compare { margin-top: 28px; }
.compare__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
}
.pill--a { color: #006a9f; border-color: rgba(0, 155, 231, .35); background: var(--primary-soft); }
.pill--b { color: #6d3fd9; border-color: rgba(139, 92, 246, .35); background: #f5f0ff; }
.stack {
  display: flex; align-items: flex-end; gap: 4px;
  height: 160px; margin-top: 22px; border-bottom: 1px solid #d8d9db;
}
.stack .col2 { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.stack .a { background: var(--slot-a); }
.stack .b { background: var(--slot-b); }
.stack .ab {
  background: repeating-linear-gradient(135deg, #c9cacd 0 3px, #e9eaec 3px 6px);
}
.stack .col2 > i:first-child { border-radius: 2px 2px 0 0; }

/* 부정 신호 */
.neg { margin-top: 28px; border-top: 1px solid var(--text); }
.neg li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.neg .q { font-size: 16px; font-weight: 600; }
.neg .why { grid-column: 1; font-size: 13px; color: var(--text-3); }
.neg .chip { grid-column: 2; grid-row: 1 / span 2; }

/* 마무리 */
.close {
  padding-top: 72px; padding-bottom: 80px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.close h2 { font-size: clamp(28px, 7vw, 44px); line-height: 1.28; font-weight: 800; letter-spacing: -.03em; }
.close p { margin-top: 12px; color: var(--text-2); }
.close .btn { margin-top: 26px; }

.foot { background: var(--bg-soft); padding: 28px 0 36px; font-size: 13px; color: var(--text-3); }
.foot p + p { margin-top: 6px; font-weight: 600; }

/* 첫 화면 막대 자라기: 기본은 보이는 상태, 스크립트가 붙으면 한 번 움직임 */
.js .chart.is-growing .bar__all { animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 9ms); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .js .chart.is-growing .bar__all { animation: none; }
  .strip i { transition: none; }
  html { scroll-behavior: auto; }
}

/* PC */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .top__in { height: 68px; }
  .logo img { width: 120px; }
  .hero {
    display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center;
    padding-top: 56px; padding-bottom: 72px;
  }
  .br-wide { display: inline; }
  .hero h1 { font-size: clamp(36px, 3vw, 44px); }
  .lead { font-size: 18px; }
  .board { margin: 0; padding: 20px 0 0; }
  .chart { height: 320px; gap: 3px; }
  .sec {
    display: grid; grid-template-columns: 5fr 7fr; column-gap: 56px;
    padding-top: 88px; padding-bottom: 88px;
  }
  .sec > .strip { grid-column: 1 / -1; }
  .sec__head { grid-column: 1; }
  .sec > :not(.strip):not(.sec__head) { grid-column: 2; margin-top: 0; }
  .sec > .sample-note { margin-top: 12px; }
  .trio { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .artist { grid-template-columns: 1fr 1fr; gap: 40px; }
  .steps { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .steps li { padding-bottom: 28px; }
  .steps li::after { display: none; }
  .sec#issues { grid-template-columns: 1fr; }
  .sec#issues .sec__head, .sec#issues > * { grid-column: 1; }
  .sec#issues .sec__head { max-width: 640px; }
  .sec#issues .trio { margin-top: 32px; }
  .close { padding-top: 112px; padding-bottom: 120px; }
}
