/* ============================================================
   E-計算！ Property — 共通CSS（../assets/css/ek.css の v2 層の上に重ねる）
   分野の色（深いワイン色 #8A2E44）はこのファイル末尾（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 と同じ形） ---- */
.pr-date { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
html[data-ui="v2"] .pr-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"] .pr-date input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
@media (max-width: 560px) { html[data-ui="v2"] .pr-date input[type="text"] { font-size: 16px; } }   /* iOS で入力時に拡大されないように */
.pr-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;
}
.pr-pick:hover { background: var(--accent-soft); color: var(--accent); }
.pr-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pr-pick svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.pr-pick[hidden] { display: none; }
.pr-native { position: absolute; right: 0; bottom: 0; width: 44px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
html[data-ui="v2"] .pr-date input.bad, html[data-ui="v2"] .input-unit input.bad { border-color: var(--s2, #B4442C); border-width: 2px; }

/* ---- 入力の案内（入力欄のすぐ下） ---- */
.pr-msg { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--tint-warn-ink, #8A4B00); }
.pr-msg.info { color: var(--muted); }
.pr-msg:empty { display: none; }
.pr-samples { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 4px 0 14px; font-size: 13px; color: var(--ink-2); }
.pr-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"] .pr-out .res-hero .big b { font-size: clamp(32px, 9vw, 44px); overflow-wrap: normal; }
html[data-ui="v2"] .pr-out .res-mini .v { overflow-wrap: normal; word-break: normal; }
html[data-ui="v2"] .pr-out .res-mini .v small { white-space: nowrap; }
html[data-ui="v2"] .pr-out .res-mini .s { overflow-wrap: anywhere; }
@media (max-width: 400px) { html[data-ui="v2"] .pr-out .res-mini .v { font-size: 15px; } }

/* 大事な日付の一覧 */
.pr-dates { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.pr-dates li { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.7; }
.pr-dates li b { font-variant-numeric: tabular-nums; color: var(--accent); }
@media (max-width: 400px) { .pr-dates li { grid-template-columns: 1fr; gap: 0; } }

/* グラフ（インライン SVG） */
.pr-chart { margin: 22px 0 0; min-width: 0; }
.pr-chart figcaption { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; line-height: 1.6; }
.pr-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pr-chart .ax { stroke: var(--grid); stroke-width: 1; }
.pr-chart .ax-t { fill: var(--muted); font-size: 11px; }
.pr-chart .ln-book { fill: none; stroke: color-mix(in srgb, var(--ink) 35%, var(--surface)); stroke-width: 2; stroke-dasharray: 5 4; }
.pr-chart .ln-val { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.pr-chart .band { fill: var(--accent-soft); }
.pr-chart .mark { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.pr-chart .mark-t { fill: var(--ink-2); font-size: 11px; }
.pr-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); }
.pr-legend li { display: flex; align-items: center; gap: 6px; }
.pr-legend i { width: 16px; height: 0; border-top: 2.5px solid var(--accent); display: inline-block; }
.pr-legend i.book { border-top: 2px dashed color-mix(in srgb, var(--ink) 35%, var(--surface)); }
.pr-legend i.band { height: 10px; border: 0; background: var(--accent-soft); }

/* 注記（結果のすぐ下） */
.pr-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin: 12px 0 0; }

/* ---- 分野の色（深いワイン色 #8A2E44、白の上で 8.22:1。ダーク #E59AAB は #0F1622 の上で 8.24:1。2026-10-20） ----
   ほかの分野の色は ../assets/css/ek.css 末尾にあるが、ek.css を変えると全ページの版の印が変わるので、Property はここに置く */
html[data-section="property"] { --accent: #8A2E44; --accent-ink: #FFFFFF; --accent-soft: #F6E9EC; }
@media (prefers-color-scheme: dark) {
  html[data-section="property"]:where(:not([data-theme="light"])) { --accent: #E59AAB; --accent-ink: #0F1622; --accent-soft: rgba(229, 154, 171, 0.14); }
}
html[data-section="property"][data-theme="dark"] { --accent: #E59AAB; --accent-ink: #0F1622; --accent-soft: rgba(229, 154, 171, 0.14); }
/* 一覧の上の目的から探す・分類の帯は共通 CSS の event-grid・cat-nav（Life と同じ。2026-10-21） */

/* 結果の中の小見出し（2026-10-20） */
html[data-ui="v2"] .pr-h3 { font-size: 16px; margin: 22px 0 8px; }
/* 表：数字の列だけ折り返さない。文のセルは折り返す（スマホで説明文が1行の横長にならないように。2026-10-20） */
html[data-section="property"][data-ui="v2"] table.data td:not(.n), html[data-section="property"][data-ui="v2"] table.data th:not(.n) { white-space: normal; min-width: 7em; }

/* 第2弾 共通部品（2026-10-20）：入力の束のフォーム js/bundle-form.js（PRF）と図 js/charts.js（PRC）。仕様 documents/p-form.md */
/* ---- 入力の束のフォーム ---- */
html[data-ui="v2"] .prf-group { margin-top: 6px; }
html[data-ui="v2"] .prf-gh { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--grid); }
html[data-ui="v2"] .prf-group:first-of-type .prf-gh { border-top: 0; padding-top: 4px; }
.prf-check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.prf-check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.prf-hint { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.prf-rows { display: grid; gap: 8px; }
.prf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px; border: 1px solid var(--grid); border-radius: var(--r); background: var(--surface); min-width: 0; }
.prf-col { display: block; flex: 1 1 8.5em; min-width: 0; }
.prf-del { flex: none; }
.prf-cl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.prf-col .input-unit { display: flex; }
.prf-col select { width: 100%; }
.prf-del, .prf-add { border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.prf-del { background: transparent; color: var(--muted); text-decoration: underline; }
.prf-add { margin-top: 8px; background: var(--accent-soft); color: var(--accent); }
.prf-del:focus-visible, .prf-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
html[data-ui="v2"] .field select.bad, html[data-ui="v2"] .prf-row select.bad { border-color: var(--s2); border-width: 2px; }
.prf-summary { margin-top: 12px; }
@media (max-width: 400px) { .prf-col { flex-basis: calc(50% - 4px); } }

/* ---- 図（インライン SVG。色は変数だけ） ---- */
.prc { display: block; width: 100%; height: auto; overflow: visible; font-variant-numeric: tabular-nums; }
.prc text { font-size: 11px; fill: var(--ink-2); }
.prc .prc-t { fill: var(--muted); }
.prc .prc-lg { fill: var(--ink-2); font-size: 11.5px; }
.prc .prc-v { fill: var(--ink); font-weight: 700; font-size: 11.5px; }
.prc .prc-v.tot, .prc .prc-lab.tot { font-weight: 700; }
.prc .prc-lab { fill: var(--ink); font-size: 12.5px; }
.prc .prc-head { fill: var(--ink); font-weight: 600; }
.prc .prc-grid { stroke: var(--grid); stroke-width: 1; }
.prc .prc-zero { stroke: var(--line-strong); stroke-width: 1; }
.prc .prc-sep { stroke: var(--grid); stroke-width: 1; stroke-dasharray: 3 3; }
.prc .prc-bar.pos { fill: var(--s1); }
.prc .prc-bar.neg { fill: var(--s2); }
.prc .prc-bar.res { fill: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.prc .prc-bar.tot { fill: var(--ink); }
.prc .prc-ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.prc .prc-ln.dash { stroke-dasharray: 6 4; }
.prc .prc-ln.prc-cum, .prc line.prc-cum { stroke: var(--ink); stroke-width: 2; }
.prc .prc-ln.s1, .prc .prc-dot.s1 { stroke: var(--s1); }
.prc .prc-ln.s2, .prc .prc-dot.s2 { stroke: var(--s2); }
.prc .prc-ln.s3, .prc .prc-dot.s3 { stroke: var(--s3); }
.prc .prc-ln.s4, .prc .prc-dot.s4 { stroke: var(--s4); }
.prc .prc-dot { fill: var(--surface); stroke-width: 2; }
.prc .prc-dot.prc-cum { stroke: var(--ink); }
.prc .s1-t { fill: var(--s1); } .prc .s2-t { fill: var(--s2); } .prc .s3-t { fill: var(--good-text); } .prc .s4-t { fill: var(--ink); }
.prc .prc-mark { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.prc .prc-mark-t { fill: var(--ink-2); }
.prc .prc-cell { fill: var(--surface); stroke: var(--grid); stroke-width: 1; }
.prc .prc-cell.na { fill: var(--page); }
.prc .prc-cell.mark { stroke: var(--ink); stroke-width: 2; }
.prc .prc-cell-t { fill: var(--ink); }
.prc .prc-cell-t.mark { font-weight: 700; }

/* ---- 印刷：入力欄とナビを隠し、PRF の印刷用の表示（入力した条件・仮に置いた値・免責）を出す ---- */
.prf-print-root { display: none; }
.prf-print h2 { font-size: 18px; margin: 0 0 4px; }
.prf-print h3 { font-size: 14px; margin: 14px 0 6px; }
.prf-print-date, .prf-print-disc { font-size: 12px; color: var(--ink-2); margin: 4px 0; }
.prf-print-tbl { width: 100%; }
.prf-print-tbl th { text-align: left; font-weight: 400; color: var(--ink-2); }
.prf-print ul { margin: 0; padding-left: 1.4em; font-size: 12.5px; line-height: 1.7; }
@media print {
  .prf-print-root { display: block; margin: 0 0 16px; }
  main form:has(.prf), body:has(.prf) nav, body:has(.prf) .pr-samples, .prf-tools, .prf-add, .prf-del { display: none !important; }
  html.prf-printing main > :not(.prf-print-root) { display: none !important; }
  .prf-print { break-inside: auto; }
  .prf-print tr, .prc { break-inside: avoid; }
}
