/* オフィス計算ツール - lightweight shared styles. No frameworks.
   柔らかいイマドキ系: 角丸大きめ、硬い枠線なし、柔らかい影、淡い背景。 */
:root {
  --ink: #2e3242;
  --muted: #7a7f8f;
  --accent: #5b7fb8;
  --accent-dark: #46679c;
  --accent-soft: #e9eff9;
  --bg: #f4f6fa;
  --card: #ffffff;
  --field-bg: #f1f4f9;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(70, 90, 140, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", YuGothic, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

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

header.site-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 20px 0 8px; flex-wrap: wrap;
}
.site-name { font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.site-name span { color: var(--accent); }
nav.main-nav a { color: var(--muted); text-decoration: none; margin-left: 16px; font-size: .95rem; }
nav.main-nav a:hover { color: var(--accent-dark); text-decoration: underline; }

h1 { font-size: 1.7rem; line-height: 1.35; margin: 18px 0 8px; }
h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px; margin: 16px 0;
}

.tool-list { list-style: none; padding: 0; margin: 0; }
.tool-list li { margin: 12px 0; }
.tool-list a {
  display: block; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; color: var(--ink); text-decoration: none;
}
.tool-list a:hover { box-shadow: 0 10px 30px rgba(70, 90, 140, 0.14); }
.tool-list .tool-title { font-weight: 700; font-size: 1.05rem; }
.tool-list .tool-desc { color: var(--muted); font-size: .92rem; }

/* Form */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .form-grid { grid-template-columns: repeat(3, 1fr); } }
.form-section { margin: 22px 0 6px; font-weight: 700; font-size: 1.02rem; }
.form-section:first-child { margin-top: 0; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; padding: 11px 12px; font-size: 1rem; border: none;
  border-radius: 12px; background: var(--field-bg); color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; background: #fff;
}
.field .unit { font-size: .82rem; color: var(--muted); margin-top: 4px; }

.mode-toggle { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.mode-toggle label {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--field-bg); border-radius: 999px; padding: 8px 16px; font-size: .95rem;
}
.mode-toggle input { accent-color: var(--accent); }

.hint { color: var(--muted); font-size: .9rem; }

/* Results */
.summary { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .summary { grid-template-columns: repeat(3, 1fr); } }
.summary .item { background: var(--accent-soft); border-radius: 14px; padding: 13px 15px; }
.summary .item .label { font-size: .8rem; color: var(--muted); }
.summary .item .value { font-size: 1.3rem; font-weight: 700; }
.summary .item.total { background: var(--accent); }
.summary .item.total .label { color: #dbe6f7; }
.summary .item.total .value { color: #fff; }

table.ref { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .95rem; }
table.ref th, table.ref td {
  padding: 9px 11px; text-align: left; border-bottom: 1px solid #edf0f5;
}
table.ref thead th { background: var(--accent-soft); color: var(--ink); }
table.ref tbody th { font-weight: 600; }
table.ref td.amount { font-weight: 700; white-space: nowrap; }
table.ref tr:last-child th, table.ref tr:last-child td { border-bottom: none; }

.formula {
  background: var(--accent-soft); border-radius: 14px; padding: 14px 16px;
  font-size: 1.03rem; text-align: center; margin: 14px 0;
}

.note {
  background: #fdf6e9; border-radius: 14px; padding: 14px 16px;
  font-size: .92rem; margin: 16px 0;
}
.note strong { color: #8a6d1f; }

footer.site-footer { color: var(--muted); font-size: .85rem; margin-top: 40px; }
