/* ライブラリとバージョン。style.css と flow.css の上に重ねる */
:root {
  --dp-major: #be123c;
  --dp-minor: #b45309;
  --dp-patch: #0f766e;
  --dp-on: #0f766e;
  --dp-sec: #f2b23e;
  --dp-cur: #a5b4fc;
}
.fhead p a, .srcl a, .dp-links a, .dp-more a, .src a { color: #1d4ed8; text-underline-offset: 2px; }
.hint { display: inline-block; vertical-align: middle; font-size: 10.5px; font-weight: 700; line-height: 1.5; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 999px; padding: 0 8px; margin-left: 6px; white-space: nowrap; }
.aitag { font-size: 12px; font-weight: 700; color: #6d28d9; background: #ede9fe; border-radius: 6px; padding: 2px 8px; margin-right: 8px; vertical-align: middle; }
.srcl { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.dp-sub { margin: 26px 0 4px; font-size: 16px; }
.dp-subp { margin: 0 0 10px; font-size: 13.5px; color: var(--ink2); }
.dp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fsec code, .dp-pairs code { font-family: var(--latin); font-size: .92em; }
.dp-note code, .dp-scard p code { background: var(--line2); border-radius: 5px; padding: 0 5px; }

/* Composer と npm の比べ */
.dp-pairs { padding: 4px 0; overflow: hidden; }
.dp-prow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px 18px; padding: 10px 18px; border-top: 1px solid var(--line2); align-items: baseline; font-size: 13.5px; }
.dp-prow:first-child, #dpPairs .dp-prow:first-child { border-top: 0; }
.dp-phead { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.dp-prow [role="rowheader"] { color: var(--ink2); }
.dp-prow [role="cell"] code { color: var(--ink); font-weight: 600; }

/* この場面で打つのは？ */
.dp-scenes { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 14px; align-items: start; }
.dp-slist { display: flex; flex-direction: column; gap: 6px; }
.dp-sbtn { appearance: none; text-align: left; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.45; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dp-sbtn:hover { border-color: #94a3b8; }
.dp-sbtn.warn { border-left: 4px solid #f59e0b; }
.dp-sbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.dp-scard { padding: 16px 18px; }
.dp-scard h4 { margin: 0 0 10px; font-size: 16px; }
.dp-scard > p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink2); }
.dp-cmds { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dp-cmd { display: flex; flex-direction: column; gap: 4px; }
.dp-cmd span { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.dp-cmd code { display: block; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 9px 12px; font-size: 13px; overflow-wrap: anywhere; }
.dp-warn { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; color: #78350f !important; }

/* 版の番号 */
.dp-ver { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 28px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; }
.dp-vnum { font-family: var(--latin); font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -.02em; display: flex; align-items: baseline; }
.dp-vdot { color: #94a3b8; padding: 0 2px; }
.dp-vpart.p0, .dp-vlist .p0 b { color: var(--dp-major); }
.dp-vpart.p1, .dp-vlist .p1 b { color: var(--dp-minor); }
.dp-vpart.p2, .dp-vlist .p2 b { color: var(--dp-patch); }
.dp-vlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dp-vlist li { border-left: 3px solid currentColor; padding: 2px 0 2px 12px; }
.dp-vlist .p0 { color: var(--dp-major); }
.dp-vlist .p1 { color: var(--dp-minor); }
.dp-vlist .p2 { color: var(--dp-patch); }
.dp-vlist b { display: block; font-family: var(--latin); font-size: 15px; }
.dp-vlist b small { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.dp-vlist p { margin: 4px 0 6px; font-size: 13px; color: var(--ink2); }
.dp-vlist code { font-size: 12px; color: var(--ink2); }
.dp-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.dp-note { padding: 14px 16px; }
.dp-note h3 { margin: 0 0 6px; font-size: 15px; }
.dp-note p { margin: 0; font-size: 13px; color: var(--ink2); }
.dp-note p + p { margin-top: 6px; }

/* 範囲の計算機 */
.dp-calc { padding: 16px 18px; }
.dp-ctop { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.dp-tool { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--line2); }
.dp-tool button { appearance: none; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.dp-tool button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.dp-in { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dp-in span, .dp-try > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.dp-in input, .dp-try input { font-family: var(--latin); font-size: 18px; padding: 8px 12px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.dp-in input:focus, .dp-try input:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.dp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.dp-pre { appearance: none; font: inherit; display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; color: var(--ink); }
.dp-pre code { font-size: 12.5px; font-weight: 600; }
.dp-pre span { font-size: 11px; color: var(--muted); }
.dp-pre:hover { border-color: #94a3b8; }
.dp-pre[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dp-mean { margin-top: 14px; padding: 12px 14px; background: var(--bg); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 64px; }
.dp-mean p { margin: 0; }
.dp-say { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dp-say b { font-size: 18px; }
.dp-plain { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.dp-plain code { font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.dp-saylab { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 7em; }
.dp-diff { font-size: 13px; color: #78350f; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 7px 10px; }
.dp-diff b { margin-right: 8px; }
.dp-err { color: #b91c1c; font-weight: 700; font-size: 13.5px; }
.dp-rel { margin-top: 14px; }
.dp-relhd { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.dp-relhd > span { font-weight: 400; color: var(--muted); }
.dp-k { display: inline-block; font-size: 11px; border-radius: 6px; padding: 0 6px; margin: 0 2px; }
.dp-k.ok { color: var(--dp-patch); border: 1px solid #5eead4; background: #f0fdfa; }
.dp-k.pick { color: #fff; background: var(--dp-patch); }
.dp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dp-chips li { position: relative; display: inline-flex; align-items: center; gap: 6px; font-family: var(--latin); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #94a3b8; }
.dp-chips li i { font-style: normal; font-family: var(--sans); font-size: 11px; font-weight: 700; }
.dp-chips li.ok { color: var(--dp-patch); border-color: #5eead4; background: #f0fdfa; }
.dp-chips li.pick { color: #fff; border-color: var(--dp-patch); background: var(--dp-patch); }
.dp-chips li.off { color: #cbd5e1; }
.dp-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; }
.dp-try input { width: 9em; font-size: 15px; padding: 6px 10px; }
.dp-try output { font-size: 13.5px; font-weight: 700; }
.dp-try output.in { color: var(--dp-patch); }
.dp-try output.out { color: #b91c1c; }
.dp-try output.bad { color: var(--muted); font-weight: 400; }
.dp-limit { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.dp-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.dp-rule { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.dp-rule b code { font-size: 14px; }
.dp-rule p { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }

/* lock ファイル */
.dp-flow { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.dp-flow li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.dp-flow li + li::before { content: '→'; position: absolute; left: -19px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #94a3b8; }
.dp-flow li.f2 { border-color: var(--dp-patch); box-shadow: inset 0 0 0 1px var(--dp-patch); }
.dp-fwho { font-size: 12px; font-weight: 700; color: var(--muted); }
.dp-flow code { font-size: 12.5px; overflow-wrap: anywhere; }
.dp-fnote { font-size: 12px; color: var(--ink2); }
.dp-flow li.f2 .dp-fnote { color: var(--dp-patch); font-weight: 700; }
.dp-two { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* 上げ方 */
.dp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dp-steps > li { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.dp-steps > li > div { min-width: 0; flex: 1; }
.dp-sn { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 13px/26px var(--latin); text-align: center; }
.dp-steps b { font-size: 14.5px; }
.dp-steps p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink2); }
.dp-code { margin: 8px 0 0; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 10px 14px; overflow: auto; font-family: var(--latin); font-size: 12.5px; line-height: 1.6; }
.dp-code.sm { display: inline-block; max-width: 100%; padding: 7px 12px; }
.dp-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 700; font-size: 13px; }
.dp-links a { text-decoration: none; }
.dp-links a:hover { text-decoration: underline; }
.dp-helpers { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dp-hlist { display: grid; gap: 10px; }
.dp-help { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.dp-help b { font-size: 14.5px; }
.dp-help p { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }
.dp-ymlhd { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.dp-yml .dp-code { margin: 0; }
.dp-more { margin: 14px 0 0; font-size: 13.5px; color: var(--ink2); }

/* サポート期限 */
.dp-pick { padding: 14px 18px; margin-bottom: 12px; }
.dp-pickhd { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.dp-sels { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.dp-sel { display: flex; flex-direction: column; gap: 3px; }
.dp-sel span { font-size: 12px; font-weight: 700; color: var(--muted); }
.dp-sel select { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 30px 6px 10px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
.dp-res { margin-top: 12px; }
.dp-rcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dp-rcard { border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; padding: 10px 12px; background: #fff; }
.dp-rcard b { display: block; font-size: 15px; }
.dp-rcard p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink2); }
.dp-pill { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; }
.s-on .dp-pill, .dp-rcard.s-on { border-left-color: var(--dp-on); }
.s-on .dp-pill { background: #ccfbf1; color: #115e59; }
.dp-rcard.s-sec { border-left-color: var(--dp-sec); }
.s-sec .dp-pill { background: #fef3c7; color: #92400e; }
.dp-rcard.s-end { border-left-color: #dc2626; }
.s-end .dp-pill { background: #fee2e2; color: #991b1b; }
.dp-rcard.s-cur { border-left-color: #6366f1; }
.s-cur .dp-pill { background: #e0e7ff; color: #3730a3; }
.dp-rcard.s-pre { border-left-color: #94a3b8; }
.s-pre .dp-pill { background: var(--line2); color: var(--ink2); }
.dp-fit { margin: 10px 0 0; font-size: 13px; border-radius: 10px; padding: 8px 12px; }
.dp-fit b { margin-right: 8px; }
.dp-fit.ok { background: #f0fdfa; color: #115e59; border: 1px solid #99f6e4; }
.dp-fit.ng { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.dp-tl { padding: 14px 18px 12px; }
.dp-axis, .dp-trow { display: grid; grid-template-columns: 78px minmax(0, 1fr) 210px; gap: 10px; align-items: center; }
.dp-axis { height: 18px; }
.dp-axis .dp-track { height: 18px; background: none; }
.dp-year { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--latin); font-size: 11px; color: var(--muted); }
.dp-year .ys { display: none; }
.dp-year:first-child { transform: none; }
.dp-year:last-child { transform: translateX(-100%); }
.dp-tg { margin-top: 8px; }
.dp-tgh { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--ink2); }
.dp-trow { padding: 3px 0; border-radius: 8px; }
.dp-trow.mine { background: #eff6ff; box-shadow: 0 0 0 4px #eff6ff; }
.dp-trow.mine .dp-tlab { font-weight: 700; color: #1d4ed8; }
.dp-tlab { font-family: var(--latin); font-size: 12.5px; white-space: nowrap; }
.dp-track { position: relative; height: 14px; border-radius: 4px; background-color: #f1f5f9; background-image: linear-gradient(90deg, #dfe4ec 1px, transparent 1px); background-size: calc(100% / 7) 100%; }
.dp-seg { position: absolute; top: 0; bottom: 0; }
.dp-seg.cur { background: var(--dp-cur); border-radius: 4px 0 0 4px; }
.dp-seg.on { background: var(--dp-on); }
.dp-seg.on:first-child { border-radius: 4px 0 0 4px; }
.dp-seg.on.approx { background: linear-gradient(90deg, var(--dp-on) 70%, var(--dp-sec)); }
.dp-seg.sec { background: repeating-linear-gradient(135deg, var(--dp-sec) 0 4px, #f8d27e 4px 8px); border-radius: 0 4px 4px 0; }
.dp-today { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #0f172a; border-radius: 1px; }
.dp-tst { font-size: 12px; color: var(--ink2); }
.dp-trow.s-on .dp-tst { color: #115e59; }
.dp-trow.s-sec .dp-tst { color: #92400e; }
.dp-trow.s-end .dp-tst { color: #991b1b; }
.dp-trow.s-end .dp-tlab { color: var(--muted); }
.dp-trow.s-cur .dp-tst { color: #3730a3; }
.dp-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink2); }
.dp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dp-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
.dp-legend i.cur { background: var(--dp-cur); }
.dp-legend i.on { background: var(--dp-on); }
.dp-legend i.sec { background: repeating-linear-gradient(135deg, var(--dp-sec) 0 4px, #f8d27e 4px 8px); }
.dp-legend i.today { width: 2px; height: 14px; background: #0f172a; }
.dp-tlnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.dp-eolnotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }

/* AI 時代 */
.dp-ai { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dp-aicard { background: #faf8ff; border: 1px solid #dccdfb; border-radius: 14px; padding: 12px 14px; }
.dp-aicard b { font-size: 14px; }
.dp-aicard p { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }

/* チェックリスト */
.cklist { padding: 10px 16px; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.mlist label { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; padding: 5px 0; }
.mlist input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #0d9488; cursor: pointer; }
.mlist input:checked + span { color: var(--muted); text-decoration: line-through; }
.ckfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ckcount { font-family: var(--latin); font-size: 13px; color: var(--muted); }
.ckreset { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); cursor: pointer; }

.dp-sbtn:focus-visible, .dp-tool button:focus-visible, .dp-pre:focus-visible, .dp-sel select:focus-visible, .dp-code:focus-visible, .dp-links a:focus-visible, .dp-more a:focus-visible, .srcl a:focus-visible, .src a:focus-visible, .mlist input:focus-visible, .ckreset:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .dp-ver { grid-template-columns: minmax(0, 1fr); }
  .dp-notes, .dp-two, .dp-eolnotes, .dp-ai { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-helpers { grid-template-columns: minmax(0, 1fr); }
  .dp-axis, .dp-trow { grid-template-columns: 70px minmax(0, 1fr) 150px; }
}
@media (max-width: 760px) {
  .dp-phead { display: none; }
  .dp-prow { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 14px; }
  .dp-prow [role="rowheader"] { font-weight: 700; color: var(--ink); }
  .dp-prow [role="cell"] { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); align-items: baseline; }
  .dp-prow [role="cell"]::before { font-size: 11.5px; font-weight: 700; color: var(--muted); }
  .dp-prow [role="cell"]:nth-child(2)::before { content: 'Composer'; }
  .dp-prow [role="cell"]:nth-child(3)::before { content: 'npm'; }
  .dp-scenes { grid-template-columns: minmax(0, 1fr); }
  .dp-vnum { font-size: 48px; }
  .dp-vlist { grid-template-columns: minmax(0, 1fr); }
  .dp-notes, .dp-two, .dp-eolnotes, .dp-ai, .dp-rules, .dp-rcards, .mlist { grid-template-columns: minmax(0, 1fr); }
  .dp-flow { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dp-flow li + li::before { content: '↓'; left: 50%; top: -18px; transform: translateX(-50%); }
  .dp-calc, .dp-tl, .dp-pick { padding: 12px 14px; }
  .dp-saylab { min-width: 0; }
  .dp-axis, .dp-trow { grid-template-columns: 74px minmax(0, 1fr); gap: 2px 8px; }
  .dp-year .yl { display: none; }
  .dp-year .ys { display: inline; }
  .dp-tst { grid-column: 2; font-size: 11.5px; }
  .dp-year { font-size: 10px; }
  .dp-tlab { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .dp-sbtn { transition: none; }
}
