/* 補單 E：基礎樣式原封沿用 intake-before-v4-20261011。
   新內容沿用既有按鈕、欄位、方案與說明元件。 */
.sop-v4-plans { display: grid; gap: 16px; }
body.sop-v3-active .sop-v3-button.sop-v4-plan-card { display: grid; width: 100%; justify-content: stretch; gap: 7px; padding: 12px 13px; text-align: left; font: inherit; white-space: normal; }
.sop-v4-plan-card .sop-v4-card-description { color: var(--text-secondary); font-size: .875rem; line-height: 1.65; }
body.sop-v3-active .sop-v4-plan-card[aria-pressed="true"] { border-color: var(--owner-ui-accent); background: var(--surface-active); color: var(--text-primary); }
.sop-v3-case-item h4 button small { display: block; color: var(--text-secondary); font-size: .875rem; font-weight: 400; line-height: 1.65; }
body.sop-v3-active .sop-v3-case-item h4 button[aria-expanded="true"] { box-shadow: none; }
.sop-v5-report-figure { margin: 20px 0 0; }
.sop-v5-report-figure figcaption { margin-top: 9px; color: var(--text-secondary); font-size: .8rem; line-height: 1.5; }
.sop-v5-report .sop-v3-section-kicker { font-size: inherit; }
@media (min-width: 641px) {
  .sop-v3-case-panel > dl > div { grid-template-columns: 4em minmax(0, 1fr); }
  .sop-v3-case-panel .sop-v5-report dl div { grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; }
  .sop-v3-line-qr { justify-self: start; }
}

/* 現有欄位使用真正的按鈕，字體繼承與線上的文字控制項一致。 */
button.sop-v3-file-picker-label { font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; }
.sop-v3-error[data-missing] { border: 0; padding: 0; background: transparent; font-family: inherit; font-size: inherit; text-align: left; cursor: pointer; }
.sop-v3-head[hidden] { display: none; }
/* 補單 G：保留欄位的垂直間距，題目與必填星號共用第一列。 */
body.sop-v3-active .sop-v3-field:has(> .sop-v3-required) { grid-template-columns: max-content minmax(0, 1fr); column-gap: .25em; }
.sop-v3-field > .sop-v3-required { grid-column: 2; grid-row: 1; }
.sop-v3-field:has(> .sop-v3-required) > :not(.sop-v3-required) { grid-column: 1 / -1; }
body.sop-v3-active [data-line-mobile] { display: none; }
@media (max-width: 640px) {
  body.sop-v3-active [data-line-mobile] { display: block; }
  body.sop-v3-active [data-line-desktop] { display: none; }
  body.sop-v3-active .sop-v3-line-qr { display: none; }
}
/* 第二步：情境與正式方案分列，容器字級保留手機按鈕空間。 */
.sop-v4-selection { container-type: inline-size; margin-bottom: 16px; }
.sop-v4-selection-title { margin: 0 0 6px; color: var(--text-primary); font-size: 1rem; white-space: nowrap; }
.sop-v4-selection-details { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--text-secondary); font-size: min(.875rem, 4.5cqw); white-space: nowrap; }
.sop-v4-selection-details > span { flex: 0 0 auto; }
body.sop-v3-active .sop-v4-selection-details > .sop-v3-button { flex: 0 0 auto; width: auto; min-width: 0; padding: 8px; font-size: inherit; white-space: nowrap; }

/* 職缺標題留在框內，避免原生 legend 跨在上框線。 */
body.sop-v3-active .sop-v3-job > legend { float: left; width: 100%; padding: 0; margin: 0 0 16px; }
body.sop-v3-active .sop-v3-job > legend + * { clear: both; margin-top: 0; }

/* JD 上傳標題與前一欄位沿用同一組欄位間距。 */
body.sop-v3-active .sop-v3-job > .sop-v3-file-control { margin-top: 26px; }
@media (max-width: 640px) {
  body.sop-v3-active .sop-v3-job > .sop-v3-file-control { margin-top: 22px; }
}
