:root {
  --bg: #0d1220;
  --panel: #151c2e;
  --line: #26304a;
  --ink: #eef1f8;
  --mute: #8f9ab5;
  --up: #ff5d5d;      /* 오름: 빨강 (한국 관례) */
  --down: #4f9dff;    /* 내림: 파랑 */
  --flat: #b9c0d3;
  --accent: #f4c95d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.5;
}
h1, h2, p { margin: 0; }
.top, main { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; padding-bottom: 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand p { font-size: 13px; color: var(--mute); }
.moon {
  width: 30px; height: 30px; border-radius: 50%;
  box-shadow: inset -9px -4px 0 0 var(--accent);
  transform: rotate(-20deg);
}
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.dot.ok { background: #44d18a; }
.dot.bad { background: var(--up); }

main { padding-bottom: 48px; }
.error {
  background: #3a1820; border: 1px solid #70303c; color: #ffc9cf;
  padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px;
}

.hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1b2440, #151c2e);
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
}
.hero h2 { font-size: 15px; font-weight: 600; color: var(--mute); }
.hero h2 small { font-size: 12px; font-weight: 500; color: var(--accent); margin-left: 6px; }
.hero-price { font-size: clamp(40px, 9vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-side { text-align: right; }
.basis { font-size: 13px; color: var(--mute); margin-top: 4px; }

.sec { font-size: 14px; font-weight: 700; color: var(--mute); margin: 28px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .grid.three { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.card .name { font-size: 15px; font-weight: 700; }
.card .sub { font-size: 12px; color: var(--mute); }
.card .price { font-size: 22px; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card .extra { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; min-height: 18px; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.card .name, .card .sub { word-break: keep-all; white-space: nowrap; }
@media (max-width: 720px) {
  .hero-side { text-align: left; }
  .card { padding: 12px 14px; }
  .card .price { font-size: 20px; }
}

.chg { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--flat); }
.chg.big { font-size: 28px; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }

.notice {
  margin-top: 28px; padding: 16px 18px; border-radius: 12px;
  border: 1px dashed var(--line); font-size: 13px; color: var(--mute);
}
.notice strong { color: var(--accent); font-size: 13px; }
.notice p { margin-top: 6px; }
.notice .src { font-size: 12px; }
