/* calc-form.com 共通スタイル */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent: #0092d7;
  --text: #333;
  --text-sub: #666;
  --text-hint: #999;
  --border: #e0e0e0;
  --bg: #fff;
  --bg-sub: #f5f5f5;
  --radius: 8px;
  --danger: #cc0000;
  --container: 800px;
  --container-pad: 15px;
  --body-text: 1.15em;
}
body {
  font-family: Lato, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, sans-serif;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  background: #fff;
}
p { font-size: var(--body-text); line-height: 27.6px; }
/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo img { height: 36px; width: auto; }
.site-nav { display: flex; align-items: center; }
.site-nav a {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 0 12px;
  height: 60px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* ===== Dropdown ===== */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 160px;
  z-index: 200;
  padding: 4px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  display: block;
  height: auto;
  border-bottom: none;
}
.nav-dropdown-menu a:hover { color: var(--accent); background: var(--bg-sub); }
/* ===== Hamburger / Mobile ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 8px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; font-size: 15px; color: var(--text); text-decoration: none; padding: 10px 1.5rem; }
.mobile-menu a:hover { color: var(--accent); background: var(--bg-sub); }
.mobile-sub a { padding-left: 2.5rem; font-size: 14px; color: var(--text-sub); }
/* ===== Page Layout ===== */
.page-wrap { max-width: var(--container); margin: 0 auto; padding: 2.5rem var(--container-pad) 4rem; }
h1.page-title { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; line-height: 1.3; }
p.page-desc { font-size: var(--body-text); line-height: 27.6px; color: var(--text-sub); margin-bottom: 1.75rem; }
/* ===== Card ===== */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.field-label { color: var(--text-sub); margin-bottom: 8px; }
.input-row { display: flex; gap: 10px; align-items: center; }
.input-row input {
  width: 180px;
  height: 42px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 12px;
  font-size: var(--body-text);
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.input-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,146,215,.15); }
.sep { font-size: var(--body-text); color: var(--text-sub); }
.error { font-size: 14px; color: var(--danger); margin-top: 8px; }
/* ===== Result Card ===== */
.result-card { background: var(--bg-sub); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.result-main { font-size: 34px; font-weight: 700; color: var(--text); margin-bottom: 1rem; line-height: 1.2; }
.result-row { display: flex; justify-content: flex-start; align-items: center; font-size: var(--body-text); margin-bottom: 8px; }
.result-row-inner { display: flex; align-items: center; gap: 8px; width: 100%; }
.result-row-inner > div { flex: 1; display: flex; align-items: center; }
.rlabel { color: var(--text-sub); min-width: 6em; flex-shrink: 0; }
.rval { color: var(--text); font-weight: 500; flex: 1; text-align: right; }
.copy-btn {
  font-size: 14px;
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
  margin-left: 16px;
  flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { color: green; border-color: green; }
/* ===== Options ===== */
.hr { height: 1px; background: var(--border); margin: 1rem 0; }
.opt-label { font-size: 16px; color: var(--text-hint); margin-bottom: 5px; margin-top: 0.75rem; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 0.25rem; }
.radio-row label { font-size: var(--body-text); color: var(--text-sub); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.check-section { margin-top: 0.75rem; }
.check-label { font-size: 16px; color: var(--text-hint); margin-bottom: 5px; }
.check-row { display: flex; align-items: center; gap: 6px; }
.check-row label { font-size: var(--body-text); color: var(--text-sub); cursor: pointer; }
.actions { display: flex; gap: 8px; margin-top: 1.25rem; flex-wrap: wrap; }
.act-btn {
  font-size: 14px;
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
}
.act-btn:hover { border-color: var(--accent); color: var(--accent); }
.text-output {
  margin-top: 1rem;
  padding: 1rem;
  background: #efefef;
  border-radius: 4px;
  color: var(--text-sub);
  white-space: pre-wrap;
  display: none;
  font-family: inherit;
  font-size: var(--body-text);
  line-height: 1.8;
}
.text-copy-wrap { margin-top: 1rem; display: none; }
.text-copy-btn {
  font-size: 14px;
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
}
.text-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.text-copy-btn.copied { color: green; border-color: green; }
/* ===== Internal Links ===== */
.related-links { margin-top: 2rem; }
.related-links-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.related-links a {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  margin-right: 16px;
  margin-bottom: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}
.related-links a:hover { background: var(--bg-sub); border-color: var(--accent); }
/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); background: #f9f9f9; padding: 2.5rem 0; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--container-pad); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; }
.footer-logo { display: block; margin-bottom: 1rem; }
.footer-logo img { height: 28px; width: auto; }
.footer-col-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-sub); text-decoration: none; margin-bottom: 5px; }
.footer-col a:hover { color: var(--accent); }
.footer-company { font-size: 14px; color: var(--text-sub); line-height: 1.9; }
.footer-bottom { max-width: var(--container); margin: 1.5rem auto 0; padding: 1rem var(--container-pad) 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-hint); }
/* ===== Ads ===== */
.ad-sidebar { position: fixed; top: 50%; right: 20px; transform: translateY(-50%); width: 160px; z-index: 100; }
.ad-mobile { display: none; margin: 2rem auto; text-align: center; }
/* ===== Responsive ===== */
@media (max-width: 768px) {
  .ad-sidebar { display: none; }
  .ad-mobile { display: block; }
}
@media (max-width: 992px) {
  :root { --body-text: 1.22em; }
  body { font-size: 14px; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .result-main { font-size: 26px; }
  h1.page-title { font-size: 24px; }
  .result-row-inner { width: 100%; }
  .result-heading { font-size: 24px; }
}
/* Note style */
.note {
  display: inline-block;
  font-size: 0.85em;
  color: #888;
  margin-top: 2px;
}
/* =============================================
   v12追記（2026-03-25）財務計算系UIパターン
   ============================================= */
/* セクション見出し */
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: #0092d7;
  border-left: 3px solid #0092d7;
  padding-left: 10px;
  margin-bottom: 14px;
}
.field-wrap + .field-wrap {
  margin-top: 1.2rem;
}
/* 入力行 */
.field-label {
  display: block;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 6px;
}
.input-with-unit input {
  height: 42px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: var(--body-text);
  font-family: inherit;
  padding: 0 10px;
  background: var(--bg);
  color: var(--text);
  /* width は各ページHTML内styleで指定 */
}
.input-with-unit input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,146,215,.15);
  outline: none;
}
.input-unit {
  font-size: 16px;
  color: var(--text-sub);
}
/* セクション区切り・連動チェックボックス */
.section-gap {
  padding: 1.4rem 0 2.1rem 1rem;
  display: flex;
  align-items: center;
}
.link-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}
.link-check-row input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.link-check-row input[type=checkbox]:checked {
  background: #e07800;
  border-color: #e07800;
}
.link-check-row input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
/* ラジオボタン — キーカラー */
.radio-row input[type=radio],
.check-row input[type=radio] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.radio-row input[type=radio]:checked,
.check-row input[type=radio]:checked {
  border-color: #0092d7;
}
.radio-row input[type=radio]:checked::after,
.check-row input[type=radio]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0092d7;
}
/* チェックボックス（日付系の曜日等）— キーカラー */
.check-row input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.check-row input[type=checkbox]:checked {
  background: #0092d7;
  border-color: #0092d7;
}
.check-row input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ===== 補足説明トグル（v20追加） ===== */
.suppl-section {
  margin-top: .8rem;
}
.suppl-section summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: var(--body-text);
  font-weight: 700;
  color: var(--accent);
  user-select: none;
  list-style: none;
}
.suppl-section summary::-webkit-details-marker {
  display: none;
}
.suppl-section summary::before {
  content: '▶';
  font-size: 11px;
  color: var(--text-hint);
  transition: transform .2s;
  flex-shrink: 0;
}
.suppl-section[open] summary::before {
  transform: rotate(90deg);
}
.suppl-body {
  padding: 0 0 8px 19px;
  font-size: var(--body-text);
  line-height: 27.6px;
  color: var(--text-sub);
}
.suppl-body ul {
  margin: 8px 0 8px 1.2em;
  padding: 0;
  list-style: disc;
}
.suppl-body li {
  margin-bottom: 2px;
}
.source-note {
  font-size: .8em;
  color: var(--text-hint);
  margin-top: 4px;
}
.source-note a {
  color: var(--accent);
  text-decoration: none;
}

/* ===== 出力セクション内ヘッダー（v22追加） ===== */
.result-heading {
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 12px 0;
  color: var(--text);
}

/* ===== ラジオグループラベル（v21追加） ===== */
.radio-group-label {
  font-size: 16px;
  color: var(--text-hint);
}
/* 結果行の直後のラジオグループラベルに上余白（v26追加） */
.result-row + .radio-group-label {
  margin-top: 1rem;
}
