@charset "utf-8";
/* 経営ツール共通。editorial.css の紙面を継承し、既存の計算用クラスを保つ。 */
.tools-page {
  --display: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  --tool-danger: #9B3A3A;
}
.tools-page main { background: var(--paper); }
.tools-page .container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.tools-page .tools-intro { padding: 96px 0 64px; background: var(--paper); }
.tools-page .tools-intro .section-index { margin-bottom: 32px; }
.tools-page .tools-intro .eyebrow::before { display: none; }
.tools-page .tools-intro h1 { margin: 0 0 28px; max-width: 18em; font-size: clamp(40px, 4.8vw, 68px); line-height: 1.5; letter-spacing: -0.035em; }
.tools-page .tools-intro p:not(.section-index) { max-width: 42em; color: var(--muted); }
.tools-page .tools-intro .hero-lead { margin: 0; font-size: var(--top-body); }
.tools-page .tools-intro .hero-meta { margin: 24px 0 16px; font-size: var(--top-note); }
.tools-page .tools-intro .hero-meta strong { font-weight: 400; }
.tools-page .tools-intro .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--top-note); }

/* 番号付きの一覧。タイトル・説明・関連章を同じ列にそろえる。 */
.tools-page .tools-section { padding: 0 0 112px; }
.tools-page .tools-grid { display: block; counter-reset: tool; border-top: 1px solid var(--line-strong); }
.tools-page .tools-grid > li { counter-increment: tool; }
.tools-page .tool-card { display: grid; grid-template-columns: 64px minmax(0, 4fr) minmax(0, 7fr) 24px; column-gap: 32px; row-gap: 12px; padding: 32px 0; border-bottom: 1px solid var(--line-strong); text-decoration: none; }
.tools-page .tool-card::before { content: counter(tool, decimal-leading-zero); grid-column: 1; grid-row: 1 / 4; color: var(--muted); font-size: 32px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.tools-page .tool-card::after { content: "→"; grid-column: 4; grid-row: 1 / 4; align-self: center; color: var(--gold-deep); }
.tools-page .tool-tag { grid-column: 2; grid-row: 1; color: var(--gold-deep); font-size: var(--top-label); letter-spacing: 0.08em; }
.tools-page .tool-card h3 { grid-column: 2; grid-row: 2 / 4; font-size: 24px; }
.tools-page .tool-card p { grid-column: 3; grid-row: 1 / 3; color: var(--muted); }
.tools-page .tool-chapter { grid-column: 3; grid-row: 3; font-size: var(--top-note); color: var(--muted); }
.tools-page .tool-card:hover { background: var(--band); }

/* 入力・単位・計算ボタン。入力欄を罫線で区切り、数値はゴシックのまま大きくする。 */
.tools-page :is(.sim-section, .input-section, .results-section, .result-summary, .tree-section, .sensitivity-section) { padding: 56px 0; }
.tools-page :is(.sim-section, .input-section, .results-section, .result-summary, .tree-section, .sensitivity-section) > .container,
.growth-page .summary-section > .container { position: relative; padding-top: 40px; }
/* 区切り線は左右の余白を除いた本文の幅に引き、ほかのページの格子とそろえる */
.tools-page :is(.sim-section, .input-section, .results-section, .result-summary, .tree-section, .sensitivity-section) > .container::before,
.growth-page .summary-section > .container::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line-strong); }
.tools-page :is(.sim-section, .input-section, .results-section, .tree-section, .sensitivity-section, .ref-table-wrap) h2 { margin-bottom: 32px; }
.tools-page :is(.form-grid, .input-grid) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.tools-page .input-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools-page :is(.form-group, .input-group) { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 24px 0; border-top: 1px solid var(--line); }
.tools-page .form-group.full-width { grid-column: 1 / -1; }
.tools-page :is(.form-group, .input-group) label { font-size: var(--top-note); color: var(--ink); }
.tools-page .unit { font-size: var(--top-label); color: var(--muted); }
.tools-page :is(.form-group, .input-group) input { width: 100%; min-width: 0; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: clamp(28px, 3vw, 40px); font-weight: 400; line-height: 1.5; font-variant-numeric: tabular-nums; }
.tools-page :is(.form-group, .input-group) input::placeholder { color: var(--muted); opacity: 1; }
.tools-page :is(.form-group, .input-group) input:focus { border-bottom-color: var(--ink); }
.tools-page :is(.btn-calc, .gate-submit, .gate-cta) { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 16px 24px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: var(--top-note); font-weight: 700; line-height: 1.7; text-align: center; text-decoration: none; cursor: pointer; }
.tools-page .btn-calc { margin-top: 32px; min-width: 240px; }
.tools-page :is(.btn-calc, .gate-submit):hover { background: var(--dark); }
.tools-page :is(input, button, a):focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }

