/* 아스콘.com 목업 — Apple-design 원칙: 시스템폰트, 반투명 크롬, 절제, 즉각 피드백 */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface2: #fafafa;
  --text: #1d1d1f;
  --text2: #6e6e73;
  --text3: #98989d;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #e8590c;
  --accent-soft: rgba(232, 89, 12, 0.1);
  --up: #d32f2f;
  --down: #1565c0;
  --ok: #2e7d32;
  --ok-soft: rgba(46, 125, 50, 0.1);
  --warn: #b26a00;
  --warn-soft: rgba(178, 106, 0, 0.1);
  --hold: #8e8e93;
  --chrome: rgba(245, 245, 247, 0.72);
  --scrim: rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0f;
    --surface: #1c1c1e;
    --surface2: #232326;
    --text: #f5f5f7;
    --text2: #a1a1a6;
    --text3: #6e6e73;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #ff7a33;
    --accent-soft: rgba(255, 122, 51, 0.14);
    --up: #ff6b60;
    --down: #64a4ff;
    --ok: #66bb6a;
    --ok-soft: rgba(102, 187, 106, 0.12);
    --warn: #e6a23c;
    --warn-soft: rgba(230, 162, 60, 0.12);
    --chrome: rgba(13, 13, 15, 0.72);
    --scrim: rgba(0, 0, 0, 0.55);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Pretendard,
    "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── 목업 배너 ─────────────────────────── */
.mock-banner {
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  text-align: center;
  padding: 6px 16px;
  letter-spacing: 0.01em;
}

/* ── 상단 크롬: 반투명 + 콘텐츠가 밑으로 흐름 ── */
header.chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--chrome);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  header.chrome { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.chrome-top {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand .logo { font-size: 19px; font-weight: 750; letter-spacing: -0.02em; }
.brand .logo em { color: var(--accent); font-style: normal; }
.brand .tag {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 6px;
}
/* 위치설정 — 우상단 고정 (확정 구조) */
.loc-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  transition: transform 100ms ease-out;
}
.loc-btn:active { transform: scale(0.96); }
.loc-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
nav.tabs {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a {
  flex: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text2);
  padding: 9px 13px 11px;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease-out, transform 100ms ease-out;
}
nav.tabs a:active { transform: scale(0.95); }
nav.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }

/* ── 레이아웃 ─────────────────────────── */
main { max-width: 1040px; margin: 0 auto; padding: 24px 20px 72px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 760px) { .g2, .g3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}
.card.pressable { transition: transform 100ms ease-out; display: block; }
.card.pressable:active { transform: scale(0.98); }
.card h2 {
  font-size: 13px; font-weight: 700; color: var(--text2);
  letter-spacing: 0.02em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
}
.card h2 .asof { font-weight: 500; color: var(--text3); font-size: 12px; letter-spacing: 0; }

/* 섹션 타이틀 */
.sec { margin: 30px 0 12px; }
.sec h1 { font-size: 21px; font-weight: 750; letter-spacing: -0.015em; }
.sec p { font-size: 13.5px; color: var(--text2); margin-top: 3px; }
.sec:first-child { margin-top: 0; }

/* ── 숫자 표기 ─────────────────────────── */
.num { font-variant-numeric: tabular-nums; }
.big {
  font-size: 40px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.big small { font-size: 17px; font-weight: 600; color: var(--text2); letter-spacing: 0; }
.mid { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mid small { font-size: 14px; font-weight: 600; color: var(--text2); }
.delta { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--text2); }
.sub { font-size: 13px; color: var(--text2); margin-top: 6px; }
.foot { font-size: 12px; color: var(--text3); margin-top: 10px; line-height: 1.55; }
.foot u { text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* 배지 */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  border-radius: 6px; padding: 2.5px 7px; vertical-align: 2px;
}
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.hold { color: var(--hold); background: rgba(142, 142, 147, 0.14); }
.badge.acc { color: var(--accent); background: var(--accent-soft); }

/* ── 표 ─────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text3);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 10px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

/* 리스트행 (공고 등) */
.row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
  padding: 13px 2px; border-bottom: 1px solid var(--line);
  transition: transform 100ms ease-out;
}
.row:active { transform: scale(0.99); }
.row:last-child { border-bottom: 0; }
.row .t { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.row .m { font-size: 12.5px; color: var(--text2); margin-top: 3px; }
.row .v { text-align: right; flex: none; }
.row .v .n { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row .v .d { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ── SVG 차트 공통 ───────────────────── */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .lbl { font-size: 10.5px; fill: var(--text3); font-family: inherit; }
.chart .series { stroke: var(--accent); stroke-width: 2.2; fill: none; stroke-linejoin: round; }
.chart .series2 { stroke: var(--down); stroke-width: 1.8; fill: none; stroke-dasharray: 5 4; }
.chart .area { fill: var(--accent); opacity: 0.07; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text2); margin-top: 8px; flex-wrap: wrap; }
.legend .k { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: 3px; margin-right: 5px; }

/* 계절 히트스트립 */
.heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 6px; }
.heat .cell { border-radius: 8px; padding: 10px 0 8px; text-align: center; }
.heat .cell .mn { font-size: 11px; color: var(--text2); font-weight: 600; }
.heat .cell .vv { font-size: 11px; color: var(--text3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.heat .cell.now { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) {
  .heat { grid-template-columns: repeat(6, 1fr); }
}

/* ── 입찰 슬라이더 ───────────────────── */
.slider-zone { margin-top: 14px; }
input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none; height: 28px; background: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px; background: var(--line-strong);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  margin-top: -10.5px; cursor: grab; transition: transform 100ms ease-out;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); cursor: grabbing; }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 3px; background: var(--line-strong); }
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ── 위치설정 시트 ───────────────────── */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 60; background: var(--scrim);
  opacity: 0; pointer-events: none; transition: opacity 240ms ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line);
  max-width: 560px; margin: 0 auto;
  padding: 10px 22px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(105%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0.28, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.16);
}
body.sheet-open .sheet { transform: translateY(0); }
body.sheet-open .sheet-scrim { opacity: 1; pointer-events: auto; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 2px auto 14px; }
.sheet h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.sheet .desc { font-size: 13px; color: var(--text2); margin: 4px 0 14px; }
.seg {
  display: flex; background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 14px;
}
.seg button {
  flex: 1; font-size: 13.5px; font-weight: 600; padding: 7px 0; border-radius: 8px;
  color: var(--text2); transition: transform 100ms ease-out;
}
.seg button:active { transform: scale(0.97); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips button {
  font-size: 14px; font-weight: 600; padding: 11px 0; border-radius: 12px;
  background: var(--bg); border: 1px solid transparent;
  transition: transform 100ms ease-out;
}
.chips button:active { transform: scale(0.95); }
.chips button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── 잠금(HOLD) 카드 ─────────────────── */
.card.locked { background: var(--surface2); border-style: dashed; }
.card.locked .big, .card.locked .mid { color: var(--text3); filter: blur(6px); user-select: none; }

/* 푸터 */
footer {
  border-top: 1px solid var(--line);
  max-width: 1040px; margin: 0 auto; padding: 22px 20px 40px;
  font-size: 12.5px; color: var(--text3); line-height: 1.7;
}
footer a { color: var(--text2); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .sheet { transition: opacity 200ms ease; transform: none !important; display: none; }
  body.sheet-open .sheet { display: block; }
  * { transition-duration: 0.01ms !important; }
}
