/* design/tokens.json 에서 나온 값. 토큰을 바꾸면 여기도 같이 바꾼다. */
:root {
  color-scheme: dark;
  --canvas: #0C1117;
  --surface1: #151C25;
  --surface2: #1E2733;
  --border: #2C3743;
  --text-primary: #E9EFF5;
  --text-secondary: #9FADBB;
  --text-muted: #8494A5;
  --rise: #3FD85A;
  --rise-edge: #25A63F;
  --on-rise: #07230E;
  --sun: #FFC531;
  --sun-edge: #D2970A;
  --on-sun: #2A1C00;
  --late: #FF5D62;
  --late-edge: #C63B41;
  --on-late: #2B0709;
  --late-text: #FF7A7E;
  --sky: #59A8FF;
  --grid: #232D39;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --font: 'Pretendard Variable', Pretendard, system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--canvas); color: var(--text-primary); font: 500 16px/1.65 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--sky); text-underline-offset: 3px; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--surface2); color: var(--text-primary); padding: 10px 14px; border-radius: var(--r-sm); z-index: 30; }
.skip:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* 머리글 */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--canvas) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 800; font-size: 18px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a:not(.btn) { color: var(--text-secondary); font-weight: 600; font-size: 14px; text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--text-primary); }
@media (max-width: 720px) { .top nav a:not(.btn) { display: none; } }