/* 会員ゲート。紙色の面と罫線を使い、低い画面では内容をスクロールできる。 */
.tools-page .gate-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; padding: 40px 24px; overflow-y: auto; background: var(--paper); }
.tools-page .gate-overlay.unlocked { display: none; }
.tools-page .gate-panel { width: 100%; max-width: 600px; margin: auto; padding: 32px 0; border-block: 1px solid var(--line-strong); text-align: left; }
.tools-page .gate-icon { margin-bottom: 20px; color: var(--gold-deep); }
.tools-page .gate-icon svg { display: block; }
.tools-page .gate-panel h2 { font-size: clamp(30px, 3.65vw, 44px); margin: 0 0 16px; }
.tools-page .gate-tool-name { font-size: var(--top-note); color: var(--muted); margin-bottom: 24px; }
.tools-page .gate-panel p { font-size: var(--top-note); color: var(--muted); margin-bottom: 24px; }
.tools-page .gate-input-group { display: flex; gap: 12px; width: 100%; margin-bottom: 12px; }
.tools-page .gate-panel input[type="password"] { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--line-strong); border-radius: 0; padding: 12px 16px; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--top-note); }
.tools-page .gate-submit { flex: none; }
.tools-page .gate-error { color: var(--tool-danger); min-height: 1.9em; font-size: var(--top-note); }
.tools-page .gate-divider { border-top: 1px solid var(--line); margin: 24px 0; padding-top: 16px; color: var(--muted); font-size: var(--top-label); }
.tools-page .gate-panel .gate-description { margin-bottom: 16px; }
.tools-page .gate-cta { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.tools-page .gate-cta:hover { background: var(--band); }
.tools-page .gate-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--muted); font-size: var(--top-note); text-underline-offset: 6px; }

