:root {
  --bg: #f6f6f4; --card: #fff; --text: #1a1a1a; --muted: #6b6b6b;
  --border: #e2e2df; --panel: #f4f4f2; --warn: #8a5a00;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px;
}
.card {
  width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px;
}
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.head h1 { font-size: 18px; font-weight: 600; margin: 0; }
.icon { color: var(--muted); flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 13px; color: var(--muted); }
input, select {
  width: 100%; height: 44px; padding: 0 12px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 12px; outline: none;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b6b6b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input:focus, select:focus { border-color: #9a9a96; }
hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0 20px; }
.result { background: var(--panel); border-radius: 16px; padding: 18px 20px; }
.lots { font-size: 44px; font-weight: 600; line-height: 1.15; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.risk-out { font-size: 14px; }
.note { margin-top: 8px; min-height: 0; color: var(--muted); }
.note:empty { display: none; }
.is-approx .note, .is-error .note { color: var(--warn); }
.is-error .lots { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.foot { margin-top: 20px; }
.foot p { margin: 12px 0 0; }
.btn {
  font: inherit; font-size: 14px; color: var(--text); background: transparent; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; padding: 9px 16px;
}
.btn:hover { background: var(--panel); }
@media (max-width: 480px) {
  body { padding: 20px 16px; }
  .card { padding: 20px; border-radius: 18px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .lots { font-size: 38px; }
}
