
:root {
  color-scheme: light;
  --bg: #f4f5f9;
  --surface: #fff;
  --text: #15181f;
  --text-muted: #6b7280;
  --border: #e8e9ee;
  --accent: #2554e0;
  --accent-soft: #eaefff;
  --up: #d1314a;
  --warn-bg: #fff8e8;
  --warn-border: #f0c75e;
  --warn-text: #7a5c00;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20,24,40,.04), 0 6px 16px rgba(20,24,40,.05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--bg); line-height: 1.65;
}
main { max-width: 720px; margin: 0 auto; padding: 4px 16px 56px; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-header {
  padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(6px); -webkit-backdrop-filter: saturate(180%) blur(6px);
}
.site-header a { font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: -.01em; }

h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.015em; margin: 20px 0 10px; line-height: 1.3; }
h2 {
  font-size: 1.02rem; font-weight: 700; margin: 0 0 12px; padding-left: 10px;
  border-left: 4px solid var(--accent); line-height: 1.3;
}
h3 {
  font-size: .95rem; font-weight: 700; margin: 20px 0 6px; color: var(--text-muted);
  padding-top: 14px; border-top: 1px solid var(--border);
}
h3:first-child { margin-top: 4px; padding-top: 0; border-top: none; }

main > p:not([class]) { color: var(--text-muted); font-size: .97rem; margin: 0 0 24px; }

.breadcrumb {
  display: inline-block; color: var(--text-muted); font-size: .82rem; font-weight: 600;
  background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; margin: 0 0 18px;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

main > section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 16px; margin: 0 0 16px;
}

.summary {
  border-top: 4px solid var(--accent); padding-top: 16px;
}
.price-big { font-size: 1.55rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.spread-note {
  display: inline-block; font-weight: 700; font-size: .88rem; color: var(--accent);
  background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin: 10px 0 0;
}
.caution {
  background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text);
  border-left: 4px solid var(--warn-border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: .88rem; line-height: 1.55; margin: 0 0 16px;
}
.siblings { color: var(--text-muted); font-size: .88rem; }
.siblings a { font-weight: 600; }
.change {
  display: inline-block; color: var(--up); font-weight: 700; font-size: .92rem;
  margin: 10px 0 0;
}
.muted { color: var(--text-muted); font-size: .88rem; margin: 8px 0 0; }
.small { font-size: .78rem; }

table.type-table { width: 100%; border-collapse: collapse; margin: 0; }
table.type-table th {
  text-align: left; padding: 8px 6px; font-size: .8rem; font-weight: 700;
  color: var(--text-muted); border-bottom: 2px solid var(--border);
}
table.type-table td {
  text-align: left; padding: 11px 6px; border-bottom: 1px solid var(--border); font-size: .95rem;
}
table.type-table tr:last-child td { border-bottom: none; }
table.type-table th:nth-child(2), table.type-table td:nth-child(2),
table.type-table th:nth-child(3), table.type-table td:nth-child(3) { text-align: right; }
table.type-table td:nth-child(3) { font-weight: 700; }
table.type-table tbody tr:nth-child(even) { background: var(--bg); }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 4px 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: .92rem;
}
ul.plain li:last-child { border-bottom: none; }
ul.plain a { color: var(--accent); font-weight: 700; text-decoration: none; }
ul.plain a:hover, ul.plain a:active { text-decoration: underline; }
.badge {
  flex: 0 0 auto; display: inline-block; color: var(--accent); background: var(--accent-soft);
  font-weight: 700; font-size: .82rem; text-align: right; line-height: 1.3;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}

.chart { width: 100%; height: auto; }
.chart-axis { stroke: var(--border); stroke-width: 1.5; }
.chart-line {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.chart-dot { fill: var(--accent); r: 4; stroke: var(--surface); stroke-width: 2; }
.chart-axislabel { font-size: 10px; fill: var(--text-muted); }
.chart-ptlabel { font-size: 11px; fill: var(--text); font-weight: 700; }

.site-footer {
  max-width: 720px; margin: 8px auto 0; padding: 16px; color: var(--text-muted); font-size: .78rem;
}
.site-footer p { margin: 4px 0; }

/* PC 배치 (2026-10-01, 장우 지시): ~900px부터 폭을 넓히고, 첫 페이지(index)만 섹션을
   2열 그리드로, "분류별 전체 품목"은 다단으로. 폰(900px 미만)은 지금처럼 1열 그대로. */
@media (min-width: 900px) {
  main, .site-footer { max-width: 1160px; }
  .site-header { max-width: 1160px; margin: 0 auto; }

  body.page-home main {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: start;
  }
  body.page-home main > h1,
  body.page-home main > p:not([class]),
  body.page-home main > section:nth-of-type(5),
  body.page-home main > p.muted.small {
    grid-column: 1 / -1;
  }
  body.page-home main > section:nth-of-type(5) {
    columns: 4 230px; column-gap: 24px;
  }
  body.page-home main > section:nth-of-type(5) h3 { break-inside: avoid; break-after: avoid; }
  body.page-home main > section:nth-of-type(5) ul.plain { break-inside: avoid; margin-bottom: 4px; }
}