/* 結果の数値・注記・表。JS が付ける表示状態を維持する。 */
.tools-page .results-section { display: none; }
.tools-page .results-section.visible { display: block; }
.tools-page .total-check { border-block: 1px solid var(--line); padding: 16px 0; margin-bottom: 32px; font-size: var(--top-note); }
.tools-page .total-check.ok { color: var(--ink); }
.tools-page .total-check.warn { color: var(--tool-danger); border-color: var(--tool-danger); }
.tools-page .result-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.tools-page .result-card { min-width: 0; padding: 0 0 24px; border-bottom: 1px solid var(--line); }
.tools-page .result-label { font-size: var(--top-note); color: var(--muted); margin-bottom: 16px; }
.tools-page .result-value { font-size: clamp(36px, 4.5vw, 64px); line-height: 1.4; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tools-page .result-sub { font-size: var(--top-label); color: var(--muted); margin-top: 12px; }
.tools-page :is(.section-desc, .adjustment-note, .adjustment-formula) { color: var(--muted); font-size: var(--top-note); margin-bottom: 24px; }
.tools-page .ref-table-wrap { margin-top: 56px; overflow-x: auto; }
.tools-page .ref-table { font-size: var(--top-note); min-width: 0; }
.tools-page .ref-table :is(th, td) { text-align: left; padding: 16px 12px; border-bottom: 1px solid var(--line); }
.tools-page .ref-table th { color: var(--ink); border-block: 1px solid var(--line-strong); font-weight: 700; white-space: nowrap; }
.tools-page .ref-table tr:hover td { background: var(--band); }

/* 分配率。塗りは墨・補助色・警告色、金は基準線と小さな凡例に限定する。 */
.tools-page .gauge-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.tools-page .gauge-item { padding: 28px 0; border-top: 1px solid var(--line-strong); }
.tools-page .gauge-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.tools-page .gauge-label { font-weight: 700; }
.tools-page .gauge-value { font-size: clamp(32px, 4vw, 48px); line-height: 1.4; font-variant-numeric: tabular-nums; }
.tools-page .gauge-value.status-danger { color: var(--tool-danger); }
.tools-page .gauge-status { font-size: var(--top-note); margin-bottom: 32px; }
.tools-page .gauge-status.status-ideal { color: var(--gold-deep); }
.tools-page .gauge-status.status-ok { color: var(--muted); }
.tools-page .gauge-status.status-danger { color: var(--tool-danger); }
.tools-page .gauge-bar-container { position: relative; height: 12px; margin-bottom: 20px; background: var(--line); }
.tools-page .gauge-bar { height: 100%; min-width: 2px; background: var(--ink); transition: width 180ms ease; }
.tools-page .gauge-bar.status-ok { background: var(--muted); }
.tools-page .gauge-bar.status-danger { background: var(--tool-danger); }
.tools-page .gauge-markers { position: absolute; inset: 0; pointer-events: none; }
.tools-page .gauge-marker { position: absolute; top: -4px; height: 20px; width: 1px; background: var(--gold-deep); }
.tools-page .gauge-marker::after { content: attr(data-label); position: absolute; top: -24px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px; white-space: nowrap; }
.tools-page .gauge-marker.marker-ideal { width: 2px; background: var(--gold-deep); }
.tools-page .gauge-marker:is(.marker-limit-high, .marker-limit-low) { background: var(--tool-danger); }
.tools-page .gauge-marker:is(.marker-ok-low, .marker-ok-high) { background: var(--muted); }
/* 目盛りの数字は、あるべき形を上・限界を下に分けて重ならないようにする */
.tools-page .gauge-status { margin-bottom: 52px; }
.tools-page .gauge-bar-container { margin-bottom: 40px; }
.tools-page .gauge-marker.marker-ideal::after { top: -44px; }
.tools-page .gauge-marker:is(.marker-limit-high, .marker-limit-low)::after { top: 22px; }

.tools-page .gauge-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: var(--top-label); }
.tools-page .gauge-legend span::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-right: 8px; vertical-align: middle; }
.tools-page .legend-ideal::before { background: var(--gold-deep); }
.tools-page .legend-ok::before { background: var(--muted); }
.tools-page .legend-danger::before { background: var(--tool-danger); }
.tools-page .collapsible { margin-top: 32px; }
.tools-page .collapsible-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 20px 0; border-block: 1px solid var(--line-strong); text-align: left; color: var(--ink); font-size: var(--top-note); }
.tools-page .collapsible-toggle:hover { background: var(--band); }
.tools-page .collapsible-toggle .arrow { font-size: 12px; transition: transform 180ms ease; }
.tools-page .collapsible-toggle.open .arrow { transform: rotate(90deg); }
.tools-page .collapsible-content { display: none; padding: 28px 0; border-bottom: 1px solid var(--line-strong); }
.tools-page .collapsible-content.open { display: block; }
.tools-page .adjustment-fields { margin-bottom: 20px; }
.tools-page #btnAdjust { margin-top: 0; }
.tools-page .adjustment-result { display: none; border-left: 2px solid var(--gold-deep); padding: 16px 20px; margin-top: 24px; }
.tools-page .adjustment-result.visible { display: block; }

