:root {
  color-scheme: light;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #111;
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #111; outline-offset: 3px; }

.page-shell { width: min(100% - 48px, 680px); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ddd; }
.brand { color: inherit; text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: -.04em; }
.book-label { font-size: 14px; color: #555; white-space: nowrap; }
main { flex: 1; }
.hero { padding: 84px 0 42px; }
h1 { margin: 0; font-size: clamp(36px, 6vw, 44px); line-height: 1.25; font-weight: 750; letter-spacing: -.065em; }
.hero-copy { margin: 11px 0 47px; color: #555; font-size: 14px; }

.search-card label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.search-row { display: flex; gap: 10px; }
.search-row input { width: 100%; min-width: 0; height: 56px; padding: 0 17px; border: 1px solid #111; border-radius: 0; background: #fff; color: #111; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.search-row input::placeholder { color: #999; font-weight: 400; }
.search-button, .next-button { border: 1px solid #111; border-radius: 0; background: #111; color: #fff; font-size: 14px; font-weight: 650; white-space: nowrap; }
.search-button { min-width: 88px; padding: 0 20px; }
.search-button:hover, .next-button:hover { background: #fff; color: #111; }
.search-help { margin: 11px 0 0; color: #666; font-size: 12px; }

.result { margin: 0 0 72px; scroll-margin-top: 24px; }
.result[hidden] { display: none; }
.result-card { border-top: 1px solid #111; }
.result-head { padding: 24px 0 0; }
.result-head h2 { margin: 0; font-size: 20px; line-height: 1.35; letter-spacing: -.04em; }
.chapter-label { margin: 6px 0 0; color: #666; font-size: 13px; }
.hint-area { padding: 22px 0 0; }
.hint-progress { display: flex; gap: 5px; margin-bottom: 24px; }
.hint-progress span { flex: 1; height: 2px; background: #ddd; }
.hint-progress span.active { background: #111; }
.hint-label { margin: 0 0 13px; color: #555; font-size: 13px; }
.hint-text { margin: 0; font-size: 19px; line-height: 1.75; letter-spacing: -.025em; word-break: keep-all; }
.hint-formula { display: block; margin-top: 19px; padding-top: 12px; border-top: 1px solid #ddd; }
.formula-caption { display: block; margin-bottom: 4px; color: #666; font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 12px; line-height: 1.5; }
.formula-equation { display: block; font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif; font-size: 18px; line-height: 1.6; letter-spacing: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.hint-bottom { margin-top: 28px; }
.next-button { min-height: 44px; padding: 0 17px; }
.empty-card { padding: 24px 0; }
.empty-card h2 { margin: 0 0 8px; font-size: 18px; }
.empty-card p { margin: 0; color: #555; line-height: 1.6; }

@media (max-width: 480px) {
  .page-shell { width: calc(100% - 36px); }
  .site-header { min-height: 64px; }
  .hero { padding-top: 66px; }
  .hero-copy { margin-bottom: 39px; }
  .search-row input { height: 54px; }
  .search-button { min-width: 76px; padding: 0 14px; }
  .hint-text { font-size: 18px; }
}