/* 버튼: 아래 모서리가 있는 입체 버튼 */
.btn { --face: var(--surface2); --edge: var(--border); --ink: var(--text-primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px; border: 0; border-radius: var(--r-md);
  background: var(--face); color: var(--ink); box-shadow: 0 4px 0 var(--edge); font: 800 16px/1.3 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 80ms var(--ease), box-shadow 80ms var(--ease), filter 80ms; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn[disabled] { cursor: not-allowed; opacity: .55; }
.btn.primary { --face: var(--rise); --edge: var(--rise-edge); --ink: var(--on-rise); }
.btn.wake { --face: var(--late); --edge: var(--late-edge); --ink: var(--on-late); }
.btn.sm { min-height: 40px; padding: 7px 14px; font-size: 14px; }
.btn.lg { min-height: 56px; padding: 14px 28px; font-size: 18px; }

/* 전광판 */
.ticker { border-bottom: 1px solid var(--border); background: var(--surface1); overflow: hidden; font-size: 13px; font-weight: 600; }
.ticker-track { display: flex; width: max-content; animation: slide 50s linear infinite; }
.ticker-track ul { display: flex; }
.ticker li { display: flex; gap: 8px; align-items: center; padding: 8px 22px; border-right: 1px solid var(--grid); color: var(--text-secondary); white-space: nowrap; }
.ticker b { color: var(--text-primary); }
.up { color: var(--rise); } .down { color: var(--late-text); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* 첫 화면 */
.hero { padding-block: 64px 72px; }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
h1 { margin-top: 18px; font-size: clamp(38px, 6vw, 60px); line-height: 1.14; font-weight: 800; letter-spacing: -.02em; }
h1 em { color: var(--rise); font-style: normal; }
.lede { margin-top: 18px; max-width: 34em; color: var(--text-secondary); font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.cta small { color: var(--text-muted); font-size: 14px; }
@media (max-width: 900px) { .hero { padding-block: 40px 56px; } .hero-in { grid-template-columns: 1fr; gap: 40px; } }

/* 카드, 크루 현황판 */
.card { background: var(--surface1); border: 1px solid var(--border); border-bottom-width: 3px; border-radius: var(--r-lg); }
.board { padding: 18px; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.board-head h2, .board-head .title { font-size: 16px; font-weight: 800; margin: 0; }
.tag { color: var(--text-muted); font-size: 12px; font-weight: 700; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 2px 9px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--surface2); border-radius: var(--r-md); }
.stat svg { width: 26px; height: 26px; flex: none; }
.stat b { display: block; font-size: 22px; line-height: 1.15; font-weight: 800; }
.stat span { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.watch { width: 100%; border-collapse: collapse; font-size: 14px; }
.watch th { color: var(--text-muted); font-size: 12px; font-weight: 600; text-align: left; padding: 0 6px 6px; border-bottom: 1px solid var(--grid); }
.watch td { padding: 10px 6px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.watch tr:last-child td { border-bottom: 0; }
.watch td:first-child { font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.ontime { background: color-mix(in srgb, var(--rise) 16%, transparent); color: var(--rise); }
.pill.pending { background: color-mix(in srgb, var(--late) 18%, transparent); color: var(--late-text); }
.pill.ringing { background: color-mix(in srgb, var(--sun) 18%, transparent); color: var(--sun); }
.pill.rest { background: var(--surface2); color: var(--text-secondary); }
.demo-note { min-height: 22px; margin-top: 10px; color: var(--text-secondary); font-size: 13px; }
.mascot-line { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px; background: var(--surface2); border-radius: var(--r-md); font-size: 14px; font-weight: 600; }
.mascot-line svg { width: 44px; height: 44px; flex: none; }
.pop { animation: pop 400ms var(--ease); }
@keyframes pop { 40% { transform: scale(1.12); } }

/* 구역 */
.section { padding-block: 72px; border-top: 1px solid var(--grid); }
.section > .wrap > h2, .sec-title { font-size: clamp(26px, 4vw, 36px); line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.sec-lede { margin-top: 12px; max-width: 42em; color: var(--text-secondary); font-size: 17px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; counter-reset: step; }
.step { padding: 22px; counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%; background: var(--sun); color: var(--on-sun); font-weight: 800; box-shadow: 0 3px 0 var(--sun-edge); }
.step h3, .feature h3 { font-size: 18px; font-weight: 800; line-height: 1.35; }
.step p, .feature p { margin-top: 8px; color: var(--text-secondary); font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.feature { padding: 22px; }
.feature svg { width: 32px; height: 32px; margin-bottom: 12px; color: var(--sun); }
@media (max-width: 860px) { .steps, .features { grid-template-columns: 1fr; } }

/* 차트 */
.chart-card { margin-top: 32px; padding: 20px; position: relative; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 14px; border-radius: 2px; }
.legend .a { background: var(--rise); } .legend .b { border: 2px solid var(--late); }
.legend .c { width: 18px; height: 0; border-radius: 0; border-top: 2px dashed var(--text-muted); }
.chart-scroll { overflow-x: auto; }
.candle-chart { width: 100%; min-width: 640px; height: auto; }
.candle-chart text { fill: var(--text-muted); font: 600 12px var(--font); font-variant-numeric: tabular-nums; }
.candle-chart .axis { stroke: var(--grid); }
.candle-chart .promise { stroke: var(--text-muted); stroke-width: 2; stroke-dasharray: 5 5; }
.candle-chart .hit { fill: transparent; cursor: default; outline: none; }
.candle-chart .hit:hover, .candle-chart .hit:focus { fill: color-mix(in srgb, var(--sky) 12%, transparent); }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; transform: translate(-50%, -100%); }
details.tbl { margin-top: 14px; color: var(--text-secondary); font-size: 14px; }
details.tbl summary { cursor: pointer; font-weight: 700; }
details.tbl table { width: 100%; margin-top: 10px; border-collapse: collapse; }
details.tbl th, details.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: left; }

/* 정직한 안내, FAQ, 신청 */
.honest { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.honest > div { padding: 22px; }
.honest h3 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.honest li { position: relative; padding-left: 22px; margin-top: 8px; color: var(--text-secondary); font-size: 15px; }
.honest li::before { content: '✓'; position: absolute; left: 0; color: var(--rise); font-weight: 800; }
.honest .no li::before { content: '–'; color: var(--text-muted); }
@media (max-width: 720px) { .honest { grid-template-columns: 1fr; } }
.faq { margin-top: 28px; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); padding-block: 4px; }
.faq summary { cursor: pointer; padding-block: 14px; font-size: 17px; font-weight: 700; }
.faq p { padding-bottom: 16px; color: var(--text-secondary); }
.join { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding: 32px; }
.join .sec-lede { font-size: 16px; }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; padding: 22px; } }
.form { display: grid; gap: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 11px 14px; background: var(--canvas); border: 2px solid var(--border); border-radius: var(--r-md); color: var(--text-primary); font: 600 16px var(--font); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--text-secondary); font-size: 14px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--rise); flex: none; }
.trap { position: absolute; left: -9999px; }
.form-msg { min-height: 24px; font-size: 15px; font-weight: 700; }
.form-msg.ok { color: var(--rise); } .form-msg.err { color: var(--late-text); }

/* 글 페이지, 바닥글 */
.article { padding-block: 48px 72px; }
.article > * { max-width: 720px; }
.article h1 { font-size: clamp(30px, 5vw, 42px); margin-top: 14px; }
.article h2 { margin-top: 40px; font-size: 24px; font-weight: 800; line-height: 1.35; }
.article h3 { margin-top: 24px; font-size: 18px; font-weight: 800; }
.article p, .article ul, .article ol { margin-top: 14px; color: var(--text-secondary); }
.article ul { list-style: disc; padding-left: 22px; } .article ol { list-style: decimal; padding-left: 22px; }
.article li { margin-top: 8px; }
.article strong { color: var(--text-primary); }
.article .meta { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.article table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15px; color: var(--text-secondary); }
.article th, .article td { padding: 9px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.crumbs { color: var(--text-muted); font-size: 14px; }
.crumbs a { color: inherit; }
.callout { margin-top: 28px; padding: 20px; }
.callout p { margin-top: 6px; }
.callout .btn { margin-top: 14px; }
.guide-list { display: grid; gap: 14px; margin-top: 24px; max-width: 720px; }
.guide-list a { display: block; padding: 20px; color: inherit; text-decoration: none; }
.guide-list h2 { margin: 0; font-size: 19px; }
.guide-list p { margin-top: 6px; font-size: 15px; }
.foot { padding-block: 32px 48px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--text-secondary); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .ticker-track, .pop { animation: none; } .btn { transition: none; } }
