/* 생활한입 계산기 공통 스타일 */
:root {
  --bg: #fffaf0; --card: #ffffff; --ink: #2b2420; --muted: #7d6f65; --line: #f0e3d6;
  --accent: #1f6fc2; --accent-soft: #e8f1fb; --good: #1d7a4f; --warn: #a65a00;
  --shadow: 0 6px 18px rgba(80, 50, 30, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412; --card: #221e1b; --ink: #f4ece6; --muted: #a8998d; --line: #342d28;
    --accent: #5aa2ec; --accent-soft: #1d2a38; --good: #5cc28f; --warn: #f0a650; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.6; word-break: keep-all;
}
a { color: var(--accent); }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
.top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.top a { color: var(--ink); text-decoration: none; font-weight: 800; }
.top nav a { color: var(--muted); font-weight: 600; margin-left: 12px; }
h1 { font-size: 24px; line-height: 1.35; margin: 18px 0 6px; letter-spacing: -0.4px; }
.lead { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; box-shadow: var(--shadow); margin: 14px 0;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type="number"], input[type="text"], input[type="date"], select {
  width: 100%; font-size: 18px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink); outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips button {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 6px 10px; font-size: 13px; cursor: pointer;
}
.result { background: var(--accent-soft); border-color: transparent; }
.result .big { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin: 2px 0 4px; }
.result .label { font-size: 13px; color: var(--muted); }
.result table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.result td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.result td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.note { font-size: 13px; color: var(--muted); }
.warn { color: var(--warn); font-weight: 700; font-size: 14px; }
h2 { font-size: 19px; margin: 28px 0 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.tbl th { color: var(--muted); font-weight: 700; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { font-weight: 700; cursor: pointer; }
.related { display: grid; gap: 8px; }
.related a {
  display: block; padding: 12px 14px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700;
}
.ad-slot { margin: 18px 0; min-height: 0; }
.ad-slot:empty { display: none; }
.sources { font-size: 13px; color: var(--muted); }
.sources li { margin-bottom: 4px; }
footer { margin-top: 36px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; }
footer a { color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid a {
  display: block; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
}
.grid b { display: block; font-size: 15px; }
.grid span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
