.train-support-details { margin: 18px 0; border: 1px solid var(--line, #e5e5e5); border-radius: 12px; padding: 0 18px; }
.train-support-details > summary { cursor: pointer; padding: 15px 0; font-size: 13px; font-weight: 600; }
.train-support-details > summary span { float: right; font-size: 12px; color: var(--ink-3, #777); font-weight: 400; }
.train-support-details[open] > summary span { display: none; }
.inspection-workspace { --check-green: #327d68; --check-amber: #9a6030; color: var(--ink, #222); }
.inspection-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0; }
.inspection-heading h2 { font-size: clamp(20px, 2.3vw, 27px); margin: 6px 0 8px; letter-spacing: -.04em; }
.inspection-heading p, .inspection-upload-overview > p { font-size: 13px; color: var(--ink-3, #777); line-height: 1.65; margin: 5px 0; }
.inspection-heading .inspection-eyebrow { font-size: 11px; letter-spacing: .12em; font-weight: 600; color: var(--check-green); }
.inspection-count { white-space: nowrap; color: #7b827b; font-size: 12px; }
.inspection-count strong { font-size: 24px; font-weight: 500; color: #327d68; }
.inspection-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "current passed" "rejected rejected" "repairs repairs"; gap: 22px; align-items: start; }
.inspection-layout.is-finished { grid-template-columns: minmax(0, 1fr); grid-template-areas: "current" "rejected" "repairs" "passed"; }
.inspection-layout.is-finished .inspection-folder-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.inspection-layout.is-finished .inspection-folder-thumbs > img { height: 115px; }
.inspection-stage { grid-area: current; min-width: 0; border: 1px solid #dfe6e0; border-radius: 13px; overflow: hidden; background: #f7f8f5; }
.inspection-stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 16px; font-size: 12px; }
.inspection-stage-head span { color: #737a73; overflow-wrap: anywhere; }
.inspection-current-image { position: relative; background: #ecece6; }
.inspection-current-image > img { width: 100%; height: 310px; object-fit: contain; display: block; }
.inspection-check-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(30, 45, 39, .36); color: #fff; font-size: 13px; backdrop-filter: blur(.6px); }
.inspection-spinner { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: inspection-spin .85s linear infinite; }
.inspection-stage.is-complete { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; padding: 24px; }
.inspection-stage.is-complete strong { font-size: 14px; }
.inspection-stage.is-complete p { grid-column: 2; color: #7b827b; margin: 0; font-size: 12px; line-height: 1.7; }
.inspection-complete-mark { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e3eee4; color: #327d68; }
.inspection-placeholder { min-height: 180px; display: grid; place-items: center; padding: 18px; color: #7b847b; font-size: 12px; }
.inspection-bucket { grid-area: rejected; min-width: 0; border: 1px solid #e8b2b2; border-radius: 13px; padding: 16px; background: #fff0f0; }
.inspection-bucket.is-rejected h3 { color: #9b3535; }
.inspection-bucket.is-rejected .inspection-card { border-color: #edc6c6; background: #fff9f9; }
.inspection-bucket.is-rejected .inspection-reason { color: #a53d3d; }
.inspection-bucket > header, .inspection-repairs > header, .inspection-passed-folder > header { margin-bottom: 16px; }
.inspection-layout h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; }
.inspection-layout h3 span { font-size: 11px; padding: 3px 7px; background: #e7f0e8; color: #327d68; border-radius: 6px; }
.inspection-layout header > p { color: #7b817b; font-size: 12px; margin: 6px 0 0; line-height: 1.6; }
.inspection-bucket.is-rejected h3 span { background: #f7d6d6; color: #9b3535; }
.inspection-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; align-content: start; }
.inspection-card { border: 1px solid #e8e8e2; border-radius: 9px; overflow: hidden; background: #fff; min-width: 0; }
.inspection-thumb { position: relative; display: block; width: 100%; background: #f1f0eb; padding: 0; border: 0; cursor: zoom-in; }
.inspection-thumb img { height: 145px; width: 100%; object-fit: contain; display: block; }
.inspection-thumb .inspection-placeholder { min-height: 145px; }
.inspection-number { position: absolute; top: 8px; left: 8px; padding: 3px 6px; background: rgba(255,255,255,.9); border-radius: 4px; color: #555; font-size: 10px; }
.inspection-card-body { padding: 11px; }
.inspection-card-body > strong { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspection-reason { font-size: 12px; line-height: 1.6; color: #9a6030; margin: 8px 0; }
.inspection-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inspection-workspace .train-btn { width: auto; font-size: 12px; padding: 8px 12px; min-height: 36px; border-radius: 7px; }
.inspection-card-actions .train-btn { flex: 1; white-space: nowrap; padding: 8px; font-size: 11px; }
.inspection-card-body small { display: block; color: #93988f; font-size: 10px; margin-top: 8px; }
.inspection-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 80px; color: #8a928a; font-size: 12px; text-align: center; line-height: 1.6; }
.inspection-passed-folder { grid-area: passed; min-width: 0; padding: 18px; border: 1px solid #dfe6df; border-radius: 13px; background: #f8faf6; }
.inspection-folder-cover { position: relative; border: 0; padding: 14px; margin-top: 15px; border-radius: 0 10px 10px 10px; width: 100%; background: #e3eade; cursor: pointer; text-align: left; color: #3e604c; }
.inspection-folder-tab { position: absolute; top: -11px; left: 0; width: 42%; height: 14px; background: #e3eade; border-radius: 8px 8px 0 0; }
.inspection-folder-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; min-height: 100px; }
.inspection-folder-thumbs > img { width: 100%; height: 83px; object-fit: cover; border-radius: 4px; }
.inspection-folder-empty { grid-column: 1 / -1; align-self: center; text-align: center; color: #78907c; font-size: 12px; }
.inspection-folder-caption { display: block; margin-top: 13px; font-size: 12px; font-weight: 600; }
.inspection-folder-hint { margin: 13px 0 0; font-size: 11px; color: #7a8678; line-height: 1.7; }
.inspection-repairs { grid-area: repairs; min-width: 0; padding: 16px; background: #fff8d9; border: 1px solid #e6d18a; border-radius: 13px; }
.inspection-repairs > header h3 { color: #876417; }
.inspection-repairs > header h3 span { color: #876417; background: #f8eab4; }
.inspection-repair-row { border: 1px solid #eadb9e; background: #fffdf2; border-radius: 10px; padding: 16px; margin-top: 14px; }
.inspection-repair-row > header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 13px; }
.inspection-result-label { color: #327d68; font-size: 11px; padding: 4px 8px; background: #eaf2e9; border-radius: 5px; }
.inspection-result-label.is-failed { background: #f9eee2; color: #9a6030; }
.inspection-comparison { display: grid; grid-template-columns: 1fr; gap: 16px; }
.inspection-comparison.has-after { grid-template-columns: 1fr 1fr; }
.inspection-comparison figure { min-width: 0; margin: 0; }
.inspection-comparison figcaption { margin-bottom: 8px; color: #707a70; font-size: 12px; }
.inspection-compare-image { padding: 0; border: 0; width: 100%; background: #eeeee8; border-radius: 9px; cursor: zoom-in; overflow: hidden; }
.inspection-comparison img { width: 100%; height: 260px; object-fit: contain; display: block; background: #eeeee8; border-radius: 9px; }
.inspection-repair-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.inspection-repair-actions small { color: #8c948a; font-size: 10px; }
.inspection-treatment { font-size: 12px; line-height: 1.7; color: #876417; margin: 10px 0 0; }
.inspection-footer { padding: 22px 0 4px; color: #748073; font-size: 13px; line-height: 1.7; }
.inspection-footer strong { font-weight: 500; }
.inspection-action-message { margin: 0 0 18px; padding: 12px 15px; border-radius: 8px; color: #496058; background: #f0f4f0; font-size: 13px; line-height: 1.6; }
.inspection-action-message:empty { display: none; }
.inspection-action-message.is-error { color: #9a6030; background: #fbf1e6; }
.inspection-action-message.is-success { color: #2e7158; background: #e9f5ec; }
.inspection-needs-focus { outline: 2px solid #bd8650; outline-offset: 4px; }
.inspection-card.is-dragover, .inspection-repair-row.is-dragover { outline: 2px solid #327d68; outline-offset: -2px; }
.inspection-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; overflow: auto; border: 0; border-radius: 16px; padding: 22px; width: min(1100px, 94vw); max-height: 92dvh; color: #222; }
.inspection-dialog::backdrop, .inspection-notice-dialog::backdrop { background: rgba(15,22,18,.65); backdrop-filter: blur(4px); }
.inspection-notice-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; overflow: auto; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 30px; border: 0; border-radius: 16px; background: #fff; text-align: center; color: #283730; }
.inspection-notice-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; background: #fbe7e7; color: #ab4545; font-size: 24px; font-weight: 600; }
.inspection-notice-dialog h2 { font-size: 20px; margin: 0 0 12px; }
.inspection-notice-dialog p { font-size: 14px; color: #747c77; line-height: 1.8; margin: 0 0 24px; }
.inspection-notice-dialog .train-btn { width: 100%; }
.inspection-confirm-actions { display: grid; gap: 12px; }
.inspection-confirm-actions .train-btn { min-height: 44px; }
.inspection-notice-dialog .inspection-confirm-version { font-size: 12px; margin-bottom: 18px; }
.inspection-review-hint { color: #875555; font-size: 12px; line-height: 1.8; margin: 12px 0; }
.inspection-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.inspection-dialog h2 { font-size: 16px; overflow-wrap: anywhere; }
.inspection-dialog .inspection-comparison img, .inspection-single-preview img { width: 100%; height: min(65dvh, 650px); object-fit: contain; }
.inspection-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.inspection-gallery button { padding: 0; border: 1px solid #e1e7df; border-radius: 8px; overflow: hidden; background: #f8faf6; cursor: zoom-in; min-width: 0; }
.inspection-gallery img { width: 100%; height: 160px; object-fit: contain; display: block; background: #ededdf; }
.inspection-gallery button > span { display: block; padding: 10px; font-size: 11px; color: #687564; overflow-wrap: anywhere; }
.inspection-upload-overview h2 { font-size: 21px; margin: 25px 0 10px; }
@keyframes inspection-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .inspection-heading { display: block; }
  .inspection-heading h2 { font-size: 20px; }
  .inspection-count { display: block; margin-top: 10px; }
  .inspection-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "current" "rejected" "repairs" "passed"; gap: 18px; }
  .inspection-layout.is-finished .inspection-folder-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inspection-layout.is-finished .inspection-folder-thumbs > img { height: 83px; }
  .inspection-current-image > img { height: 250px; }
  .inspection-stage-head { padding: 12px; }
  .inspection-bucket { padding: 12px; }
  .inspection-cards { grid-template-columns: minmax(0, 1fr); }
  .inspection-card { display: grid; grid-template-columns: 105px minmax(0, 1fr); }
  .inspection-thumb img { height: 100%; min-height: 150px; }
  .inspection-card-actions .train-btn { font-size: 11px; padding: 7px; }
  .inspection-repair-row { padding: 12px; }
  .inspection-comparison { gap: 10px; }
  .inspection-comparison img { height: 190px; }
  .inspection-repair-actions .train-btn { width: 100%; }
  .inspection-dialog .inspection-comparison.has-after { grid-template-columns: 1fr; }
  .inspection-dialog .inspection-comparison img { height: 45dvh; }
  .inspection-dialog { padding: 15px; }
  .inspection-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inspection-stage.is-complete { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .inspection-spinner { animation: none; }
}
