/* コードを読む・調べる。style.css と flow.css の上に重ねる */
.fhead p a, .srcl a, .rd-go a, .rd-cnext a, .rd-tnote 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); }
.rd-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.rd-sub { margin: 22px 0 6px; font-size: 16px; }
.rd-subp { margin: 0 0 12px; font-size: 13.5px; color: var(--ink2); }
.rd-go { margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.rd-go a { text-decoration: none; }
.rd-go a:hover { text-decoration: underline; }
.rd-cmds code, .rd-steps code, .rd-tfind code, .rd-asks code, .rd-cnext code, .rd-ex { font-family: var(--latin); font-size: 12.5px; }

/* 読む時間 */
.rd-why { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); gap: 14px; align-items: start; }
.rd-stat { border-color: #99f6e4; background: #f0fdfa; }
.rd-big { margin: 0 0 8px; display: flex; flex-direction: column; gap: 2px; }
.rd-big b { font: 600 52px/1 var(--latin); color: #0f766e; letter-spacing: -0.02em; }
.rd-big span { font-size: 14px; font-weight: 700; color: var(--ink); }
.rd-stat > p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.rd-scenes h3 { margin: 0 0 8px; font-size: 14.5px; }
.rd-scgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rd-scene { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.rd-scene h4 { margin: 0 0 4px; font-size: 14px; }
.rd-scene p { margin: 0; font-size: 13px; color: var(--ink2); }
.rd-scene .rd-go { margin-top: auto; padding-top: 8px; }
.rd-firstl { margin-top: 8px !important; font-size: 12.5px !important; }
.rd-firstl b { display: inline-block; font-size: 11px; color: #0f766e; background: #ccfbf1; border-radius: 6px; padding: 0 6px; margin-right: 6px; }

/* 最初に見る所 */
.rd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.rd-steps li { display: flex; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.rd-steps li > div { min-width: 0; }
.rd-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #0d9488; color: #fff; font: 600 12px/24px var(--latin); text-align: center; }
.rd-steps code { display: inline-block; font-weight: 600; color: var(--ink); background: var(--line2); border-radius: 6px; padding: 1px 7px; overflow-wrap: anywhere; }
.rd-steps p { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }
.rd-steps .srcl { margin-top: 6px; }

/* フォルダの地図 */
.rd-tree { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.rd-treel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px 10px; }
.rd-root { margin: 0 0 4px 8px; font: 600 13px var(--latin); color: var(--muted); }
.rd-dirs { list-style: none; margin: 0; padding: 0; }
.rd-dirs button { appearance: none; width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; text-align: left; color: var(--ink); padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.rd-dirs button:hover { background: var(--line2); }
.rd-dirs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* 枝の線（app/ の下の 4 つ） */
.rd-dirs li { position: relative; }
.rd-dirs li.d1 { padding-left: 26px; }
.rd-dirs li.d1::before { content: ''; position: absolute; left: 15px; top: 0; bottom: 0; border-left: 1.5px solid #cbd5e1; }
.rd-dirs li.d1.last::before { bottom: 50%; }
.rd-dirs li.d1::after { content: ''; position: absolute; left: 15px; top: 50%; width: 9px; border-top: 1.5px solid #cbd5e1; }
.rd-fname { font: 600 13.5px var(--latin); }
.rd-dirs button .rd-freq { margin-left: auto; }
.rd-freq { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.f-daily { color: #0f766e; background: #ccfbf1; }
.f-often { color: #1d4ed8; background: #dbeafe; }
.f-trouble { color: #b45309; background: #fef3c7; }
.f-readonly { color: #475569; background: #e2e8f0; }
.f-rare { color: #64748b; background: #f1f5f9; }
.rd-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 8px 0; }
.rd-legend .hint { margin-left: 2px; }
.rd-dir { position: sticky; top: 12px; }
.rd-dir h3 { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.rd-dir h3 code { font-family: var(--latin); }
.rd-dir h4 { margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.rd-dir p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.rd-dir .rd-dwhat { font-size: 14px; color: var(--ink); }
.rd-ex { display: inline-block; background: var(--line2); border-radius: 6px; padding: 2px 7px; overflow-wrap: anywhere; }
.rd-hold { padding: 4px 0 8px; }
.rd-hold .rd-dir { position: static; }

/* ボタンから追う */
.rd-life { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; counter-reset: lf; }
.rd-life li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rd-life li:not(:last-child)::after { content: '→'; position: absolute; right: -18px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-weight: 700; }
.rd-life b { font: 600 13px var(--latin); overflow-wrap: anywhere; }
.rd-life span { font-size: 12px; color: var(--ink2); }
.rd-life li.own { border-color: #5eead4; background: #f0fdfa; }
.rd-hows { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.rd-how { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px 2px 7px; }
.rd-how::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.h-search { color: #1d4ed8; background: #dbeafe; }
.h-artisan { color: #b45309; background: #fef3c7; }
.h-jump { color: #0f766e; background: #ccfbf1; }
.h-name { color: #be123c; background: #ffe4e6; }
.rd-stepper { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rd-stepper button { appearance: none; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; }
.rd-stepper button:hover { border-color: #94a3b8; }
.rd-sn { width: 22px; height: 22px; border-radius: 50%; font: 600 11.5px/22px var(--latin); text-align: center; color: #fff; }
.rd-stepper .h-search .rd-sn { background: #1d4ed8; }
.rd-stepper .h-artisan .rd-sn { background: #b45309; }
.rd-stepper .h-jump .rd-sn { background: #0f766e; }
.rd-stepper .h-name .rd-sn { background: #be123c; }
.rd-stepper button.h-search, .rd-stepper button.h-artisan, .rd-stepper button.h-jump, .rd-stepper button.h-name { background: var(--paper); color: var(--ink); }
.rd-stepper button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
/* 広い画面: 左に説明と前後のボタン、右にコード。狭い画面: 説明 → コード → ボタン */
.rd-trace { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-areas: 'tl code' 'nav code'; grid-template-rows: auto 1fr; gap: 16px 22px; padding: 18px 20px; align-items: start; }
.rd-tl { grid-area: tl; min-width: 0; }
.rd-tstep { margin: 0; font: 600 12px var(--latin); color: var(--muted); }
.rd-tl h3 { margin: 2px 0 10px; font-size: 19px; }
.rd-tl h4 { margin: 14px 0 4px; font-size: 12.5px; color: var(--muted); }
.rd-tl p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.rd-tfind { background: var(--line2); border-radius: 12px; padding: 10px 12px; }
.rd-tlab { display: flex; align-items: center; gap: 8px; font-size: 12px !important; font-weight: 700; color: var(--muted) !important; margin-bottom: 6px !important; }
.rd-tfind code { display: block; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; margin-bottom: 6px; overflow-wrap: anywhere; }
.rd-tnav { grid-area: nav; display: flex; gap: 8px; flex-wrap: wrap; }
.rd-tnav button { appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.rd-tnav button:hover:not([disabled]) { border-color: #94a3b8; }
.rd-tnav button[disabled] { color: #94a3b8; cursor: default; }
.rd-tcode { grid-area: code; margin: 0; min-width: 0; }

/* コード（暗い箱） */
.rd-file { background: #0f172a; border-radius: 12px; overflow: hidden; min-width: 0; }
.rd-path { margin: 0; display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #1e293b; color: #cbd5e1; font: 500 12px var(--latin); overflow-wrap: anywhere; }
.rd-pre { margin: 0; padding: 10px 0; overflow: auto; max-height: 460px; font-family: var(--latin); font-size: 12.5px; line-height: 1.65; color: #e2e8f0; tab-size: 4; }
.rd-pre code { display: block; min-width: max-content; }
.ln { display: flex; padding-right: 14px; border-left: 3px solid transparent; }
.ln .no { flex: none; width: 3.2em; padding-right: 12px; text-align: right; color: #64748b; user-select: none; }
.ln .tx { white-space: pre; }
.ln.hit { background: rgba(250, 204, 21, .14); border-left-color: #facc15; }
.ln.at { background: rgba(250, 204, 21, .3); }
.ln.gap .no { color: #475569; }
.ln mark { background: #facc15; color: #0f172a; border-radius: 2px; }
.rd-file.term .ln { padding-left: 12px; }
.rd-tnote { margin: 0; padding: 7px 12px 9px; font-size: 12px; color: #94a3b8; border-top: 1px solid #1e293b; }
.rd-tnote a { color: #93c5fd; }
.rd-vtag { flex: none; white-space: nowrap; font: 700 10.5px var(--sans); color: #0f172a; background: #fbbf24; border-radius: 6px; padding: 0 6px; }

/* 飛ぶ */
.rd-keyhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.rd-os { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--line2); }
.rd-os button { appearance: none; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.rd-os button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.rd-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rd-key { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.rd-caps { margin: 0 0 8px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.rd-key kbd { font: 600 12.5px var(--latin); color: var(--ink); background: #f8fafc; border: 1px solid #cbd5e1; border-bottom-width: 3px; border-radius: 7px; padding: 2px 8px; min-width: 26px; text-align: center; }
.rd-plus { font-size: 12px; color: var(--muted); }
.rd-key b { font-size: 14px; }
.rd-key p { margin: 4px 0 0; font-size: 13px; color: var(--ink2); }

/* 探す */
.rd-cmds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rd-cmd { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.rd-cmd code { display: block; font-weight: 600; color: #e2e8f0; background: #0f172a; border-radius: 8px; padding: 6px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-cmd p { margin: 8px 0 0; font-size: 13px; color: var(--ink2); }
.rd-cmd .srcl { margin-top: 6px; }
.rd-cmdsrc { grid-column: 1 / -1; margin: 0; }
.rd-whatq { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.rd-whatq article { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.rd-whatq b { font-size: 13.5px; }
.rd-whatq p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink2); }
.rd-rg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.rd-rgl { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rd-cmdline { display: flex; gap: 8px; align-items: baseline; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 8px 12px; font: 600 13px var(--latin); overflow-x: auto; }
.rd-ps { color: #5eead4; }
.rd-cmdtxt { white-space: pre; }
.rd-rgform { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-q { flex: 1 1 180px; display: flex; }
.rd-q input { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid #cbd5e1; border-radius: 10px; padding: 7px 11px; }
.rd-flag { appearance: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 6px 11px; cursor: pointer; }
.rd-flag code { font: 600 12px var(--latin); }
.rd-flag:hover { border-color: #94a3b8; }
.rd-flag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-presets button { appearance: none; font: 600 12.5px var(--latin); color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.rd-presets button:hover { border-color: #60a5fa; }
.rd-presets button[aria-pressed="true"] { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.rd-note { margin: 0; font-size: 13px; color: var(--ink2); }
.rd-note:empty { display: none; }
.rd-res { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.rd-count { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rd-none { margin: 0; font-size: 13px; color: var(--muted); }
.rd-rfile + .rd-rfile { margin-top: 8px; }
.rd-rpath { margin: 0 0 2px; display: flex; align-items: center; gap: 6px; font: 600 12.5px var(--latin); color: #7c3aed; overflow-wrap: anywhere; }
.rd-rfile ul { list-style: none; margin: 0; padding: 0; }
.rd-rfile button { appearance: none; width: 100%; display: flex; gap: 8px; border: 0; background: transparent; text-align: left; font: 12.5px/1.6 var(--latin); color: var(--ink); padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.rd-rfile button:hover { background: var(--line2); }
.rd-rfile button[aria-current="true"] { background: #fef9c3; }
.rd-rfile .no { flex: none; width: 2.6em; text-align: right; color: #15803d; }
.rd-rfile .tx { min-width: 0; overflow-wrap: anywhere; }
.rd-rfile mark { background: #fde047; border-radius: 2px; }
.rd-viewer { position: sticky; top: 12px; min-width: 0; }
.rd-viewer > .rd-none { background: var(--paper); border: 1px dashed #cbd5e1; border-radius: 12px; padding: 18px; }
.rd-viewer .rd-pre { max-height: 520px; }

/* blame */
.rd-blame { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 14px; align-items: start; margin-top: 4px; }
.rd-bcode { background: #0f172a; border-radius: 12px; overflow: hidden; min-width: 0; }
.rd-blines { padding: 8px 0; overflow-x: auto; font-family: var(--latin); font-size: 12.5px; line-height: 1.65; color: #e2e8f0; }
.bl { display: flex; min-width: max-content; cursor: pointer; border-left: 4px solid transparent; }
.bl:hover { background: rgba(148, 163, 184, .12); }
.bl.c1 { border-left-color: #818cf8; }
.bl.c2 { border-left-color: #34d399; }
.bl.c3 { border-left-color: #fb923c; }
.bl.sel.c1 { background: rgba(129, 140, 248, .2); }
.bl.sel.c2 { background: rgba(52, 211, 153, .18); }
.bl.sel.c3 { background: rgba(251, 146, 60, .22); }
.bl.head:not(:first-child) { border-top: 1px solid #1e293b; }
.bl .bg { flex: none; width: 128px; padding-left: 8px; }
.bl .bg button { appearance: none; border: 0; background: transparent; font: inherit; color: #cbd5e1; display: inline-flex; gap: 8px; padding: 0 4px; border-radius: 4px; cursor: pointer; }
.bl .bg button code { font: 600 12px var(--latin); color: #f8fafc; }
.bl .bd { color: #94a3b8; }
.bl .no { flex: none; width: 2.6em; padding-right: 12px; text-align: right; color: #64748b; user-select: none; }
.bl .tx { white-space: pre; padding-right: 14px; }
.rd-commit { border-left-width: 5px; }
.rd-commit.c1 { border-left-color: #818cf8; }
.rd-commit.c2 { border-left-color: #34d399; }
.rd-commit.c3 { border-left-color: #fb923c; }
.rd-chash { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font: 600 12.5px var(--latin); color: var(--muted); }
.rd-chash code { font: inherit; color: var(--ink); }
.rd-commit h3 { margin: 6px 0 4px; font-size: 16.5px; }
.rd-commit h4 { margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.rd-commit p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.rd-clines { font-size: 12.5px !important; color: var(--muted) !important; }
.rd-cnext { margin-top: 12px !important; font-size: 12.5px !important; }
.rd-cnext code { background: var(--line2); border-radius: 6px; padding: 1px 6px; }
.rd-lesson { margin: 12px 0 0; font-size: 13.5px; color: var(--ink2); background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 14px; }

/* 動かして確かめる */
.rd-run { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rd-runc h3 { margin: 0 0 6px; font-size: 15px; }
.rd-runc p { margin: 0; font-size: 13px; color: var(--ink2); }
.rd-warn { margin-top: 8px !important; font-size: 12.5px !important; background: #fef2f2; border-radius: 8px; padding: 6px 9px; }
.rd-warn b { color: #b91c1c; margin-right: 6px; }

/* AI */
.rd-ai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.rd-asks { border-color: #dccdfb; background: #faf8ff; }
.rd-asks h3, .rd-verify h3 { margin: 0 0 8px; font-size: 14.5px; }
.rd-asks h4 { margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.rd-asks ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.rd-asks li { font-size: 13px; }
.rd-asks li code { display: block; font-weight: 600; color: #5b21b6; overflow-wrap: anywhere; }
.rd-asks li span { color: var(--ink2); }
.rd-asks ul { margin: 0; padding-left: 1.2em; display: grid; gap: 3px; font-size: 13px; color: var(--ink2); }
.rd-vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rd-v { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.rd-v b { font-size: 14px; }
.rd-v p { margin: 5px 0 0; font-size: 13px; color: var(--ink2); }
.rd-quiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.rd-claims { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: cl; }
.rd-claims li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; counter-increment: cl; }
.rd-claims li.ok { border-color: #86efac; background: #f0fdf4; }
.rd-claims li.ng { border-color: #fca5a5; background: #fef2f2; }
.rd-claim { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.rd-claim::before { content: counter(cl) '. '; font-family: var(--latin); color: var(--muted); }
.rd-ans { display: flex; gap: 6px; flex-wrap: wrap; }
.rd-ans button { appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid #cbd5e1; border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.rd-ans button:hover { border-color: #64748b; }
.rd-ans button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rd-qwhy { margin: 8px 0 0; font-size: 13px; color: var(--ink2); }
.rd-qwhy b { display: block; color: var(--ink); }
.rd-qcode { position: sticky; top: 12px; min-width: 0; }
.rd-score { margin: 10px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rd-score:empty { display: none; }
.rd-score b { font-family: var(--latin); font-size: 18px; color: #0f766e; }

/* チェックリスト */
.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; }

.rd-dirs button:focus-visible, .rd-stepper button:focus-visible, .rd-tnav button:focus-visible, .rd-os button:focus-visible, .rd-q input:focus-visible, .rd-flag:focus-visible, .rd-presets button:focus-visible, .rd-rfile button:focus-visible, .bl .bg button:focus-visible, .rd-ans button:focus-visible, .rd-pre:focus-visible, .rd-go a:focus-visible, .srcl a:focus-visible, .mlist input:focus-visible, .ckreset:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .rd-why, .rd-trace, .rd-rg, .rd-blame, .rd-ai, .rd-quiz { grid-template-columns: minmax(0, 1fr); }
  .rd-trace { grid-template-areas: 'tl' 'code' 'nav'; grid-template-rows: auto; }
  .rd-tree { grid-template-columns: minmax(0, 1fr); }
  .rd-tree > .rd-dir { display: none; }
  .rd-life { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rd-life li:nth-child(3)::after { content: none; }
  .rd-keys, .rd-cmds, .rd-run { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-viewer, .rd-qcode { position: static; }
}
@media (max-width: 760px) {
  .rd-scgrid, .rd-keys, .rd-cmds, .rd-run, .rd-vgrid, .mlist { grid-template-columns: minmax(0, 1fr); }
  .rd-life { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rd-life li::after { content: '↓' !important; right: auto !important; left: 20px; top: auto !important; bottom: -17px; transform: none !important; }
  .rd-life li:last-child::after { content: none !important; }
  .rd-trace { padding: 14px; }
  .rd-big b { font-size: 44px; }
  .bl .bg { width: 74px; }
  .bl .bd { display: none; }
  .rd-pre { max-height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