/* 売上高の木構造。親と内訳を枝ごとにまとめ、狭い画面では縦に読む。 */
.tools-page .tree-viewport { overflow-x: auto; padding-bottom: 16px; }
.tools-page .tree { min-width: 0; }
.tools-page .tree-level { display: flex; justify-content: center; align-items: stretch; }
.tools-page .tree-branches { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 16px; align-items: start; }
.tools-page .tree-branch { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tools-page .tree-node { flex: 1; min-width: 0; padding: 20px 12px; border-top: 1px solid var(--line-strong); text-align: center; }
.tools-page .tree-branch > .tree-node { width: 100%; }
.tools-page .tree-node.root { flex: none; width: 40%; border-top: 2px solid var(--gold-deep); }
.tools-page .node-label { color: var(--muted); font-size: var(--top-note); margin-bottom: 8px; }
.tools-page .node-value { color: var(--ink); font-size: 28px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tools-page .root .node-value { font-size: 40px; }
.tools-page .node-formula { color: var(--muted); font-size: var(--top-label); margin-top: 12px; }
.tools-page .tree-operator { display: flex; flex: none; justify-content: center; align-items: center; width: 24px; color: var(--muted); font-size: 20px; }
.tools-page .tree-branches > .tree-operator { min-height: 100px; width: 32px; }
.tools-page .tree-leaves { width: 100%; }
.tools-page .tree-connector-split { position: relative; width: 100%; height: 40px; flex: none; }
.tools-page .tree-connector-split::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 50%; background: var(--gold-deep); }
.tools-page .tree-connector-split::after { content: ""; position: absolute; top: 50%; left: 25%; width: 50%; height: 1px; background: var(--gold-deep); }
.tools-page .branch-down { position: absolute; top: 50%; width: 1px; height: 50%; background: var(--gold-deep); }
.tools-page .branch-down.left { left: 25%; }
.tools-page .branch-down.right { right: 25%; }
.tools-page .tree-branch .split-2::after { left: calc(25% - 6px); width: calc(50% + 12px); }
.tools-page .tree-branch .split-2 .left { left: calc(25% - 6px); }
.tools-page .tree-branch .split-2 .right { right: calc(25% - 6px); }
.tools-page .tree > .split-2::after { left: calc(25% - 16px); width: calc(50% + 32px); }
.tools-page .tree > .split-2 .left { left: calc(25% - 16px); }
.tools-page .tree > .split-2 .right { right: calc(25% - 16px); }
.tools-page .split-3::after { left: calc((100% - 48px) / 6); width: calc((100% + 24px) * 2 / 3); }
.tools-page .branch-down.left-3 { left: calc((100% - 48px) / 6); }
.tools-page .branch-down.center { left: 50%; }
.tools-page .branch-down.right-3 { right: calc((100% - 48px) / 6); }
.tools-page .sensitivity-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.tools-page .sensitivity-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px; gap: 24px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.tools-page .sensitivity-label { font-size: var(--top-note); }
.tools-page .sensitivity-bar-wrap { height: 32px; background: var(--line); overflow: hidden; }
.tools-page .sensitivity-bar { display: flex; justify-content: flex-end; align-items: center; height: 100%; background: var(--ink); transition: width 180ms ease; }
.tools-page .bar-value { color: var(--paper); font-size: var(--top-label); padding-right: 12px; white-space: nowrap; }
.tools-page .sensitivity-amount { font-size: var(--top-note); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tools-page .sensitivity-section { padding-bottom: 112px; }

@media (max-width: 900px) {
  .tools-page .tools-intro { padding: 80px 0 48px; }
  .tools-page .tool-card { grid-template-columns: 48px minmax(0, 1fr) 24px; gap: 12px 24px; }
  .tools-page .tool-card::before, .tools-page .tool-card::after { grid-row: 1 / 5; }
  .tools-page .tool-card::after { grid-column: 3; }
  .tools-page .tool-card h3 { grid-row: 2; }
  .tools-page .tool-card p { grid-column: 2; grid-row: 3; }
  .tools-page .tool-chapter { grid-column: 2; grid-row: 4; }
  .tools-page .input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-page .sensitivity-row { grid-template-columns: 100px minmax(0, 1fr) 132px; gap: 16px; }
  /* ツリーは横に並べると右側が切れるので、900px 以下では縦に並べる */
  .tools-page .tree-node.root { width: 100%; }
  .tools-page .tree > .split-2 { width: 1px; height: 32px; background: var(--gold-deep); margin-inline: auto; }
  .tools-page .tree > .split-2::before, .tools-page .tree > .split-2::after, .tools-page .tree > .split-2 .branch-down { display: none; }
  .tools-page .tree-branches { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tools-page .tree-branches > .tree-operator { min-height: 0; width: 100%; }
  .tools-page .tree-branch > .tree-node { border-top-color: var(--ink); }
  .tools-page .tree-leaves { flex-direction: column; align-items: center; border-bottom: 1px solid var(--line); }
  .tools-page .tree-leaves .tree-node { width: 100%; border-top-color: var(--line); }
  .tools-page .tree-leaves .tree-operator { height: 24px; }
  .tools-page .tree-branch .tree-connector-split { width: 1px; height: 24px; background: var(--gold-deep); }
  .tools-page .tree-branch .tree-connector-split::before, .tools-page .tree-branch .tree-connector-split::after, .tools-page .tree-branch .branch-down { display: none; }
}
@media (max-width: 600px) {
  .tools-page .tools-intro { padding: 64px 0 40px; }
  .tools-page .tools-intro h1 { font-size: clamp(32px, 8.2vw, 44px); }
  .tools-page .tools-intro .section-index { gap: 12px; margin-bottom: 24px; }
  .tools-page .tools-intro p br { display: none; }
  .tools-page .tools-section, .tools-page .sensitivity-section { padding-bottom: 64px; }
  .tools-page .tool-card { grid-template-columns: 32px minmax(0, 1fr) 16px; column-gap: 12px; padding: 24px 0; }
  .tools-page .tool-card::before { font-size: 24px; }
  .tools-page .tool-card h3 { font-size: 21px; }
  .tools-page .tool-card p { font-size: var(--top-note); }
  .tools-page :is(.sim-section, .input-section, .results-section, .result-summary, .tree-section) { padding: 32px 0; }
  .tools-page :is(.sim-section, .input-section, .results-section, .result-summary, .tree-section, .sensitivity-section) > .container { padding-top: 28px; }
  .tools-page :is(.form-grid, .input-grid, .result-cards) { grid-template-columns: minmax(0, 1fr); }
  .tools-page .btn-calc { width: 100%; min-width: 0; }
  .tools-page .gate-overlay { padding: 24px; }
  .tools-page .gate-panel { padding: 24px 0; }
  .tools-page .gate-panel p br { display: none; }
  .tools-page .gate-input-group { gap: 8px; }
  .tools-page .gate-submit { padding-inline: 16px; }
  .tools-page .gate-cta { width: 100%; padding-inline: 12px; }
  .tools-page .gauge-header { flex-wrap: wrap; }
  .tools-page .gauge-legend { gap: 8px 16px; }
  .tools-page .sensitivity-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .tools-page .sensitivity-bar-wrap { grid-column: 1 / -1; grid-row: 2; }
  .tools-page .ref-table { min-width: 0; font-size: 13px; }
  .tools-page .ref-table :is(th, td) { padding: 12px 6px; }
  .tools-page .ref-table th { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .tools-page *, .tools-page *::before, .tools-page *::after { animation: none !important; transition: none !important; }
}

/* 人時生産性・成長シミュレーター。追加ルールはこの2ページだけに適用する。 */
:is(.productivity-page, .growth-page) .input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.productivity-page, .growth-page) .cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
:is(.productivity-page, .growth-page) .result-card { min-width: 0; padding: 24px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); text-align: left; }
:is(.productivity-page, .growth-page) .card-label { color: var(--muted); font-size: var(--top-note); margin-bottom: 16px; }
:is(.productivity-page, .growth-page) .card-value { color: var(--ink); font-size: clamp(32px, 3.5vw, 48px); line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
:is(.productivity-page, .growth-page) :is(.card-unit, .card-note, .card-target) { color: var(--muted); font-size: var(--top-label); margin-top: 12px; }
:is(.productivity-page, .growth-page) :is(.card-note, .card-target) { border-top: 1px solid var(--line); padding-top: 16px; }

/* 人時生産性の結果は、JSがインラインdisplayを解除すると表示する。 */
.productivity-page .results-section { display: block; }
.productivity-page .auto-calc { min-height: 1.9em; color: var(--muted); font-size: var(--top-note); }
.productivity-page .expand-toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin-top: 24px; padding: 16px 0; border-block: 1px solid var(--line-strong); color: var(--ink); font-size: var(--top-note); text-align: left; cursor: pointer; }
.productivity-page .expand-toggle:hover { background: var(--band); }
.productivity-page .expand-toggle .arrow { display: inline-block; font-size: 12px; transition: transform 180ms ease; }
.productivity-page .expand-toggle.open .arrow { transform: rotate(90deg); }
.productivity-page .expandable { display: none; }
.productivity-page .expandable.open { display: block; }
.productivity-page .expandable .input-grid { padding-top: 16px; }
.productivity-page .result-card.achieved { border-top: 2px solid var(--gold-deep); }
.productivity-page .result-card.below { border-top: 2px solid var(--tool-danger); }
.productivity-page .result-card.below .card-value { color: var(--tool-danger); }
.productivity-page .card-status { margin-top: 12px; font-size: var(--top-label); font-weight: 700; }
.productivity-page .achieved .card-status { color: var(--gold-deep); }
.productivity-page .below .card-status { color: var(--tool-danger); }

/* 分配率と異なるゲージ構造を維持し、基準ラベルは上下に分けて重なりを避ける。 */
.productivity-page .gauge-wrap { width: 100%; margin-top: 28px; }
.productivity-page .gauge-bar { position: relative; height: 8px; background: var(--line); }
.productivity-page .gauge-fill { height: 100%; max-width: 100%; transition: width 180ms ease; }
.productivity-page .gauge-fill.achieved { background: var(--ink); }
.productivity-page .gauge-fill.below { background: var(--tool-danger); }
.productivity-page .gauge-markers { position: relative; inset: auto; height: 56px; margin-top: 8px; }
.productivity-page .gauge-marker { top: 0; width: auto; height: auto; transform: translateX(-50%); background: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.productivity-page .gauge-marker::after { display: none; }
.productivity-page .gauge-marker::before { content: ""; position: absolute; top: -16px; left: 50%; width: 1px; height: 8px; background: var(--line-strong); }
.productivity-page .gauge-marker.target-marker { top: 24px; color: var(--gold-deep); }
.productivity-page .gauge-marker.target-marker::before { top: -40px; width: 2px; background: var(--gold-deep); }

/* 改善スライダー。操作領域を確保し、トラックとつまみを墨色の線で描く。 */
.productivity-page .sim-desc { margin-bottom: 32px; color: var(--muted); font-size: var(--top-note); }
.productivity-page .sim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.productivity-page .sim-card { min-width: 0; border-top: 1px solid var(--line-strong); padding: 24px 0; }
.productivity-page .sim-card h3 { margin-bottom: 24px; font-size: 21px; }
.productivity-page .sim-slider-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; color: var(--muted); font-size: var(--top-note); }
.productivity-page .sim-slider-value { color: var(--ink); font-variant-numeric: tabular-nums; }
.productivity-page input[type="range"] { appearance: none; width: 100%; height: 44px; margin: 8px 0; background: transparent; cursor: pointer; }
.productivity-page input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); }
.productivity-page input[type="range"]::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; margin-top: -10px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); }
.productivity-page input[type="range"]::-moz-range-track { height: 2px; background: var(--line-strong); }
.productivity-page input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); }
.productivity-page .sim-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; border-top: 1px solid var(--line); padding-top: 20px; }
.productivity-page .sim-result-label { margin-bottom: 8px; color: var(--muted); font-size: var(--top-label); }
.productivity-page .sim-result-value { color: var(--ink); font-size: 28px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.productivity-page .sim-result-diff { font-size: var(--top-label); margin-top: 8px; }
.productivity-page .sim-result-diff.positive { color: var(--gold-deep); }
.productivity-page .sim-result-diff.negative { color: var(--tool-danger); }
.productivity-page .theory-note { padding: 32px 0 112px; }
.productivity-page .theory-note-inner { padding-top: 28px; border-top: 1px solid var(--gold-deep); }
.productivity-page .theory-note-inner h3 { max-width: 42em; margin-bottom: 20px; font-size: 21px; }
.productivity-page .theory-note-inner p { max-width: 42em; color: var(--muted); }

/* 成長シミュレーターの選択欄・折りたたみ・業種ごとの表示状態。 */
.tools-page { --text-muted: var(--muted); }
.growth-page .input-group select { width: 100%; min-width: 0; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 24px; line-height: 1.5; cursor: pointer; }
.growth-page .input-group select:focus { border-bottom-color: var(--ink); }
.growth-page .hint { color: var(--muted); font-size: var(--top-label); }
.growth-page .accordion-section { border-top: 1px solid var(--line-strong); }
.growth-page .accordion-section:last-child { border-bottom: 1px solid var(--line-strong); }
.growth-page .accordion-toggle { display: flex; align-items: center; gap: 20px; width: 100%; min-height: 72px; padding: 24px 0; color: var(--ink); font-size: var(--top-body); font-weight: 700; text-align: left; }
.growth-page .accordion-toggle:hover { background: var(--band); }
.growth-page .accordion-toggle.open { border-left: 3px solid var(--ink); padding-left: 20px; }
.growth-page .section-num { flex: none; min-width: 24px; border-top: 2px solid var(--gold-deep); padding-top: 4px; color: var(--gold-deep); font-size: var(--top-label); font-weight: 400; }
.growth-page .accordion-toggle .arrow { flex: none; margin-left: auto; padding-right: 12px; color: var(--muted); font-size: 12px; transition: transform 180ms ease; }
.growth-page .accordion-toggle.open .arrow { transform: rotate(90deg); }
.growth-page .accordion-content { display: none; padding: 24px 0 40px; }
.growth-page .accordion-content.open { display: block; }
.growth-page .sub-section { margin-bottom: 40px; }
.growth-page .sub-section:last-child { margin-bottom: 0; }
.growth-page .sub-title { padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: var(--top-body); font-weight: 700; }
.growth-page .accordion-content .input-grid { margin-bottom: 24px; }
.growth-page :is(.industry-retail, .industry-fs, .industry-other) { display: none; }
.growth-page .show-retail .industry-retail,
.growth-page .show-fs .industry-fs,
.growth-page .show-other .industry-other { display: block; }
.growth-page .cards-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 24px; }
.growth-page .result-card.highlight { border-top: 2px solid var(--gold-deep); }

