:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --border: #e5e7eb;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }

header.site { padding: 16px 0 8px; }
header.site a { color: var(--muted); text-decoration: none; font-size: 14px; }
header.site a:hover { color: var(--accent); }

h1 { font-size: 24px; line-height: 1.35; margin: 8px 0 4px; }
.subtitle { color: var(--muted); font-size: 15px; margin-bottom: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

input[type="number"], select {
  width: 100%;
  font-size: 17px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

.chip {
  display: inline-block;
  font-size: 13px;
  padding: 5px 10px;
  margin-top: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.chip:hover { background: var(--accent); color: #fff; }

.result { border-color: var(--accent); }
.result h2 { font-size: 16px; margin-bottom: 12px; }

.big {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.big small { font-size: 16px; font-weight: 600; }

table.breakdown { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
table.breakdown td { padding: 9px 0; border-top: 1px solid var(--border); }
table.breakdown td:last-child { text-align: right; font-weight: 600; }
table.breakdown tr.total td { font-weight: 800; }

.notice { border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-top: 12px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

section.info h2 { font-size: 18px; margin: 28px 0 10px; }
section.info h3 { font-size: 15px; margin: 18px 0 6px; }
section.info p, section.info li { font-size: 15px; color: #374151; }
section.info ul { padding-left: 20px; }
section.info .formula {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 8px 0;
}

footer.site {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* hub page */
.tool-list { display: grid; gap: 12px; }
.tool-list a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
}
.tool-list a:hover { border-color: var(--accent); }
.tool-list .name { font-weight: 700; font-size: 17px; }
.tool-list .desc { font-size: 14px; color: var(--muted); margin-top: 2px; }
