/* AI 웹게임 공장 결과 발표. 로비와 같은 남색·노랑, 밝은 화면·어두운 화면 둘 다. 광고 없음. */
:root {
  --bg: #F2F5FA;
  --card: #FFFFFF;
  --ink: #0F2140;
  --mute: #56698A;
  --line: #D3DCE9;
  --signal: #FFCC1A;
  --signal-ink: #1A1400;
  --num-c: #0F2140;
  --bar: #0F2140;
  --bar-soft: #C9D4E4;
  --future: rgba(15, 33, 64, 0.05);
  --good: #17915A;
  --num: "Big Shoulders Display", "Pretendard Variable", Pretendard, sans-serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0F2140; --card: #16305A; --ink: #EDF1F7; --mute: #93A6C3; --line: #2B4876; --num-c: #FFCC1A; --bar: #FFCC1A; --bar-soft: #34507F; --future: rgba(255, 255, 255, 0.05); --good: #3DD68C; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
[hidden], [data-todo] { display: none !important; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 16px; }

/* 윗줄 */
.top { border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--signal); color: var(--signal-ink); font-family: var(--num); font-weight: 800; font-size: 22px; text-decoration: none; }
.top__title { flex: 1; font-size: 15px; font-weight: 800; }
.top__back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 700; color: var(--mute); }

/* 첫 화면 */
.hero { padding: 26px 0 26px; }
.state { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 700; }
.state__dot { width: 9px; height: 9px; border-radius: 50%; background: #FF5A4E; animation: pulse 1.6s ease-in-out infinite; }
.state.is-final { background: var(--signal); color: var(--signal-ink); box-shadow: none; }
.state.is-final .state__dot { background: var(--signal-ink); animation: none; border-radius: 2px; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero__h { margin-top: 16px; font-size: clamp(24px, 6.4vw, 40px); font-weight: 800; line-height: 1.25; letter-spacing: -0.03em; }
.hero__num { margin-top: 4px; font-family: var(--num); font-weight: 800; line-height: 0.9; color: var(--num-c); }
.hero__num b { font-size: clamp(120px, 38vw, 210px); letter-spacing: -0.01em; }
.hero__num span { margin-left: 6px; font-family: var(--sans); font-size: clamp(28px, 8vw, 44px); font-weight: 800; color: var(--ink); }
.hero__sub { margin-top: 8px; font-size: 15px; color: var(--mute); }
.hero__asof { margin-top: 2px; font-size: 13.5px; color: var(--mute); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.kpis div { padding: 12px 14px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.kpis dt { font-size: 13px; color: var(--mute); }
.kpis dd { margin-top: 2px; font-size: 20px; font-weight: 800; line-height: 1.3; }
.kpis dd small { display: block; font-size: 13px; font-weight: 600; color: var(--mute); line-height: 1.4; }

/* 섹션 */
.sec { padding: 26px 0 8px; border-top: 1px solid var(--line); }
.sec__h { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.sec__lead { margin-top: 4px; font-size: 14.5px; color: var(--mute); }
.sub__h { margin: 14px 0 6px; font-size: 15px; font-weight: 800; }
.two { display: grid; gap: 0; }
.two--tight { gap: 0 24px; }

/* 시간대 그래프 */
.chart { margin-top: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--mute); font-size: 11.5px; font-family: var(--sans); }
.chart .val { fill: var(--ink); font-size: 11.5px; font-weight: 700; font-family: var(--sans); }
.chart .bar { fill: var(--bar); }
.chart .bar.is-now { fill: var(--bar); opacity: 0.55; }
.chart .future { fill: var(--future); }
.chart .future-t { fill: var(--mute); font-size: 11.5px; font-family: var(--sans); }
.chart__note { margin-top: 6px; font-size: 13.5px; color: var(--mute); }

/* 가로 막대 */
.bars { margin-top: 12px; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; }
.bars .b__name { font-size: 15px; font-weight: 700; }
.bars .b__n { font-family: var(--num); font-weight: 800; font-size: 24px; line-height: 1; }
.bars .b__n small { font-family: var(--sans); font-size: 13px; font-weight: 700; margin-left: 2px; }
.bars .b__track { grid-column: 1 / -1; height: 12px; margin-top: 4px; border-radius: 6px; background: var(--bar-soft); overflow: hidden; }
.bars .b__track i { display: block; height: 100%; border-radius: 6px; background: var(--bar); }
.bars .b__sub { grid-column: 1 / -1; margin-top: 3px; font-size: 13px; color: var(--mute); }

/* 순위 */
.rank { display: grid; gap: 6px; }
.rank a { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.rank b { font-family: var(--num); font-weight: 800; font-size: 28px; line-height: 1; color: var(--num-c); }
.rank b small { font-family: var(--sans); font-size: 13px; margin-left: 2px; color: var(--ink); }
.rank span { font-size: 15px; font-weight: 700; line-height: 1.35; }
.rank span small { display: block; font-size: 12.5px; font-weight: 500; color: var(--mute); }

/* 수익 */
.money { margin-top: 12px; padding: 16px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.money__total { display: grid; gap: 2px; }
.money__total span { font-size: 13.5px; color: var(--mute); }
.money__total b { font-family: var(--num); font-weight: 800; font-size: 56px; line-height: 1; }
.money__total small { font-size: 13.5px; color: var(--mute); }
.money__rows { margin-top: 12px; border-top: 1px solid var(--line); }
.money__rows li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.money__rows b { font-variant-numeric: tabular-nums; }
.spend { margin-top: 14px; }
.spend__h { display: flex; justify-content: space-between; font-size: 15px; }
.meter { height: 10px; margin-top: 6px; border-radius: 5px; background: var(--bar-soft); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--bar); border-radius: 5px; }
.money__note { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--mute); }

/* 검증 */
.facts { margin-top: 12px; display: grid; gap: 8px; }
.facts li { padding: 14px 16px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.facts b { display: block; font-family: var(--num); font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--num-c); }
.facts p { margin-top: 4px; font-size: 15px; line-height: 1.6; }
.facts code { display: block; margin-top: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--mute); overflow-wrap: anywhere; }

/* 배운 것 */
.lessons__list { margin-top: 12px; display: grid; gap: 8px; counter-reset: l; }
.lessons__list li { counter-increment: l; position: relative; padding: 12px 14px 12px 46px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 15.5px; }
.lessons__list li::before { content: counter(l); position: absolute; left: 14px; top: 10px; font-family: var(--num); font-weight: 800; font-size: 22px; color: var(--num-c); }

/* 게임 목록 */
#gl-count { font-family: var(--num); font-weight: 800; color: var(--num-c); }
.games { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px; }
.games a { display: grid; grid-template-columns: 38px 28px 1fr; align-items: center; gap: 8px; min-height: 52px; padding: 7px 12px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.games .g__no { font-family: var(--num); font-weight: 800; font-size: 18px; color: var(--mute); }
.games .g__em { font-size: 22px; text-align: center; }
.games .g__t { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.games .g__t small { display: block; font-size: 12px; font-weight: 500; color: var(--mute); }
.games a:hover .g__t { text-decoration: underline; text-underline-offset: 3px; }
.games__more { margin-top: 8px; font-size: 13.5px; color: var(--mute); }

.foot { margin-top: 30px; padding: 22px 0 40px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mute); }
.foot p + p { margin-top: 6px; }
.foot a { display: inline-block; padding: 4px 0; }

@media (min-width: 760px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .state__dot { animation: none; }
}
