/* ============================================================
   E-計算！ Money — 共通CSS（../assets/css/ek.css の v2 層の上に重ねる）
   分野の色（深い緑 #2F6B2A）は ../assets/css/ek.css 末尾の「分野の色」にある。
   部品の形は Math（math/css/math.css）とそろえてある。色は変数だけを使う。
   ============================================================ */

main form [hidden] { display: none !important; }
/* 結果の列の中の表や式が、狭い画面で列を押し広げないように */
.tool-layout > * { min-width: 0; }
.formula .fl { display: block; }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td .sub, table.data th .sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

/* ---- 日付の欄：文字で入れる欄 ＋ カレンダーのボタン（Math の .ag-date と同じ形） ---- */
.mo-date { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
html[data-ui="v2"] .mo-date input[type="text"] {
  flex: 1 1 auto; width: 100%; min-width: 0; height: 44px; padding: 0 12px; font-size: 15px; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
html[data-ui="v2"] .mo-date input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
@media (max-width: 560px) { html[data-ui="v2"] .mo-date input[type="text"] { font-size: 16px; } }   /* iOS で入力時に拡大されないように */
.mo-pick {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.mo-pick:hover { background: var(--accent-soft); color: var(--accent); }
.mo-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mo-pick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.mo-pick[hidden] { display: none; }
.mo-native { position: absolute; right: 0; bottom: 0; width: 44px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
html[data-ui="v2"] .mo-date input.bad, html[data-ui="v2"] .input-unit input.bad { border-color: var(--s2, #B4442C); border-width: 2px; }

/* ---- 入力の案内（入力欄のすぐ下） ---- */
.mo-msg { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--tint-warn-ink, #8A4B00); }
.mo-msg.info { color: var(--muted); }
.mo-msg:empty { display: none; }
.mo-samples { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 4px 0 14px; font-size: 13px; color: var(--ink-2); }
.mo-sample { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }

/* ---- 結果 ---- */
html[data-ui="v2"] .mo-out .res-hero .big b { font-size: clamp(32px, 9vw, 44px); overflow-wrap: normal; }
html[data-ui="v2"] .mo-out .res-mini .v { overflow-wrap: normal; word-break: normal; }
html[data-ui="v2"] .mo-out .res-mini .v small { white-space: nowrap; }
html[data-ui="v2"] .mo-out .res-mini .s { overflow-wrap: anywhere; }
@media (max-width: 400px) { html[data-ui="v2"] .mo-out .res-mini .v { font-size: 15px; } }

/* 大事な日付の一覧 */
.mo-dates { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.mo-dates li { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.7; }
.mo-dates li b { font-variant-numeric: tabular-nums; color: var(--accent); }
@media (max-width: 400px) { .mo-dates li { grid-template-columns: 1fr; gap: 0; } }

/* グラフ（インライン SVG） */
.mo-chart { margin: 22px 0 0; min-width: 0; }
.mo-chart figcaption { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; line-height: 1.6; }
.mo-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.mo-chart .ax { stroke: var(--grid); stroke-width: 1; }
.mo-chart .ax-t { fill: var(--muted); font-size: 11px; }
.mo-chart .ln-book { fill: none; stroke: color-mix(in srgb, var(--ink) 35%, var(--surface)); stroke-width: 2; stroke-dasharray: 5 4; }
.mo-chart .ln-val { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.mo-chart .band { fill: var(--accent-soft); }
.mo-chart .mark { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.mo-chart .mark-t { fill: var(--ink-2); font-size: 11px; }
.mo-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 0 0 8px; font-size: 12px; color: var(--ink-2); }
.mo-legend li { display: flex; align-items: center; gap: 6px; }
.mo-legend i { width: 16px; height: 0; border-top: 2.5px solid var(--accent); display: inline-block; }
.mo-legend i.book { border-top: 2px dashed color-mix(in srgb, var(--ink) 35%, var(--surface)); }
.mo-legend i.band { height: 10px; border: 0; background: var(--accent-soft); }

/* 注記（結果のすぐ下） */
.mo-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin: 12px 0 0; }

/* ---- 分野の色（深い緑 #2F6B2A、白の上で 6.45:1。2026-10-19） ----
   ほかの分野の色は ../assets/css/ek.css 末尾にあるが、ek.css を変えると全ページの版の印が変わるので、Money はここに置く */
html[data-section="money"] { --accent: #2F6B2A; --accent-ink: #FFFFFF; --accent-soft: #EAF3E7; }
@media (prefers-color-scheme: dark) {
  html[data-section="money"]:where(:not([data-theme="light"])) { --accent: #95D38A; --accent-ink: #0F1622; --accent-soft: rgba(149, 211, 138, 0.14); }
}
html[data-section="money"][data-theme="dark"] { --accent: #95D38A; --accent-ink: #0F1622; --accent-soft: rgba(149, 211, 138, 0.14); }
/* 投資検証ラボの一覧：スマホでは1行ずつ縦に並べ、右端のツールへのリンクを横スクロールなしで見せる */
@media (max-width: 640px) {
  html[data-ui="v2"] table.lab-list { white-space: normal; }
  html[data-ui="v2"] table.lab-list thead { display: none; }
  html[data-ui="v2"] table.lab-list, html[data-ui="v2"] table.lab-list tbody, html[data-ui="v2"] table.lab-list tr, html[data-ui="v2"] table.lab-list td { display: block; width: auto; }
  html[data-ui="v2"] table.lab-list tr { padding: 12px 14px; border-bottom: 1px solid var(--grid); }
  html[data-ui="v2"] table.lab-list tr:last-child { border-bottom: 0; }
  html[data-ui="v2"] table.lab-list td { border: 0; padding: 0; text-align: left; }
  html[data-ui="v2"] table.lab-list td:first-child { font-weight: 700; margin-bottom: 4px; }
  html[data-ui="v2"] table.lab-list td:nth-child(2) { font-size: 13px; color: var(--muted); }
  html[data-ui="v2"] table.lab-list td:last-child { margin-top: 8px; }
  html[data-ui="v2"] table.lab-list td:last-child a::before { content: "→ "; }
}
/* 一覧の上の目的から探す・分類の帯は共通 CSS の event-grid・cat-nav（Life と同じ。2026-10-21） */
