:root {
  --navy: #14254a;
  --navy-2: #233a6b;
  --gold: #b8963e;
  --gold-soft: #f5efe0;
  --ink: #1d2433;
  --muted: #6b7385;
  --line: #e4e7ee;
  --bg: #ffffff;
  --bg-2: #f7f8fb;
  --ok: #2f6b4f;
  --warn: #9a5b12;
  font-family: Arial, "Meiryo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 16px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.logo { font-family: Quantico, Arial, sans-serif; font-weight: 700; letter-spacing: .04em; color: var(--navy); font-size: 18px; }
.brand-sub { color: var(--muted); font-size: 12px; }

.hero { padding: 28px 0 18px; }
.eyebrow { display: inline-block; margin: 0 0 8px; font-size: 12px; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 2px 10px; letter-spacing: .04em; }
.hero h1 { margin: 0 0 10px; font-size: 26px; line-height: 1.4; color: var(--navy); letter-spacing: .02em; }
.lead { margin: 0; color: var(--muted); font-size: 15px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; margin: 0 0 18px; box-shadow: 0 1px 2px rgba(20, 37, 74, .04); }

.field { margin-bottom: 22px; }
.field > label, .sub-label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 8px; font-size: 15px; }
.sub-label { font-size: 14px; margin-top: 14px; }
.input-row { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-2); padding: 0 14px; transition: border-color .15s; }
.input-row:focus-within { border-color: var(--navy-2); background: #fff; }
.input-row input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 22px; padding: 12px 0; text-align: right; color: var(--ink); font-family: Arial, sans-serif; outline: none; }
.unit { margin-left: 8px; color: var(--muted); font-size: 15px; }
.readable { margin: 4px 2px 0; min-height: 1.2em; text-align: right; color: var(--navy-2); font-size: 14px; font-weight: 700; }
.help { margin: 4px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.help.ok { color: var(--ok); }
.help.warn { color: var(--warn); }

#asset-block.dim { opacity: .55; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip, .seg-btn { appearance: none; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 10px; font-size: 15px; color: var(--ink); cursor: pointer; text-align: center; line-height: 1.3; min-height: 54px; font-family: inherit; }
.chip small, .seg-btn small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.chip.is-on, .seg-btn.is-on { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip.is-on small, .seg-btn.is-on small { color: #d9deea; }
.chip:last-child:nth-child(odd) { grid-column: 1 / -1; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.extra { margin-top: 6px; padding: 4px 14px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; }
.mini-grid { display: grid; gap: 10px; }
.mini-grid label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.mini-grid input { width: 42%; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 17px; text-align: right; background: #fff; font-family: Arial, sans-serif; }

.detail-settings { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 18px; }
.detail-settings summary, .steps summary, .notes summary { cursor: pointer; color: var(--navy); font-weight: 700; font-size: 14px; padding: 6px 0; }
.detail-settings[open] summary { margin-bottom: 8px; }

.btn-primary { display: block; width: 100%; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font-size: 18px; font-weight: 700; padding: 16px; cursor: pointer; letter-spacing: .08em; font-family: inherit; }
.btn-primary:active { background: var(--navy-2); }
.privacy-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; padding-left: 18px; position: relative; }
.privacy-note::before { content: "🔒"; position: absolute; left: 0; font-size: 11px; }

.result { border-top: 4px solid var(--gold); }
.result-caption { margin: 0; font-size: 12px; color: var(--muted); }
.verdict { margin: 4px 0 6px; font-size: 26px; font-weight: 700; line-height: 1.35; color: var(--navy); }
.st-yes .verdict { color: #8a2c1d; }
.st-needDetail .verdict { color: var(--warn); }
.verdict-sub { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.issues { background: #fff7ea; border: 1px solid #f0d6a8; border-radius: 10px; padding: 4px 14px; font-size: 14px; }
.issues ul { padding-left: 18px; }

.figures { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.figures > div { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
.figures dt { font-size: 12px; color: var(--muted); line-height: 1.4; }
.figures dt small { display: block; font-size: 10px; }
.figures dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; color: var(--navy); font-family: Arial, "Meiryo", sans-serif; }
.figures .accent { background: var(--gold-soft); }
.figures .accent dd { color: #8a5f12; }
.figures .total { grid-column: 1 / -1; background: var(--navy); }
.figures .total dt { color: #cfd6e6; }
.figures .total dd { color: #fff; font-size: 26px; }
.fig-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.chart { margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto auto; column-gap: 8px; margin-bottom: 8px; align-items: center; }
.bar-label { font-size: 12px; color: var(--muted); grid-row: 1 / 3; }
.bar-track { display: flex; height: 18px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; }
.b-old, .b-new { background: #8e9ab5; }
.b-new { background: var(--navy-2); }
.b-add { background: var(--gold); }
.bar-val { font-size: 12px; text-align: right; color: var(--ink); }
.legend { font-size: 11px; color: var(--muted); margin: 2px 0 0; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.lg-base { background: var(--navy-2); }
.lg-add { background: var(--gold); }

.steps { margin-top: 18px; }
.steps details, .notes { border-bottom: 1px solid var(--line); padding: 4px 0; }
.steps details > div { padding: 4px 0 10px; }
table.calc { width: 100%; border-collapse: collapse; font-size: 13px; }
table.calc th { text-align: left; font-weight: normal; color: var(--ink); padding: 6px 6px 6px 0; vertical-align: top; }
table.calc td { text-align: right; white-space: nowrap; padding: 6px 0; font-family: Arial, sans-serif; vertical-align: top; }
table.calc tr { border-bottom: 1px dashed var(--line); }
table.calc tr.sum th, table.calc tr.sum td { font-weight: 700; color: var(--navy); }
.small { font-size: 12px; color: var(--muted); margin: 6px 0; }
.notes { margin-top: 8px; font-size: 13px; color: var(--muted); }
.notes ul { padding-left: 18px; margin: 6px 0; }

.actions { display: grid; gap: 10px; margin-top: 18px; }
.btn-secondary, .btn-ghost { display: block; text-align: center; text-decoration: none; border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-secondary { border: 1.5px solid var(--navy); color: var(--navy); background: #fff; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--muted); background: #fff; }

.disclaimer { font-size: 12px; color: var(--muted); line-height: 1.7; background: var(--bg-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 24px; }
.disclaimer p { margin: 0; }
.site-footer { border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: 12px; color: var(--muted); text-align: center; }

@media (min-width: 720px) {
  .hero h1 { font-size: 32px; }
  .card { padding: 28px; }
  .chips { grid-template-columns: repeat(3, 1fr); }
  .chip:last-child:nth-child(odd) { grid-column: auto; }
  .figures { grid-template-columns: repeat(3, 1fr); }
}

/* 適用なし・適用ありの比較 */
.compare { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cmp-head, .cmp-row { display: grid; grid-template-columns: 96px 1fr 1fr; align-items: center; }
.cmp-head { background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; }
.cmp-head span, .cmp-row span { padding: 9px 10px; text-align: right; }
.cmp-head span:first-child, .cmp-label { text-align: left !important; }
.cmp-head span:last-child { background: #0d1a36; }
.cmp-row { border-top: 1px solid var(--line); font-family: Arial, "Meiryo", sans-serif; font-size: 15px; }
.cmp-row span:last-child { background: var(--gold-soft); font-weight: 700; }
.cmp-label { font-size: 12px; color: var(--muted); }
.cmp-main span { font-size: 18px; font-weight: 700; color: var(--navy); }
.cmp-main .cmp-label { font-size: 12px; font-weight: normal; color: var(--muted); }
.diff-box { margin-top: 12px; border-radius: 12px; background: var(--navy); color: #fff; padding: 14px 16px; text-align: center; }
.diff-label { margin: 0; font-size: 13px; color: #cfd6e6; }
.diff-value { margin: 2px 0; font-size: 30px; font-weight: 700; font-family: Arial, "Meiryo", sans-serif; color: #fff; }
.st-yes .diff-value { color: #f1d999; }
.diff-sub { margin: 0; font-size: 12px; color: #cfd6e6; }
.trigger { margin: 10px 0 0; font-size: 13px; background: var(--bg-2); border-left: 3px solid var(--gold); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.ref-2026 { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.ref-2026 summary { cursor: pointer; color: var(--navy); font-weight: 700; font-size: 14px; padding: 6px 0; }
.cmp-head, .cmp-row { grid-template-columns: 60px 1fr 1fr; }
.cmp-head span, .cmp-row span { padding: 9px 6px; white-space: nowrap; }
.cmp-row { font-size: 14px; }
.cmp-main span { font-size: 15px; }
@media (min-width: 720px) { .cmp-head, .cmp-row { grid-template-columns: 110px 1fr 1fr; } .cmp-main span { font-size: 20px; } .cmp-row { font-size: 16px; } }
.cmp-row .cmp-label { white-space: normal; line-height: 1.3; }
:root { color-scheme: light; }
input { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.mini-grid input:focus { outline: none; border-color: var(--navy-2); }
.input-row.is-auto { background: #eef1f6; border-style: dashed; }
.mini-grid input { flex: 0 0 42%; width: 42%; }
.install { margin-bottom: 18px; text-align: center; }
.install-title { font-weight: 700; color: var(--navy); margin: 0 0 8px; }
@media (display-mode: standalone) { .site-header { padding-top: env(safe-area-inset-top); } }
