/* readiness 화면 전용 서식 */
/* 점검 결과 칸이 비어 있을 때의 안내 — 결과가 생기거나 «빠진 칸 채우기» 탭이면 숨긴다 */
.wk-empty { padding: 28px 12px; text-align: center; color: var(--sub); font-size: 13.5px; }
#out:not(:empty) ~ #outHint, #out[hidden] ~ #outHint { display: none; }
/* 마켓 선택 — 선택한 마켓은 테두리·배경이 바뀐다(색만이 아니라 체크 표시도 그대로) */
.rd #chs label.opt { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 7px 10px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); }
.rd #chs label.opt:hover { background: var(--chip); }
.rd #chs label.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.rd #chs label.opt input { flex: none; width: 18px; height: 18px; }
/* 제품 목록 상자 — 작업을 선택 전에는 빈 테두리 대신 안내 한 줄 */
.rd .pick:empty { display: none; }
.rd .pick:not(:empty) ~ #plistHint { display: none; }
#plistHint { padding: 14px 8px; }
.rd .help[hidden] { display: none; }
.rd summary .help { margin-left: 6px; }
.rd .wk-empty { text-wrap: balance; }

/* ── 레일 터넌트(html.rail-pre) — 시안 «내 지원»: 마켓마다 지표 띠 + 가장 많은 이유 알약 + 막힌 이유 행 카드 ── */
html.rail-pre .rd #plist { max-height: 240px; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
html.rail-pre .rd #plist label.opt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 9px 6px; border-bottom: 1px solid var(--line); }
html.rail-pre .rd #plist label.opt:last-child { border-bottom: 0; }
html.rail-pre .rd #plist label.opt input { align-self: center; flex: none; width: 18px; height: 18px; }
html.rail-pre .rd #plist label.opt small { margin-left: auto; color: var(--sub); }
html.rail-pre .rd #chs label.opt { border-width: 1px; border-color: var(--line-strong); border-radius: var(--radius-sm); }
html.rail-pre .rd #chs label.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
html.rail-pre .rd .tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
html.rail-pre .rd .tag::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
html.rail-pre .rd .tag.once { background: var(--ok-bg); color: var(--ok); }
html.rail-pre .rd .tag.bulk { background: var(--info-bg); color: var(--info); }
html.rail-pre .rd .tag.data { background: var(--warn-bg); color: var(--warn); }
html.rail-pre .rd .tag.review { background: var(--danger-bg); color: var(--danger); }
/* 마켓 한 곳의 점검 결과 */
html.rail-pre .rd #out > .panel > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
html.rail-pre .rd .wk-pane .cards { display: flex; gap: 0; margin: 0 0 10px; padding: 12px 4px; border-radius: var(--radius-sm); background: var(--bg); }
html.rail-pre .rd .wk-pane .card { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 2px 12px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; text-align: center; }
html.rail-pre .rd .wk-pane .card:first-child { border-left: 0; }
html.rail-pre .rd .wk-pane .card b { order: 1; font-size: 24px; line-height: 1.2; font-weight: 800; }
html.rail-pre .rd .wk-pane .card small { order: 2; font-size: 12.5px; font-weight: 500; color: var(--sub); }
html.rail-pre .rd .rd-top { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
html.rail-pre .rd .rd-top .wk-st b { font-weight: 800; }
html.rail-pre .rd details.rd-more > summary { display: flex; align-items: center; gap: 8px; min-height: 36px; margin: 0 0 8px; padding: 0 4px; cursor: pointer; font-weight: 800; color: var(--ink); }
html.rail-pre .rd details.rd-more:not([open]) > :not(summary) { display: none; }
/* 막힌 이유 한 줄 = 카드 한 장(이유+알약 / 제품 수 막대 / 풀리는 방법+단추) */
html.rail-pre .rd table.rd-reasons { display: block; width: 100%; border: 0; }
html.rail-pre .rd table.rd-reasons thead { display: none; }
html.rail-pre .rd table.rd-reasons tbody { display: block; }
html.rail-pre .rd table.rd-reasons tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin: 0 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
html.rail-pre .rd table.rd-reasons tbody td { display: block; padding: 0; border: 0; background: none; white-space: normal; max-width: none; }
html.rail-pre .rd table.rd-reasons tbody td:nth-child(1) { grid-column: 1; font-size: 14.5px; }
html.rail-pre .rd table.rd-reasons tbody td:nth-child(3) { grid-column: 2; grid-row: 1; }
html.rail-pre .rd table.rd-reasons tbody td:nth-child(2) { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-weight: 700; }
html.rail-pre .rd table.rd-reasons tbody td:nth-child(2) .bar { flex: 1 1 auto; height: 8px; background: var(--chip); }
html.rail-pre .rd table.rd-reasons tbody td:nth-child(2) .bar i { background: var(--brand); }
html.rail-pre .rd table.rd-reasons tbody td:nth-child(4) { grid-column: 1 / -1; color: var(--sub); }
html.rail-pre .rd table.rd-reasons tbody td[colspan] { grid-column: 1 / -1; }
html.rail-pre .rd #out .panel .s-ok { color: var(--ok); font-weight: 700; }
html.rail-pre .rd .rd-top .wk-st { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
html.rail-pre .rd #plist label.opt small { flex: 1 1 100%; margin: -4px 0 0 26px; }
html.rail-pre .rd .wk-pane .card { box-shadow: none; }
html.rail-pre .rd details.rd-more > summary { list-style: none; }
html.rail-pre .rd details.rd-more > summary::-webkit-details-marker { display: none; }
html.rail-pre .rd details.rd-more > summary::after { content: '⌄'; margin-left: auto; color: var(--faint); font-size: 18px; line-height: 1; transition: transform .12s; }
html.rail-pre .rd details.rd-more[open] > summary::after { transform: rotate(180deg); }

/* ── 확인 필요 보기 — 마켓·방식마다 접는 카드 + 표(근거 없음·출처 엇갈림·조건 판정 불가·열린 질문). 읽기 전용 ── */
.rd .wk-pane .tabs { flex-wrap: wrap; }
.rd .wk-pane .tab { white-space: nowrap; }
.rd #revWrap .toolbar { align-items: center; margin: 0 0 10px; }
.rd .rv-top { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.rd .rv-grp { margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.rd .rv-grp > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font-weight: 700; cursor: pointer; }
.rd .rv-grp > summary > span:first-child { flex: none; white-space: nowrap; }
.rd .rv-grp > summary small { min-width: 0; font-weight: 500; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd .rv-grp > summary .wk-st { margin-left: auto; flex: none; }
.rd .rv-grp[open] > summary { border-bottom: 1px solid var(--line); }
.rd .rv-grp .wk-table { border: 0; border-radius: 0; box-shadow: none; max-height: none; }
.rd .rv-grp .wk-table table { table-layout: fixed; }
.rd .rv-grp th:nth-child(1) { width: 30%; }
.rd .rv-grp th:nth-child(2) { width: 16%; }
.rd .rv-grp th:nth-child(4) { width: 12%; }
.rd .rv-grp td { height: auto; max-width: none; vertical-align: top; overflow-wrap: anywhere; word-break: normal; }
.rd .rv-grp td.rv-note { color: var(--sub); font-size: 12.5px; }
.rd .rv-grp td.rv-src { white-space: nowrap; overflow-wrap: normal; font-size: 12.5px; color: var(--sub); }
@media (max-width: 700px) {
  .rd .rv-grp > summary { flex-wrap: wrap; padding: 8px 14px; }
  .rd .rv-grp > summary small { order: 3; flex: 1 1 100%; white-space: normal; }
  .rd .rv-grp .wk-table table, .rd .rv-grp .wk-table tbody { display: block; }
  .rd .rv-grp .wk-table thead { display: none; }
  .rd .rv-grp .wk-table tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .rd .rv-grp .wk-table td { display: block; padding: 2px 0; border: 0; }
}
