/* システムの棚卸しと近代化の順番。style.css・flow.css・cm.css の上に重ねる（接頭辞 po-） */
.po-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.po-nl { display: block; margin: 6px 0 0; }
.po-tips { margin-top: 12px; }
.po-mt { margin-top: 10px; }
.po-tnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.po-box { padding: 12px 14px; min-width: 0; }
.po-small { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.po-tbl { font-size: 12.5px; }
.po-tbl th, .po-tbl td { padding: 6px 8px; }
.po-tbl small { display: block; font-size: 11px; color: var(--muted); }
.po-num { font: 600 12.5px var(--latin); text-align: right; }

/* 操作の枠 */
.po-ctl { padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.po-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.po-clab { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 5.5em; }
.po-scene { margin: 0; font-size: 13px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; }

/* 4 つの決め方 */
.po-dcard > b { font-size: 15px; }
.cm-card .po-dr { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.po-d-keep > b { color: #14532d; }
.po-d-fix > b { color: #1e3a8a; }
.po-d-replace > b { color: #6b21a8; }
.po-d-retire > b { color: #7f1d1d; }

/* 練習: 14 のシステム */
.po-inv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.po-iitem { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.po-ihead { display: flex; align-items: center; gap: 10px; }
.po-ino, .po-ino2 { flex: none; display: inline-grid; place-items: center; border-radius: 999px; font: 600 12.5px var(--latin); color: #fff; background: #334155; }
.po-ino { width: 28px; height: 28px; }
.po-ino2 { width: 22px; height: 22px; font-size: 11px; margin-right: 6px; }
.po-g-kintai .po-ino { background: #15803d; }
.po-g-internal .po-ino { background: #1d4ed8; }
.po-g-jutaku .po-ino { background: #b45309; }
.po-ititle b { display: block; font-size: 14px; }
.po-ititle small { display: block; font-size: 11.5px; color: var(--muted); }
.po-dl { margin: 0; display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 3px 10px; font-size: 12.5px; }
.po-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.po-dl dd { margin: 0; color: var(--ink2); }
.po-dpills { display: flex; flex-wrap: wrap; gap: 5px; }
.po-fb-wait { margin: 0; font-size: 12px; color: var(--muted); }
.po-fb { border-radius: 10px; padding: 8px 11px; font-size: 12.5px; border: 1px solid var(--line); }
.po-fb p { margin: 4px 0 0; color: var(--ink2); }
.po-fb .po-fb-h { margin: 0; font-weight: 700; color: var(--ink); }
.po-vmark { display: inline-block; min-width: 1.3em; font-size: 14px; }
.po-fb-model b { display: block; color: var(--ink); }
.po-v-best { background: #f0fdf4; border-color: #bbf7d0; } .po-v-best .po-vmark { color: #15803d; }
.po-v-ok { background: #f0fdf4; border-color: #d9f99d; } .po-v-ok .po-vmark { color: #4d7c0f; }
.po-v-mid { background: #fffbeb; border-color: #fde68a; } .po-v-mid .po-vmark { color: #b45309; }
.po-v-ng { background: #fef2f2; border-color: #fecaca; } .po-v-ng .po-vmark { color: #b91c1c; }

/* 重み */
.po-weights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.po-wgroup .po-h4 { margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.po-wrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.po-wname { color: var(--ink2); font-weight: 700; }
.po-wbox { display: inline-flex; align-items: center; gap: 4px; }
.po-wbox b { min-width: 1.4em; text-align: center; font: 700 15px var(--latin); color: var(--ink); }
.po-wb { appearance: none; font: inherit; width: 28px; height: 28px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; cursor: pointer; color: var(--ink); font-weight: 700; }
.po-wb:hover:not([disabled]) { border-color: #94a3b8; }
.po-wb[disabled] { opacity: .35; cursor: default; }
.po-ow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }

/* 点の地図 */
.po-score { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.po-fig svg { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; }
.po-q { stroke: none; }
.po-q-fix { fill: #fff7ed; }
.po-q-grow { fill: #f0fdf4; }
.po-q-ret { fill: #fef2f2; }
.po-q-keep { fill: #f8fafc; }
.po-axis { stroke: #94a3b8; stroke-width: 1.2; }
.po-th { stroke: #64748b; stroke-width: 1; stroke-dasharray: 4 4; }
.po-ql { font: 700 11.5px var(--sans); fill: #475569; }
.po-al { font: 700 11.5px var(--sans); fill: #334155; }
.po-tick { font: 500 10.5px var(--latin); fill: #64748b; }
.po-dot circle { stroke: #fff; stroke-width: 2; }
.po-dot text { font: 600 10.5px var(--latin); fill: #fff; }
.po-dot.po-c-k circle { fill: #15803d; }
.po-dot.po-c-i circle { fill: #1d4ed8; }
.po-dot.po-c-j circle { fill: #b45309; }
.po-dot.po-off circle { stroke: #dc2626; stroke-width: 3; }
.po-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 12px; color: var(--ink2); }
.po-lg { display: inline-flex; align-items: center; gap: 5px; }
.po-lg i { display: inline-block; width: 12px; height: 12px; border-radius: 999px; }
.po-lg i.po-c-k { background: #15803d; }
.po-lg i.po-c-i { background: #1d4ed8; }
.po-lg i.po-c-j { background: #b45309; }
.po-lg i.po-lg-off { background: #fff; border: 3px solid #dc2626; box-sizing: border-box; }
.po-stbl { min-width: 640px; }
.po-stbl tbody th { font-weight: 700; color: var(--ink); }
.po-stbl tr.po-off-row th, .po-stbl tr.po-off-row td { background: #fff7ed; }
.po-verdict { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-radius: 10px; padding: 9px 12px; border: 1px solid var(--line); }
.po-verdict b { font-size: 15px; }
.po-verdict span { font-size: 12.5px; color: var(--ink2); }
.po-verdict.po-ok { background: #f0fdf4; border-color: #bbf7d0; } .po-verdict.po-ok b { color: #14532d; }
.po-verdict.po-warn { background: #fffbeb; border-color: #fde68a; } .po-verdict.po-warn b { color: #92400e; }
.po-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.po-msgs li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; font-size: 12.5px; color: var(--ink2); }
.po-msgs em { font-style: normal; font-weight: 700; color: var(--ink); margin-right: 6px; }
.po-m-warn b { color: #b45309; }
.po-m-info b { color: var(--muted); }
.po-rtbl { min-width: 760px; }
.po-rtbl tbody th { font-weight: 700; color: var(--ink2); white-space: nowrap; }
.po-rtbl tr.po-rg th { background: var(--line2); font-size: 12px; color: var(--muted); }
.po-rules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.po-rules li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; color: var(--ink2); padding: 4px 0; border-bottom: 1px solid var(--line2); }
.po-rules li b { color: var(--ink); }
.po-rules li.po-rnote { display: block; border-bottom: none; color: var(--muted); font-size: 12px; }

/* 順番 */
.po-order { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.po-olist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.po-oitem { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.po-orank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 13px var(--latin); }
.po-obody p { margin: 0; }
.po-oname { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.po-oid { font: 600 11.5px var(--latin); color: var(--muted); margin-right: 6px; }
.po-obody .po-obdgs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.po-bdg { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--line2); color: var(--ink2); }
.po-b-doing { background: #dbeafe; color: #1e3a8a; }
.po-b-dl { background: #fef3c7; color: #92400e; }
.po-b-near { background: #fee2e2; color: #991b1b; }
.po-b-wait { background: #ede9fe; color: #5b21b6; }
.po-obody .po-ometa { font-size: 12px; color: var(--ink2); margin-top: 2px; }
.po-ometa b { font: 700 13px var(--latin); color: var(--ink); }
.po-ores { position: sticky; top: 12px; }

/* 残す形 */
.po-tpl { padding: 12px 14px; min-width: 0; }
.po-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.po-tplh .po-h4 { margin: 0; }
.po-pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 10px 12px; font: 500 12px/1.6 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 460px; overflow-y: auto; }
.po-ltbl { min-width: 2100px; }
.po-ltbl td:nth-child(8) { min-width: 20em; }
.po-ltbl2 { min-width: 1000px; }
.po-tbl th { white-space: nowrap; }

.po-dp:focus-visible, .po-wb:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .po-score, .po-order { grid-template-columns: minmax(0, 1fr); }
  .po-ores { position: static; }
}
@media (max-width: 760px) {
  .po-inv, .po-weights, .po-ow { grid-template-columns: minmax(0, 1fr); }
  .po-clab { min-width: 0; width: 100%; }
  .po-dl { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .po-dl dd { margin-bottom: 4px; }
  .po-rules li { grid-template-columns: minmax(0, 1fr); }
  .po-tbl th, .po-tbl td { padding: 5px 6px; }
  /* 点の表は、名前の列だけ折り返し、ほかは 1 行のまま横に動かして読む */
  .po-stbl { min-width: 520px; }
  .po-stbl tbody th { white-space: normal; min-width: 10em; }
  .po-stbl td { white-space: nowrap; }
}