/* 成長倍率表・複利効果・計画サマリー。JSが生成するマークアップをそのまま装飾する。 */
.growth-page #visionTableWrap { overflow-x: auto; }
.growth-page .vision-table { min-width: 480px; font-size: var(--top-note); font-variant-numeric: tabular-nums; }
.growth-page .vision-table :is(th, td) { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.growth-page .vision-table th { color: var(--ink); border-block: 1px solid var(--line-strong); font-weight: 700; white-space: nowrap; }
.growth-page .vision-table :is(th, td):first-child { text-align: left; }
.growth-page .vision-table .target-reached { background: var(--band); }
.growth-page .vision-table .target-reached td { color: var(--ink); font-weight: 700; }
.growth-page .vision-table .target-reached td:first-child { border-left: 3px solid var(--ink); }
/* 既存JS内の金色指定を、白地で読めるトークンに限定して補正する。 */
.growth-page #visionTableWrap > p { --gold: var(--gold-deep); }
.growth-page .compound-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
.growth-page .compound-card { min-width: 0; border-top: 1px solid var(--line-strong); padding: 24px 0; }
.growth-page .cc-label { margin-bottom: 16px; color: var(--muted); font-size: var(--top-note); }
.growth-page .cc-value { color: var(--ink); font-size: clamp(32px, 3.5vw, 48px); line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.growth-page .cc-note { margin-top: 12px; color: var(--muted); font-size: var(--top-label); }
.growth-page .summary-section { display: none; padding: 56px 0 112px; }
.growth-page .summary-section.visible { display: block; }
.growth-page .summary-section h2 { margin-bottom: 32px; }
.growth-page .summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
/* 既存JS内の固定サイズを補い、数値を可変サイズにする。 */
.growth-page .summary-grid .card-value { font-size: clamp(28px, 2.5vw, 36px) !important; }

@media (max-width: 900px) {
  .productivity-page .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .productivity-page .sim-grid { grid-template-columns: minmax(0, 1fr); }
  .growth-page .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .growth-page .compound-result { gap: 24px; }
}
@media (max-width: 600px) {
  :is(.productivity-page, .growth-page) :is(.input-grid, .cards-grid) { grid-template-columns: minmax(0, 1fr); }
  .productivity-page .theory-note { padding-bottom: 64px; }
  .growth-page .accordion-toggle { gap: 12px; font-size: var(--top-note); }
  .growth-page .accordion-toggle.open { padding-left: 12px; }
  .growth-page .compound-result { grid-template-columns: minmax(0, 1fr); }
  .growth-page .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .growth-page .summary-section { padding: 32px 0 64px; }
  .growth-page .summary-section > .container { padding-top: 28px; }
  .growth-page .vision-table { min-width: 0; }
  .growth-page .vision-table :is(th, td) { padding: 12px 8px; }
}
.tools-page .gate-panel input[type="password"] { font-size: 16px; }
