:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #f7f9f8; color: #172b27; -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; -webkit-tap-highlight-color: transparent; }
.shell { width: min(100% - 32px, 440px); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 28px 4px 24px; font-size: 13px; font-weight: 750; letter-spacing: .12em; }
.brand-mark { color: #287363; font-size: 29px; line-height: 1; }
.calculator { background: #fff; border: 1px solid #e3eae6; border-radius: 22px; padding: 28px 22px 22px; box-shadow: 0 8px 28px rgba(13,41,33,.035); }
.eyebrow { margin: 0 0 9px; color: #60736d; font-weight: 700; font-size: 11px; letter-spacing: .15em; }
h1 { margin: 0; font-size: clamp(22px,5.4vw,28px); font-weight: 750; letter-spacing: -.015em; line-height: 1.35; }
.intro { margin: 9px 0 25px; color: #526660; font-size: 13px; line-height: 1.65; }
.field { margin: 0 0 20px; }
label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 650; line-height: 1.6; }
.unit { color: #526660; font-size: 12px; font-weight: 400; }
input { width: 100%; min-height: 52px; margin-top: 8px; padding: 10px 13px; border: 1px solid #aebeb6; border-radius: 12px; background: #fff; color: #172b27; font-size: 20px; font-variant-numeric: tabular-nums; }
input::placeholder { color: #657870; font-size: 16px; opacity: 1; }
input[aria-invalid="true"] { border-color: #a13232; }
.hint { margin: 6px 0 0; font-size: 11px; color: #526660; line-height: 1.6; }
.error { margin: 7px 0 0; color: #a13232; font-size: 12px; line-height: 1.65; }
.action { width: 100%; min-height: 60px; border: 1px solid #287363; border-radius: 16px; font-size: 17px; font-weight: 750; cursor: pointer; touch-action: manipulation; }
.action-primary { background: #287363; color: #fff; }
.action-primary:hover { background: #205c50; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #e19c24; outline-offset: 3px; }
.reset { display: block; margin: 10px auto 0; border: 0; border-radius: 12px; background: transparent; color: #315d52; min-height: 48px; padding: 0 20px; font-size: 14px; cursor: pointer; touch-action: manipulation; }
.reset:hover { background: #f1f6f3; }
.readout { margin-top: 18px; padding: 24px 12px; text-align: center; background: #f5f8f6; border: 1px solid #e9efec; border-radius: 18px; overflow-wrap: anywhere; }
.readout-label { margin: 0 0 10px; font-size: 12px; color: #526660; }
.result-number { margin: 0; font-size: clamp(32px,9vw,44px); font-weight: 750; line-height: 1.4; font-variant-numeric: tabular-nums; }
.result-detail, .result-note { margin: 10px 0 0; color: #526660; font-size: 11px; line-height: 1.7; }
.result-note { color: #244a40; }
.details { margin-top: 16px; color: #526660; font-size: 12px; line-height: 1.8; }
summary { min-height: 44px; padding: 11px 4px; color: #315d52; cursor: pointer; border-radius: 8px; }
.details p { margin: 8px 0; overflow-wrap: anywhere; }
.notice { border-top: 1px solid #eef2ef; margin: 14px 0 0; padding-top: 17px; color: #526660; font-size: 11px; line-height: 1.8; }
footer { margin-top: auto; padding: 34px 8px 26px; text-align: center; font-size: 11px; color: #60736d; }
@media (max-width:360px) { .shell { width: calc(100% - 24px); } .calculator { padding: 23px 16px 19px; } }
@media (prefers-reduced-motion:no-preference) { button { transition: background-color .12s ease; } }
