/* ??? ? ????? / ?????? iOS ?? */
.pro-detection-view.view {
  padding: 0;
  max-width: none;
  min-height: 100dvh;
  background: #f2f2f7;
}

body.pro-det-landscape-lock {
  overflow: hidden;
  --pro-det-brand: #3f45b5;
  --pro-det-brand-soft: #eef0ff;
  --pro-det-sidebar-bg: #eaf2ff;
  --pro-det-fs: clamp(11px, 2.5vh, 13px);
  --pro-det-fs-md: clamp(12px, 2.8vh, 14px);
  --pro-det-fs-lg: clamp(13px, 3.1vh, 15px);
  --pro-det-fs-title: clamp(14px, 3.4vh, 17px);
  --pro-det-sidebar-w: clamp(120px, 18vw, 168px);
  --pro-det-photo-slot: clamp(72px, 18vh, 104px);
  --pro-det-thumb: clamp(72px, 16vmin, 96px);
  --pro-det-gap: clamp(4px, 1vh, 8px);
  --pro-det-pad: clamp(6px, 1.2vh, 10px);
  --pro-det-kb-inset: 0px;
}

body.pro-det-landscape-lock .pro-detection-view.view.pro-det-active {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  width: 100dvw;
  height: 100dvh;
  min-height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
}

.pro-det-landscape {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f2f2f7;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.pro-det-hidden { display: none !important; }

.pro-det-loading {
  flex: 1;
  padding: 48px 16px;
  text-align: center;
  color: #aeaeb2;
  font-size: 14px;
}

.pro-det-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* ?? ???????? ih-toolbar? ?? */
.pro-det-head {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #e5e5ea;
  /* ???????? .pro-det-toolbar ?????????? --sat ?? */
  padding-left: max(0px, var(--sal, env(safe-area-inset-left, 0px)));
  padding-right: max(0px, var(--sar, env(safe-area-inset-right, 0px)));
}

.pro-det-reject-banner {
  margin: 0 10px 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff4e5;
  color: #c93400;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pro-det-reject-banner-text {
  flex: 1;
}

.pro-det-reject-reload {
  align-self: flex-start;
  border: 1px solid #c93400;
  background: #fff;
  color: #c93400;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pro-det-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  min-height: 38px;
}

.pro-det-toolbar .btn-ghost {
  margin-right: 0;
  flex-shrink: 0;
}

.pro-det-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #1c1c1e;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pro-det-version-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: #8e8e93;
  background: #f2f2f7;
  border-radius: 6px;
  padding: 2px 6px;
  line-height: 1.3;
}

.pro-det-head-save {
  flex-shrink: 0;
  border: none;
  background: #34c759;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pro-det-head-save:active {
  opacity: 0.88;
}

.pro-det-head-save-secondary {
  flex-shrink: 0;
  border: 1px solid #c7c7cc;
  background: #fff;
  color: #1c1c1e;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pro-det-head-save-secondary:active {
  opacity: 0.85;
}

.pro-det-finish-btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  border: none;
  background: #007aff;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-width: 48px;
}

.pro-det-finish-btn:active {
  opacity: 0.88;
}

.pro-det-finish-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pro-det-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pro-det-cancel-btn {
  flex-shrink: 0;
  border: 1px solid #ff3b30;
  background: #fff;
  color: #ff3b30;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.pro-det-cancel-btn:active {
  opacity: 0.85;
}

.pro-det-tab-wrap {
  padding: 0;
  background: var(--pro-det-brand, #3f45b5);
}

.pro-det-group-tabs {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--pro-det-brand, #3f45b5);
  padding: 0 8px;
  border-radius: 0;
  gap: 0;
  min-height: 40px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pro-det-group-tabs::-webkit-scrollbar { display: none; }

.pro-det-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 10px 14px 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  position: relative;
}

.pro-det-tab.active {
  background: transparent;
  color: #fff;
  font-weight: 800;
  box-shadow: none;
}

.pro-det-tab.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: #fff;
}

.pro-det-tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.pro-det-tab-dot.done { background: #7dffa3; }
.pro-det-tab-dot.partial { background: #ffd56a; }

/* ?? ?? ?? */
.pro-det-content {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  gap: 0;
  background: #f5f6fa;
}

.pro-det-sidebar {
  flex: 0 0 var(--pro-det-sidebar-w, 140px);
  max-width: 36vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
  background: var(--pro-det-sidebar-bg, #eaf2ff);
  border-right: 1px solid #d9e4f7;
}

.pro-det-sidebar-cat {
  flex-shrink: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  max-height: 36%;
  overflow-y: auto;
}

.pro-det-sidebar-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 0 12px;
}

.pro-det-cat2-item {
  display: block;
  width: 100%;
  padding: 11px 8px;
  font-size: 13px;
  color: #8e8e93;
  border: none;
  border-bottom: 1px solid #f2f2f7;
  background: transparent;
  text-align: center;
  cursor: pointer;
  line-height: 1.35;
  word-break: break-all;
}

.pro-det-cat2-item:last-child { border-bottom: none; }

.pro-det-cat2-item.active {
  background: #f2f2f7;
  color: #007aff;
  font-weight: 700;
}

.pro-det-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}

.pro-det-sidebar-section-title {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #636366;
  letter-spacing: 0.02em;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 1;
}

.pro-det-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 12px 12px 12px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
}

.pro-det-sidebar-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b0b8c9;
  margin-top: 6px;
  flex-shrink: 0;
}

.pro-det-sidebar-item-dot.done {
  background: #34c759;
}

.pro-det-sidebar-item.active {
  background: rgba(255, 255, 255, 0.72);
  border-color: transparent;
  box-shadow: none;
}

.pro-det-sidebar-item.active::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: var(--pro-det-brand, #3f45b5);
}

.pro-det-sidebar-item.active .pro-det-sidebar-item-dot:not(.done) {
  background: var(--pro-det-brand, #3f45b5);
}

.pro-det-sidebar-item-name {
  flex: 1;
  font-size: 13px;
  color: #4a4f5c;
  line-height: 1.4;
  word-break: break-all;
}

.pro-det-sidebar-item.active .pro-det-sidebar-item-name {
  color: var(--pro-det-brand, #3f45b5);
  font-weight: 700;
}

.pro-det-sidebar-item-badge {
  font-size: 9px;
  color: #007aff;
  background: #ebf5ff;
  border-radius: 6px;
  padding: 2px 5px;
  flex-shrink: 0;
  font-weight: 700;
}
.pro-det-sidebar-item-badge.fail {
  color: #fff;
  background: #f04438;
}
.pro-det-sidebar-item-badge.pending {
  color: #b54708;
  background: #fffaeb;
}
.pro-det-sidebar-item.has-upload-fail {
  border-color: #fda29b;
  background: #fff5f5;
}
.pro-det-sidebar-item-dot.fail {
  background: #f04438 !important;
}

.pro-det-trace-tag {
  font-size: 9px;
  border-radius: 6px;
  padding: 2px 5px;
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pro-det-trace-tag.must {
  color: #b42318;
  background: #fef3f2;
}

.pro-det-trace-tag.soft {
  color: #b54708;
  background: #fffaeb;
}

.pro-det-trace-hint {
  margin: 0 12px 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.pro-det-trace-hint.must {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.pro-det-trace-hint.warn {
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
}

.pro-det-trace-hint.ok {
  color: #027a48;
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
}

.pro-det-trace-hint.tip {
  color: #475467;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
}

/* ?? ?????? ?? */
.pro-det-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.pro-det-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 72px;
}

.pro-det-panel-scroll.pro-det-photo-focus {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px;
}

.pro-det-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f2f2f7;
}

.pro-det-panel-head.compact {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.pro-det-panel-title {
  font-size: 18px;
  font-weight: 800;
  color: #1c1c1e;
  margin: 0;
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.pro-det-status-pill {
  flex-shrink: 0;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  background: #ebebf0;
  color: #3a3a3c;
  border: 1px solid #d1d1d6;
}

.pro-det-status-pill.normal {
  background: #e6f9eb;
  color: #1b7a33;
  border-color: #b7ebc6;
}

.pro-det-status-pill.empty {
  background: #f2f2f7;
  color: #636366;
  border-color: #d1d1d6;
}

/* ?? ??????????4???????? ?? */
.pro-det-form-sheet {
  background: #fff;
  border-radius: 0;
  overflow: hidden;
}

.pro-det-form-sheet-group {
  border-radius: 12px;
  border: 1px solid #ececf0;
  margin: 0 0 12px;
}

.pro-det-form-row {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f3;
  gap: 16px;
  border-radius: 0;
  transition: background 0.15s;
  background: #fff;
}

.pro-det-form-row:last-child { border-bottom: none; }

.pro-det-form-row.active {
  background: #f7faff;
  box-shadow: none;
}

.pro-det-form-label {
  flex: 0 0 auto;
  min-width: 96px;
  max-width: 42%;
  font-size: 15px;
  color: #1c1c1e;
  font-weight: 500;
  line-height: 1.3;
}

.pro-det-form-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pro-det-form-input,
.pro-det-form-input.pro-det-input {
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  font-size: 15px;
  color: #1c1c1e;
  padding: 8px 0;
  outline: none;
}

.pro-det-form-input::placeholder { color: #c7c7cc; }

.pro-det-form-arrow {
  color: #c7c7cc;
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}

/* ????????????????????????????? */
body.pro-det-form-typing .pro-det-panel-scroll {
  padding-bottom: calc(16px + var(--pro-det-kb-inset, 0px)) !important;
  scroll-padding-bottom: calc(24px + var(--pro-det-kb-inset, 0px));
}

.pro-det-form-camera {
  border: none;
  background: #f2f2f7;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  flex-shrink: 0;
}

.pro-det-form-scan {
  border: none;
  background: #eef5ff;
  color: #007aff;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.pro-det-form-scan:active {
  background: #dcecff;
}

.pro-det-form-pick {
  border: none;
  background: #eef5ff;
  color: #007aff;
  border-radius: 8px;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
}

.pro-det-form-pick:active {
  background: #dcecff;
}

.pro-det-model-mask {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pro-det-model-sheet {
  width: 100%;
  max-width: 560px;
  max-height: min(72vh, 640px);
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.pro-det-model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.pro-det-model-head strong {
  font-size: 16px;
  color: #1c1c1e;
}

.pro-det-model-skip {
  border: none;
  background: transparent;
  color: #007aff;
  font-size: 14px;
  padding: 4px 6px;
  cursor: pointer;
}

.pro-det-model-hint {
  font-size: 12px;
  color: #8e8e93;
  margin-bottom: 8px;
}

.pro-det-model-list {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 6px;
  min-height: 120px;
}

.pro-det-model-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: min(82vw, 330px);
  width: min(82vw, 330px);
  text-align: left;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  background: #f8f9fb;
  padding: 10px 12px;
  cursor: pointer;
}

.pro-det-model-specs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.pro-det-model-specs div { min-width: 0; padding: 7px 8px; border-radius: 8px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.pro-det-model-specs small { color: #8e8e93; font-size: 10px; }
.pro-det-model-specs b { overflow: hidden; color: #30343b; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pro-det-model-opt > em { align-self: flex-end; margin-top: 9px; padding: 5px 10px; border-radius: 999px; background: #e7f2ff; color: #0877db; font-size: 12px; font-style: normal; font-weight: 700; }

.pro-det-model-opt strong {
  font-size: 14px;
  color: #1c1c1e;
  font-weight: 600;
}

.pro-det-model-opt span {
  font-size: 12px;
  color: #8e8e93;
}

.pro-det-model-opt.on,
.pro-det-model-opt:active {
  border-color: #007aff;
  background: #eef5ff;
}

.pro-det-model-empty {
  padding: 24px 8px;
  text-align: center;
  color: #8e8e93;
  font-size: 13px;
}

.pro-det-model-cancel {
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #f2f2f7;
  color: #1c1c1e;
  font-size: 15px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
}

/* VIN 车型完整配置对比：整屏展示，左侧配置名固定，车型列横向滚动。 */
.pro-det-model-sheet.pro-det-compare-sheet {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  padding: calc(max(28px, var(--safe-area-top, 0px), env(safe-area-inset-top, 0px)) + 8px) 0
    calc(8px + max(var(--safe-area-bottom, 0px), env(safe-area-inset-bottom, 0px)));
  overflow: hidden;
}

.pro-det-compare-sheet .pro-det-model-head,
.pro-det-compare-sheet .pro-det-model-hint {
  padding-left: 12px;
  padding-right: 12px;
}

.pro-det-compare-sheet .pro-det-model-head {
  position: relative;
  z-index: 20;
  min-height: 42px;
  flex: 0 0 auto;
  background: #fff;
  pointer-events: auto;
}

.pro-det-model-back {
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  background: #eef4fa;
  color: #0877db;
  font-size: 14px;
  font-weight: 700;
}
.pro-det-compare-sheet .pro-det-model-head > strong { margin-right: auto; }
.pro-det-compare-corner { flex-direction: column; align-items: flex-start; gap: 10px; }
.pro-det-compare-corner label { display: flex; align-items: center; gap: 5px; color: #344054; font-size: 12px; }

.pro-det-compare-sheet .pro-det-model-head strong {
  flex: 1;
  min-width: 0;
}

.pro-det-compare-sheet .pro-det-model-head button,
.pro-det-compare-sheet .pro-det-model-head input,
.pro-det-compare-car button {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
}

.pro-det-compare-sheet .pro-det-model-hint { flex: 0 0 auto; }

.pro-det-compare-sheet .pro-det-model-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-det-compare-sheet .pro-det-model-head label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}

.pro-det-compare-sheet .pro-det-model-hint {
  margin-bottom: 6px;
  line-height: 1.45;
}

.pro-det-compare-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f7f9fc;
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
}

.pro-det-compare-table {
  --label-width: 108px;
  --car-width: 188px;
  width: max-content;
  min-width: 100%;
  color: #1d2939;
  font-size: 12px;
}

.pro-det-compare-header,
.pro-det-compare-row {
  display: grid;
  grid-template-columns: var(--label-width) repeat(var(--car-count), var(--car-width));
  width: max-content;
  min-width: 100%;
}

.pro-det-compare-header {
  position: sticky;
  top: 0;
  z-index: 6;
  align-items: stretch;
  background: #fff;
  border-bottom: 1px solid #d0d5dd;
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.08);
}

.pro-det-compare-label,
.pro-det-compare-value,
.pro-det-compare-car {
  box-sizing: border-box;
  border-right: 1px solid #e4e7ec;
}

.pro-det-compare-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 10px;
  background: #fff;
  color: #344054;
  font-weight: 600;
}

.pro-det-compare-header > .pro-det-compare-label {
  z-index: 8;
  align-items: flex-start;
  min-height: 142px;
  padding-top: 16px;
  color: #667085;
}

.pro-det-compare-car {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 142px;
  padding: 10px;
  background: #fff;
}

.pro-det-compare-car.selected {
  background: #eff8ff;
  box-shadow: inset 0 3px 0 #1683e8;
}

.pro-det-compare-car strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 51px;
  color: #101828;
  font-size: 13px;
  line-height: 17px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pro-det-compare-car span {
  color: #f79009;
  font-weight: 700;
}

.pro-det-compare-car .pro-det-compare-pick {
  margin-top: auto;
  border: 0;
  border-radius: 7px;
  background: #eaf4ff;
  color: #0877db;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 5px;
}

.pro-det-compare-car.selected .pro-det-compare-pick {
  background: #1683e8;
  color: #fff;
}

.pro-det-compare-car .pro-det-compare-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 25px;
  height: 25px;
  margin: 0;
  padding: 0;
  border: 1px solid #fda29b;
  border-radius: 50%;
  background: #fff;
  color: #d92d20;
  font-size: 19px;
  font-weight: 500;
  line-height: 21px;
  z-index: 2;
}

.pro-det-compare-section h3 {
  position: sticky;
  left: 0;
  z-index: 4;
  box-sizing: border-box;
  width: var(--label-width);
  min-width: var(--label-width);
  margin: 0;
  padding: 9px 12px;
  background: #f2f4f7;
  border-top: 1px solid #d0d5dd;
  border-bottom: 1px solid #d0d5dd;
  color: #101828;
  font-size: 14px;
  line-height: 20px;
}

@media (orientation: landscape) and (max-height: 560px) {
  .pro-det-compare-sheet { padding-top: max(2px, env(safe-area-inset-top)); padding-bottom: max(2px, env(safe-area-inset-bottom)); }
  .pro-det-compare-sheet .pro-det-model-head { min-height: 30px; padding: 1px 10px 3px; }
  .pro-det-model-back, .pro-det-compare-sheet .pro-det-model-skip { padding: 4px 8px; }
  .pro-det-compare-table { --label-width: 150px; --car-width: 264px; font-size: 13px; }
  .pro-det-compare-header > .pro-det-compare-label,
  .pro-det-compare-car { min-height: 82px; }
  .pro-det-compare-header > .pro-det-compare-label { padding-top: 7px; }
  .pro-det-compare-car { gap: 1px; padding: 4px 12px; }
  .pro-det-compare-car strong { min-height: 30px; font-size: 12px; line-height: 15px; -webkit-line-clamp: 2; }
  .pro-det-compare-car span { font-size: 12px; line-height: 15px; }
  .pro-det-compare-car button { padding: 3px; min-height: 25px; }
  .pro-det-compare-label, .pro-det-compare-value { min-height: 38px; padding: 5px 12px; }
  .pro-det-compare-section h3 { padding: 4px 12px; font-size: 12px; line-height: 17px; }
  .pro-det-compare-corner { gap: 5px; }
}

.pro-det-compare-value {
  min-height: 46px;
  padding: 9px 10px;
  background: #fff;
  border-bottom: 1px solid #e4e7ec;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.pro-det-compare-value.empty {
  color: #98a2b3;
}

.pro-det-compare-table.only-diff .pro-det-compare-row.is-same {
  display: none;
}

.pro-det-compare-table.only-diff .pro-det-compare-section.is-all-same {
  display: none;
}

.pro-det-compare-table.only-diff .pro-det-compare-value.is-different {
  background: #fff7e6;
  color: #b54708;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(247, 144, 9, 0.22);
}

.pro-det-compare-sheet .pro-det-model-cancel {
  width: auto;
  margin: 8px 12px 0;
  padding: 10px;
}

.pro-det-form-scan-icon {
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.pro-det-form-scan-icon::before,
.pro-det-form-scan-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
}

.pro-det-form-scan-icon::before {
  left: 2px;
  right: 2px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
}

.pro-det-form-scan-icon::after {
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
}

.pro-det-form-select,
.pro-det-form-dropdown {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2px;
}

.pro-det-form-dropdown {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  font-size: inherit;
  color: inherit;
  min-height: 40px;
}

.pro-det-form-dropdown-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.pro-det-form-dropdown.is-placeholder .pro-det-form-dropdown-label {
  color: #c7c7cc;
  font-weight: 400;
}

.pro-det-textarea,
.pro-det-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: #f2f2f7;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  color: #1c1c1e;
}

.pro-det-textarea {
  min-height: 56px;
  max-height: 120px;
  resize: vertical;
}

.pro-det-note-block {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ????????/????????????????????????????? */
body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-head,
body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-tab-wrap,
body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-footer,
body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-sidebar {
  display: none !important;
}

body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-content {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--pro-det-vv-offset, 0px);
  height: var(--pro-det-vv-height, 100dvh);
  max-height: var(--pro-det-vv-height, 100dvh);
  padding: 6px;
  gap: 0;
  z-index: 260;
  background: #f2f2f7;
}

body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-panel,
body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-panel-scroll {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 6px;
}

body.pro-det-typing-note .pro-det-status-list,
body.pro-det-typing-note .pro-det-photo-section,
body.pro-det-typing-note .pro-det-records,
body.pro-det-typing-note .pro-det-panel-head {
  display: none !important;
}

body.pro-det-typing-note .pro-det-note-block {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.pro-det-typing-note #proDetStatusText,
body.pro-det-typing-note .pro-det-textarea {
  flex: 1;
  min-height: 48px !important;
  max-height: none !important;
  height: auto;
  font-size: 15px;
  line-height: 1.35;
  padding: 10px 12px;
  resize: none;
}

.pro-det-kb-composer {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--pro-det-vv-offset, 0px);
  z-index: 270;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(242, 242, 247, 0.96);
  border-bottom: 1px solid #e5e5ea;
  backdrop-filter: blur(8px);
}

.pro-det-kb-composer.pro-det-hidden { display: none !important; }

.pro-det-kb-composer-title {
  font-size: 13px;
  font-weight: 600;
  color: #3a3a3c;
}

.pro-det-kb-composer-done {
  border: none;
  background: #007aff;
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

body.pro-det-keyboard-open .pro-detection-view.pro-det-active .pro-det-content {
  top: calc(var(--pro-det-vv-offset, 0px) + 36px);
  height: calc(var(--pro-det-vv-height, 100dvh) - 36px);
  max-height: calc(var(--pro-det-vv-height, 100dvh) - 36px);
}

/* ?? ???? ?? */
.pro-det-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

.pro-det-status-item {
  padding: 8px 14px;
  background: #e8eaef;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: #1c1c1e;
  font-weight: 600;
  line-height: 1.3;
}

.pro-det-status-item.selected {
  background: var(--pro-det-brand, #3f45b5);
  color: #fff;
  font-weight: 700;
}

.pro-det-status-item.normal.selected {
  background: var(--pro-det-brand, #3f45b5);
  color: #fff;
}

.pro-det-status-item.add {
  background: #ebf5ff;
  color: #0051d5;
  font-weight: 700;
}

.pro-det-status-meta {
  font-size: 10px;
  opacity: 0.85;
  margin-left: 2px;
}

/* ?? ?? ?? */
.pro-det-photo-section { margin-top: 8px; }

.pro-det-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pro-det-photo-item {
  width: var(--pro-det-thumb, 88px);
  height: var(--pro-det-thumb, 88px);
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f2f7;
  border: 1px solid #e5e5ea;
}

.pro-det-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: pointer;
  background: #1c1c1e;
}

.pro-det-photo-item.local { background: #1c1c1e; }
.pro-det-photo-item.local img { opacity: 0.76; }

.pro-det-photo-add {
  width: var(--pro-det-thumb, 88px);
  height: var(--pro-det-thumb, 88px);
  background: #f5f6fa;
  border: 1px solid #e1e3ea;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.pro-det-photo-add-icon {
  font-size: 28px;
  color: #c5c8d2;
  line-height: 1;
  font-weight: 300;
}

.pro-det-photo-add-text {
  font-size: 10px;
  color: #aeaeb2;
}

.pro-det-photo-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 10px;
}

.pro-det-photo-item.failed .pro-det-photo-status {
  background: rgba(255, 59, 48, 0.85);
}

.pro-det-photo-retry {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  border-radius: 8px;
  padding: 2px 6px;
  color: #fff;
  background: #007aff;
  font-size: 10px;
  cursor: pointer;
}

.pro-det-photo-del {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  border: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pro-det-photo-hint {
  font-size: 12px;
  color: #aeaeb2;
  margin-top: 8px;
}

.pro-det-photo-actions { display: flex; gap: 8px; margin-top: 8px; }
.pro-det-gallery-btn { display: inline-flex; }

.pro-det-source-mask {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pro-det-busy-mask {
  position: fixed;
  inset: 0;
  z-index: 10080;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pro-det-busy-mask.is-visible {
  display: flex;
}
.pro-det-busy-card {
  min-width: 180px;
  max-width: 280px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.pro-det-busy-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e5ea;
  border-top-color: #007aff;
  border-radius: 50%;
  animation: pro-det-busy-spin 0.8s linear infinite;
}
.pro-det-busy-text {
  font-size: 14px;
  color: #1c1c1e;
  text-align: center;
  line-height: 1.4;
}
@keyframes pro-det-busy-spin {
  to { transform: rotate(360deg); }
}
.pro-det-source-mask.is-anchored {
  align-items: flex-start;
  justify-content: flex-start;
  background: rgba(0, 0, 0, 0.18);
}
.pro-det-source-sheet {
  width: min(320px, 92vw);
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}
.pro-det-source-mask.is-anchored .pro-det-source-sheet {
  width: auto;
  min-width: 148px;
  max-width: min(240px, 70vw);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.pro-det-source-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  background: #f2f2f7;
  color: #007aff;
  cursor: pointer;
  white-space: nowrap;
}
.pro-det-source-mask.is-anchored .pro-det-source-btn {
  padding: 9px 12px;
  font-size: 13px;
  text-align: left;
}
.pro-det-source-btn.selected {
  background: #e8f1ff;
  color: #0060df;
}
.pro-det-source-btn.cancel {
  color: #8e8e93;
  font-weight: 500;
}

/* ?? ???? ?? */
.pro-det-records { margin-top: 12px; }

.pro-det-record-card {
  background: #f2f2f7;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.pro-det-record-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 600;
  color: #1c1c1e;
}

.pro-det-record-del {
  color: #ff3b30;
  border: 1px solid #ff3b30;
  background: #fff;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}

.pro-det-record-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pro-det-record-thumbs img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center;
  cursor: pointer;
  border-radius: 8px;
  background: #1c1c1e;
}

.pro-det-video-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pro-det-video-item {
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1c1e;
}

.pro-det-video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pro-det-btn-sm {
  border: none;
  border-radius: 10px;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  color: #fff;
  background: #007aff;
  font-weight: 600;
}

/* ?? ??? ?? */
.pro-det-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f2f2f7;
  background: #fff;
}

.pro-det-footer-camera,
.pro-det-footer-secondary {
  flex-shrink: 0;
  border: none;
  background: #f2f2f7;
  color: #636366;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pro-det-footer-save {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #34c759;
  cursor: pointer;
}

.pro-det-footer-save:active {
  opacity: 0.88;
}

/* ?????????? + ??????????? | ?? | ??? */
.pro-det-inline-camera {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  display: flex;
  flex-direction: column;
}

.pro-det-inline-camera.pro-det-hidden {
  display: none;
}

body.pro-det-inline-camera-open {
  overflow: hidden;
}

.pro-det-inline-camera-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.pro-det-inline-camera-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pro-det-inline-camera-position-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  background: #000;
  border-bottom: none;
  z-index: 9010;
}

.pro-det-inline-camera-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 9010;
  position: relative;
}

/* Android uses native chrome inside the real camera surface.  Always hide the
   matching WebView header, even while an OEM is still rotating its display. */
body.pro-det-inline-camera-native-chrome .pro-det-inline-camera-safe-top,
body.pro-det-inline-camera-native-chrome .pro-det-inline-camera-topbar {
  position: absolute !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 状态栏 / 挖孔独立避让带（勿把返回键顶进系统区） */
.pro-det-inline-camera-safe-top {
  flex-shrink: 0;
  height: max(var(--sat, 0px), var(--safe-area-top, 0px), env(safe-area-inset-top, 0px), 28px);
  min-height: 28px;
  background: #000;
  pointer-events: none;
}

.pro-det-inline-camera-topbar .pro-det-inline-camera-position-bar {
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 0 4px 0 0;
  background: transparent;
  border: none;
  justify-content: center;
}

.pro-det-inline-camera-topbar .pro-det-inline-camera-position-bar.pro-det-hidden {
  display: flex;
  visibility: hidden;
}

.pro-det-inline-camera-topbar .pro-det-inline-camera-position-label {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  max-width: 100%;
  color: #fff;
}

.pro-det-inline-camera-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #111;
  --pro-det-swipe-dx: 36px;
}

.pro-det-inline-camera-stage.is-swiping .pro-det-inline-camera-review {
  animation: pro-det-cam-swipe-in 220ms ease-out;
}

/* 不要对 viewport 做 translate：原生预览层跟的是布局矩形，滑动位移会造成左侧黑边 */
.pro-det-inline-camera-stage.is-swiping .pro-det-inline-camera-viewport {
  animation: none;
}

@keyframes pro-det-cam-swipe-in {
  from {
    opacity: 0.45;
    transform: translateX(var(--pro-det-swipe-dx, 36px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pro-det-inline-camera-viewport {
  width: 100%;
  height: 100%;
  background: #111;
  position: relative;
  overflow: hidden;
}

.pro-det-inline-camera-focus-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  border: 2px solid #ffe566;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: scale(1.25);
  transition: opacity 120ms ease, transform 220ms ease;
}

.pro-det-inline-camera-focus-ring.is-visible {
  opacity: 1;
  transform: scale(1);
}

.pro-det-inline-camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* ??2?????????? */
  object-fit: cover;
  object-position: center;
  background: #000;
  transform: translateZ(0);
}

.pro-det-inline-camera-dock {
  flex-shrink: 0;
  background: #000;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 9002;
}

.pro-det-inline-camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 340px;
  margin: 0 auto;
  gap: 28px;
  padding: 4px 0 8px;
}

.pro-det-inline-camera-close {
  position: relative;
  top: auto;
  left: auto;
  z-index: 9011;
  width: auto;
  min-width: 72px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 0 14px 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  pointer-events: auto;
}

.pro-det-inline-camera-close:active { opacity: 0.7; }

/* ????? / ?????? */
.pro-det-inline-camera-gallery {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 8px;
  background: #1a1a1a;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.pro-det-inline-camera-gallery:active { opacity: 0.85; }

.pro-det-inline-camera-gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pro-det-inline-camera-gallery-thumb[hidden] {
  display: none !important;
}

.pro-det-inline-camera-gallery-fallback {
  position: absolute;
  inset: 0;
  background: #111;
}

.pro-det-inline-camera-gallery-fallback::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 18px;
  margin: -9px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  box-sizing: border-box;
}

.pro-det-inline-camera-gallery.has-thumb .pro-det-inline-camera-gallery-fallback {
  display: none;
}

.pro-det-inline-camera-torch-btn {
  width: 56px;
  min-height: 52px;
  border: none;
  border-radius: 12px;
  background: #2c2c2e;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
}

.pro-det-inline-camera-torch-btn:active { opacity: 0.8; }

.pro-det-inline-camera-torch-btn.on {
  background: #ffd54f;
  color: #1c1c1e;
}

.pro-det-inline-camera-torch-icon {
  font-size: 18px;
  line-height: 1;
}

.pro-det-inline-camera-torch-text {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}

.pro-det-inline-camera-dock .pro-det-inline-camera-next {
  margin: 4px auto 0;
}

.pro-det-inline-camera-zoom-float {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 9005;
  display: flex;
  justify-content: center;
  pointer-events: none;
  /* 用 opacity 隐藏，避免拍照瞬间 display 切换触发布局 */
  opacity: 1;
  transition: opacity 80ms linear;
  will-change: opacity;
}

.pro-det-inline-camera-zoom-float .pro-det-inline-camera-zoom-presets {
  pointer-events: auto;
}

/* 快门 / 回看瞬间隐藏倍数条，避免与原生预览切换叠出卡顿感 */
#proDetInlineCameraMask.is-capturing .pro-det-inline-camera-zoom-float,
#proDetInlineCameraMask.is-reviewing .pro-det-inline-camera-zoom-float {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.pro-det-inline-camera-dock-meta { display: none; }

.pro-det-inline-camera-rail {
  display: none;
}

/* 车辆照片保持横屏拍摄：左侧为横向 4:3 取景框，右侧为竖排相机功能。 */
@media (orientation: landscape) {
  body.pro-det-landscape-lock .pro-det-reject-banner:not(.pro-det-hidden) {
    margin: 0 8px 5px;
    padding: 5px 8px;
    min-height: 30px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    line-height: 1.25;
  }

  body.pro-det-landscape-lock .pro-det-reject-reload {
    flex: 0 0 auto;
    padding: 4px 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  body.pro-det-landscape-lock .pro-det-head {
    padding-top: 0 !important;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-body {
    flex-direction: row;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-main {
    flex: 1 1 auto;
    width: auto;
    position: relative;
    overflow: hidden;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-stage {
    position: absolute;
    inset: 0;
    align-self: stretch;
    width: 100%;
    flex: 1 1 auto;
    max-height: none;
    aspect-ratio: auto;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-safe-top,
  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-topbar {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-dock {
    width: clamp(112px, 15vw, 164px);
    height: 100%;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-controls {
    height: min(82vh, 420px);
    margin: 0;
    padding: 0;
    flex-direction: column;
    justify-content: space-around;
    gap: 12px;
  }

  body:not(.pro-det-portrait-mode) .pro-det-inline-camera-dock .pro-det-inline-camera-next {
    width: 100%;
    margin: 10px 0 0;
  }

}
.pro-det-inline-camera-rail {
  display: none;
}
.pro-det-inline-camera-rail {
  display: none;
}
.pro-det-position-section {
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pro-det-position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px 8px;
}

.pro-det-photo-focus .pro-det-position-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  gap: clamp(8px, 1.2vh, 14px);
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pro-det-photo-focus .pro-det-position-item {
  flex: 0 0 auto;
  width: var(--pro-det-photo-slot, clamp(48px, 14vh, 72px));
}

.pro-det-photo-focus .pro-det-position-slot {
  width: 100%;
  height: var(--pro-det-photo-slot, clamp(48px, 14vh, 72px));
}

.pro-det-position-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  position: relative;
}

.pro-det-position-retake {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  border: none;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1.3;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.pro-det-position-del {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.pro-det-position-slot {
  width: var(--pro-det-photo-slot, 56px);
  height: var(--pro-det-photo-slot, 56px);
  border: 2px dashed #c7c7cc;
  border-radius: 8px;
  background: #f2f2f7;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.pro-det-position-slot.has-photo {
  border-style: solid;
  border-color: #007aff;
}

.pro-det-position-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #1c1c1e;
}

.pro-det-position-plus {
  font-size: 28px;
  color: #8e8e93;
  line-height: 1;
}

.pro-det-position-name {
  font-size: 10px;
  color: #3a3a3c;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  word-break: break-all;
}

.pro-det-position-slot.failed {
  border-color: #ff3b30;
}

.pro-det-position-slot.uploading::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  background: rgba(0, 122, 255, 0.85);
  animation: pro-det-spin 0.7s linear infinite;
  pointer-events: none;
}

@keyframes pro-det-spin {
  to { transform: rotate(360deg); }
}

.pro-det-inline-camera-zoom-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.pro-det-inline-camera-zoom-presets {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
}

.pro-det-inline-camera-zoom-presets[hidden] {
  display: none !important;
}

.pro-det-inline-camera-zoom-chip {
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 28px;
  cursor: pointer;
}

.pro-det-inline-camera-zoom-chip.active {
  background: #c6e26e;
  color: #1c1c1e;
}

.pro-det-inline-camera-zoom-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
}

.pro-det-inline-camera-zoom {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: horizontal-tb;
  direction: ltr;
  width: min(180px, 40vw);
  height: 4px;
  accent-color: #fff;
}

.pro-det-inline-camera-shutter {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  flex-shrink: 0;
}

.pro-det-inline-camera-shutter:active {
  transform: scale(0.94);
  opacity: 0.9;
}

.pro-det-inline-camera-position-label {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pro-det-inline-camera-review {
  position: absolute;
  inset: 0;
  z-index: 9006;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pro-det-inline-camera-review img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* 原生预览隐藏后（相册选图/照片回看），原生返回键也会一起消失。
   回看层提供独立返回入口，正常取景时保持隐藏，避免出现两个返回键。 */
.pro-det-inline-camera-review-back {
  position: absolute;
  top: calc(max(44px, var(--safe-area-top, 0px), env(safe-area-inset-top, 0px)) + 18px);
  left: max(16px, env(safe-area-inset-left, 0px));
  z-index: 9012;
  min-width: 76px;
  height: 42px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  background: rgba(18, 18, 20, 0.78);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
}

.pro-det-inline-camera-review-back:active {
  transform: scale(0.97);
  opacity: 0.82;
}

.pro-det-inline-camera-defect-statuses {
  position: absolute;
  z-index: 9012;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(10, 14, 22, 0.88);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.pro-det-inline-camera-defect-title {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.pro-det-inline-camera-defect-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
}

.pro-det-inline-camera-defect-actions button {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}

.pro-det-inline-camera-defect-actions button.normal {
  border-color: rgba(54, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.2);
}

.pro-det-inline-camera-defect-actions button:not(.normal) {
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(244, 63, 94, 0.16);
}

.pro-det-defect-photo-card {
  position: relative;
  overflow: hidden;
  width: var(--pro-det-thumb, 88px);
  height: var(--pro-det-thumb, 88px);
  flex: 0 0 var(--pro-det-thumb, 88px);
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #111827;
}

/* Keep defect photos as compact thumbnails even when generic layout rules apply. */
.pro-det-photo-grid > .pro-det-defect-photo-card.pro-det-photo-item {
  width: var(--pro-det-thumb, 88px) !important;
  height: var(--pro-det-thumb, 88px) !important;
  flex: 0 0 var(--pro-det-thumb, 88px) !important;
}

.pro-det-defect-photo-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111827;
}

.pro-det-defect-photo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pro-det-defect-photo-chip {
  position: absolute;
  z-index: 3;
  left: 5px;
  right: 5px;
  bottom: 5px;
  min-height: 25px;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(10, 14, 22, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
}

.pro-det-defect-photo-chip.pending {
  border-color: rgba(255, 190, 92, 0.78);
  background: rgba(180, 92, 0, 0.82);
}

.pro-det-defect-photo-chip.selected {
  border-color: rgba(115, 210, 255, 0.78);
  background: rgba(4, 98, 166, 0.82);
}

.pro-det-defect-photo-del {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
}

.pro-det-defect-photo-statuses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.pro-det-defect-photo-statuses button {
  min-height: 34px;
  padding: 0 5px;
  border: 1px solid #d9e1ec;
  border-radius: 9px;
  background: #f5f7fa;
  color: #526071;
  font-size: 12px;
  font-weight: 700;
}

.pro-det-defect-photo-statuses button.selected {
  border-color: #1687f8;
  background: #e8f3ff;
  color: #0875db;
  box-shadow: inset 0 0 0 1px rgba(22, 135, 248, 0.16);
}

.pro-det-defect-photo-statuses button.selected[data-defect-status="normal"] {
  border-color: #25b873;
  background: #eafaf2;
  color: #168b54;
}

.pro-det-defect-photo-pending {
  padding: 0 8px 8px;
  color: #e44848;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

@media (orientation: landscape) {
  .pro-det-inline-camera-defect-statuses {
    left: 50%;
    right: auto;
    width: min(620px, calc(100% - 180px));
    transform: translateX(-50%);
  }
}

.pro-det-inline-camera-swipe-hint-bar {
  position: absolute;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 9006;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.pro-det-inline-camera-next {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  height: 32px;
  border-radius: 16px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 12px;
  white-space: nowrap;
  width: fit-content;
}

.pro-det-inline-camera-next:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.96);
}

.pro-det-inline-camera-viewport.pro-det-shutter-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  animation: pro-det-shutter-flash 120ms ease-out forwards;
}

@keyframes pro-det-shutter-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

.pro-det-orient-btn {
  flex-shrink: 0;
  border: 1px solid #c7c7cc;
  background: #fff;
  color: #007aff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pro-det-orient-btn:active {
  opacity: 0.85;
}

body.pro-det-portrait-mode {
  overflow: hidden;
  --pro-det-fs: clamp(12px, 3.2vw, 15px);
  --pro-det-fs-md: clamp(13px, 3.5vw, 16px);
  --pro-det-fs-lg: clamp(14px, 3.8vw, 17px);
  --pro-det-fs-title: clamp(15px, 4vw, 18px);
  --pro-det-sidebar-w: 100%;
  --pro-det-gap: 8px;
  --pro-det-pad: 10px;
}

/* 竖屏顶栏：单行紧凑，避免第二行大片留白 */
body.pro-det-portrait-mode .pro-det-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  padding-left: calc(8px + var(--sal, 0px));
  padding-right: calc(8px + var(--sar, 0px));
  min-height: 0;
}

body.pro-det-portrait-mode .pro-det-toolbar > .btn-ghost {
  flex-shrink: 0;
  padding: 5px 8px;
  font-size: 12px;
}

body.pro-det-portrait-mode .pro-det-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.pro-det-portrait-mode .pro-det-version-tag {
  display: none;
}

body.pro-det-portrait-mode .pro-det-head-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: visible;
  padding-bottom: 0;
}

body.pro-det-portrait-mode .pro-det-finish-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 12px;
  min-width: 0;
  z-index: 2;
}

body.pro-det-portrait-mode .pro-det-head-save,
body.pro-det-portrait-mode .pro-det-head-save-secondary,
body.pro-det-portrait-mode .pro-det-orient-btn,
body.pro-det-portrait-mode .pro-det-cancel-btn {
  padding: 5px 7px;
  font-size: 11px;
  border-radius: 7px;
}

/* 极窄屏：标题占满一行，按钮均分第二行（仍无大块空缺） */
@media (max-width: 420px) {
  body.pro-det-portrait-mode .pro-det-toolbar {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  body.pro-det-portrait-mode .pro-det-title {
    flex: 1 1 calc(100% - 88px);
    order: 2;
    max-width: none;
  }
  body.pro-det-portrait-mode .pro-det-toolbar > .btn-ghost {
    order: 1;
  }
  body.pro-det-portrait-mode .pro-det-head-actions {
    order: 3;
    flex: 1 1 auto;
    justify-content: stretch;
    gap: 4px;
  }
  body.pro-det-portrait-mode .pro-det-head-actions > button {
    flex: 1 1 0;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
  }
  body.pro-det-portrait-mode .pro-det-finish-btn {
    order: 4;
    flex: 0 0 auto;
  }
}

body.pro-det-portrait-mode .pro-detection-view.view.pro-det-active {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100dvw;
  height: 100dvh;
  min-height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.pro-det-portrait-mode .pro-det-main {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.pro-det-portrait-mode .pro-det-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pro-det-gap);
  padding: var(--pro-det-pad);
  padding-bottom: max(var(--pro-det-pad), env(safe-area-inset-bottom, 0px));
}

body.pro-det-portrait-mode .pro-det-sidebar {
  flex: 0 0 auto;
  max-width: none;
  width: 100%;
  max-height: 32vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.pro-det-portrait-mode .pro-det-sidebar-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

body.pro-det-portrait-mode .pro-det-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.pro-det-portrait-mode .pro-det-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

body.pro-det-portrait-mode .pro-det-inline-camera-body {
  flex-direction: column;
}

body.pro-det-portrait-mode .pro-det-inline-camera-main {
  flex: 1;
  min-height: 0;
}

.pro-det-inline-camera-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9001;
  pointer-events: none;
}

.pro-det-inline-camera-loading.pro-det-hidden {
  display: none;
}

@media (orientation: portrait) {
  body.pro-det-landscape-lock:not(.pro-det-portrait-mode)::before {
    content: '?????????????????????????';
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(28, 28, 30, 0.92);
    color: #fff;
    font-size: 16px;
    padding: 24px;
    text-align: center;
    pointer-events: none;
  }
}

/* ?? ???? ?? */
.pro-det-camera-drawer {
  flex-shrink: 0;
  border-top: 1px solid #f2f2f7;
  background: #f2f2f7;
  padding: 8px 10px;
  max-height: 42vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pro-det-camera-drawer.camera-off .pro-det-camera-stage {
  opacity: 0.35;
}

.pro-det-camera-drawer-close {
  align-self: flex-end;
  border: none;
  background: transparent;
  color: #8e8e93;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px 6px;
}

.pro-det-camera-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.pro-det-camera-viewport {
  flex: 1;
  aspect-ratio: 4 / 3;
  max-height: 28vh;
  background: #1c1c1e;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.pro-det-camera-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #000;
}

.pro-det-camera-off-hint,
.pro-det-camera-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.pro-det-zoom-rail {
  flex: 0 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pro-det-zoom-rail.pro-det-zoom-disabled { opacity: 0.4; }

.pro-det-zoom-label {
  font-size: 11px;
  font-weight: 700;
  color: #1c1c1e;
}

.pro-det-zoom-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 28px;
  height: 80px;
  accent-color: #007aff;
}

.pro-det-camera-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.pro-det-camera-status {
  min-height: 16px;
  margin-top: 4px;
  color: #8e8e93;
  font-size: 11px;
}

.pro-det-camera-status.error { color: #ff3b30; }
.pro-det-camera-status.success { color: #34c759; }

.pro-det-torch-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  color: #3a3a3c;
}

.pro-det-torch-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pro-det-torch-switch-ui {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #e3e3e8;
  position: relative;
  transition: background 0.2s;
}

.pro-det-torch-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pro-det-torch-switch input:checked + .pro-det-torch-switch-ui {
  background: #34c759;
}

.pro-det-torch-switch input:checked + .pro-det-torch-switch-ui::after {
  transform: translateX(18px);
}

.pro-det-capture-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #007aff;
  cursor: pointer;
}

/* ?? ?? ?? */
.pro-det-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
}

.pro-det-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: #fff;
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.pro-det-modal.show { transform: translateX(0); }

.pro-det-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e5ea;
  font-weight: 700;
  color: #1c1c1e;
}

.pro-det-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  color: #8e8e93;
  cursor: pointer;
}

.pro-det-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}

.pro-det-modal-foot {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #e5e5ea;
}

.pro-det-modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.pro-det-modal-btn.cancel {
  background: #f2f2f7;
  color: #1c1c1e;
}

.pro-det-modal-btn.confirm {
  background: #34c759;
  color: #fff;
}

/* 覆盖件：采满后进入下一面（大块按钮，防误触） */
.pro-det-confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 420;
}

.pro-det-confirm-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  max-width: 92vw;
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px 18px;
  z-index: 421;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.pro-det-confirm-title {
  font-size: 20px;
  font-weight: 700;
  color: #1c1c1e;
  text-align: center;
  margin-bottom: 10px;
}

.pro-det-confirm-msg {
  font-size: 15px;
  line-height: 1.55;
  color: #3a3a3c;
  text-align: center;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.pro-det-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-det-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 16px 14px;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.pro-det-confirm-btn.ok {
  background: #34c759;
  color: #fff;
  min-height: 84px;
  font-size: 20px;
}

.pro-det-confirm-btn.cancel {
  background: #f2f2f7;
  color: #1c1c1e;
  border: 1px solid #d1d1d6;
}

.pro-det-confirm-btn:active {
  opacity: 0.88;
  transform: scale(0.985);
}

.pro-det-finish-confirm { padding: 24px 20px 20px; }
.pro-det-finish-icon {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #21c16b, #0aa85a);
  font-size: 28px; font-weight: 800; box-shadow: 0 8px 20px rgba(16, 185, 99, .24);
}
.pro-det-finish-summary { padding: 14px; margin: 14px 0; border-radius: 14px; background: #f6f8fb; }
.pro-det-finish-progress-head { display: flex; justify-content: space-between; align-items: center; color: #6b7280; font-size: 14px; }
.pro-det-finish-progress-head strong { color: #111827; font-size: 17px; }
.pro-det-finish-progress-track { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.pro-det-finish-progress-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #0ea5e9); transition: width .25s ease; }
.pro-det-finish-confirm .pro-det-confirm-msg { color: #6b7280; margin-bottom: 18px; }
.pro-det-finish-confirm .pro-det-confirm-btn.ok { min-height: 58px; font-size: 17px; background: linear-gradient(135deg, #168bf2, #0877db); box-shadow: 0 8px 18px rgba(8, 119, 219, .22); }
.pro-det-finish-confirm .pro-det-confirm-btn.cancel { min-height: 52px; font-size: 16px; border: 0; background: #f3f4f6; color: #4b5563; }
.pro-det-leave-confirm { padding: 24px 20px 20px; }
.pro-det-leave-icon {
  width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 15px;
  display: grid; place-items: center; color: #1677e8; background: #eaf4ff;
  font-size: 28px; font-weight: 800;
}
.pro-det-leave-confirm .pro-det-confirm-msg { color: #6b7280; margin: 0 auto 20px; max-width: 330px; }
.pro-det-leave-confirm .pro-det-confirm-btn.ok { min-height: 58px; font-size: 17px; background: linear-gradient(135deg, #168bf2, #0877db); box-shadow: 0 8px 18px rgba(8,119,219,.22); }
.pro-det-leave-confirm .pro-det-confirm-btn.cancel { min-height: 52px; font-size: 16px; border: 0; background: #f3f4f6; color: #4b5563; }

.pro-det-form-item { margin-bottom: 12px; }

.pro-det-form-item label {
  display: block;
  font-size: 13px;
  color: #636366;
  margin-bottom: 4px;
}

.pro-det-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #f2f2f7;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #1c1c1e;
}

/* ??????? + ??????? transform ?? */
@media (orientation: landscape) {
  body.pro-det-landscape-lock .pro-det-landscape {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
  }

  body.pro-det-landscape-lock .pro-det-main {
    flex: 1;
    min-height: 0;
    height: 100%;
  }

  body.pro-det-landscape-lock .pro-det-head {
    padding-left: max(var(--pro-det-pad), env(safe-area-inset-left, 0px));
    padding-right: max(var(--pro-det-pad), env(safe-area-inset-right, 0px));
  }

  body.pro-det-landscape-lock .pro-det-toolbar {
    padding: var(--pro-det-pad) var(--pro-det-pad);
    min-height: 32px;
    gap: var(--pro-det-gap);
  }

  body.pro-det-landscape-lock .pro-det-head-save,
  body.pro-det-landscape-lock .pro-det-head-save-secondary {
    padding: 5px 10px;
    font-size: var(--pro-det-fs-md);
    border-radius: 7px;
  }

  body.pro-det-landscape-lock .pro-det-version-tag {
    font-size: 9px;
    padding: 1px 5px;
  }

  body.pro-det-landscape-lock .pro-det-orient-btn,
  body.pro-det-landscape-lock .pro-det-cancel-btn {
    padding: 5px 8px;
    font-size: var(--pro-det-fs);
  }

  body.pro-det-landscape-lock .pro-det-title {
    font-size: var(--pro-det-fs-title);
  }

  body.pro-det-landscape-lock .pro-det-finish-btn {
    padding: 6px 12px;
    font-size: var(--pro-det-fs-md);
    min-width: 48px;
  }

  body.pro-det-landscape-lock .pro-det-tab-wrap {
    padding: 0 var(--pro-det-pad) 2px;
  }

  body.pro-det-landscape-lock .pro-det-tab {
    padding: 4px 10px;
    font-size: var(--pro-det-fs);
  }

  body.pro-det-landscape-lock .pro-det-content {
    flex: 1;
    min-height: 0;
    padding: var(--pro-det-gap);
    gap: var(--pro-det-gap);
    padding-left: max(var(--pro-det-gap), env(safe-area-inset-left, 0px));
    padding-right: max(var(--pro-det-gap), env(safe-area-inset-right, 0px));
    padding-bottom: max(var(--pro-det-gap), env(safe-area-inset-bottom, 0px));
  }

  body.pro-det-landscape-lock .pro-det-sidebar {
    flex: 0 0 var(--pro-det-sidebar-w);
    max-width: var(--pro-det-sidebar-w);
    min-width: 0;
  }

  body.pro-det-landscape-lock .pro-det-cat2-item {
    padding: 8px 6px;
    font-size: var(--pro-det-fs);
  }

  body.pro-det-landscape-lock .pro-det-sidebar-item {
    padding: 8px 8px;
  }

  body.pro-det-landscape-lock .pro-det-sidebar-item-name {
    font-size: var(--pro-det-fs-md);
  }

  body.pro-det-landscape-lock .pro-det-panel {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body.pro-det-landscape-lock .pro-det-panel-scroll {
    flex: 1;
    min-height: 0;
    padding: var(--pro-det-pad);
    overflow-y: auto;
    padding-bottom: calc(var(--pro-det-pad) + var(--pro-det-kb-inset, 0px));
    scroll-padding-bottom: calc(24px + var(--pro-det-kb-inset, 0px));
  }

  body.pro-det-landscape-lock .pro-det-panel-scroll.pro-det-photo-focus {
    overflow: hidden;
    padding: var(--pro-det-gap);
  }

  body.pro-det-landscape-lock.pro-det-keyboard-open .pro-det-head,
  body.pro-det-landscape-lock.pro-det-keyboard-open .pro-det-tab-wrap,
  body.pro-det-landscape-lock.pro-det-keyboard-open .pro-det-footer {
    display: none;
  }

  body.pro-det-landscape-lock.pro-det-keyboard-open .pro-det-sidebar {
    display: none;
  }

  body.pro-det-landscape-lock.pro-det-keyboard-open .pro-det-content {
    padding: 4px;
  }

  body.pro-det-landscape-lock.pro-det-keyboard-open .pro-det-textarea {
    min-height: 40px;
    max-height: min(22vh, 96px);
  }

  body.pro-det-landscape-lock .pro-det-position-name {
    font-size: var(--pro-det-fs);
  }

  body.pro-det-landscape-lock .pro-det-panel-title {
    font-size: var(--pro-det-fs-title);
  }

  body.pro-det-landscape-lock .pro-det-form-label,
  body.pro-det-landscape-lock .pro-det-form-input,
  body.pro-det-landscape-lock .pro-det-form-input.pro-det-input {
    font-size: var(--pro-det-fs-lg);
  }

  body.pro-det-landscape-lock .pro-det-form-row {
    min-height: 40px;
  }

  body.pro-det-landscape-lock .pro-det-textarea,
  body.pro-det-landscape-lock .pro-det-input {
    font-size: var(--pro-det-fs-md);
    padding: 8px 10px;
  }

  body.pro-det-landscape-lock .pro-det-textarea {
    min-height: 44px;
    max-height: min(28vh, 110px);
  }

  body.pro-det-landscape-lock .pro-det-status-item {
    padding: 6px 12px;
    font-size: var(--pro-det-fs-md);
  }

  body.pro-det-landscape-lock .pro-det-photo-item,
  body.pro-det-landscape-lock .pro-det-photo-add {
    width: var(--pro-det-thumb, clamp(48px, 11vmin, 60px));
    height: var(--pro-det-thumb, clamp(48px, 11vmin, 60px));
  }

  body.pro-det-landscape-lock .pro-det-position-slot {
    width: var(--pro-det-photo-slot);
    height: var(--pro-det-photo-slot);
  }

  body.pro-det-landscape-lock .pro-det-footer {
    flex-direction: row;
    flex-shrink: 0;
    padding: var(--pro-det-pad);
    padding-bottom: max(var(--pro-det-pad), env(safe-area-inset-bottom, 0px));
    gap: var(--pro-det-gap);
  }

  body.pro-det-landscape-lock .pro-det-footer-camera,
  body.pro-det-landscape-lock .pro-det-footer-secondary {
    padding: 8px 12px;
    font-size: var(--pro-det-fs-md);
  }

  body.pro-det-landscape-lock .pro-det-footer-save {
    flex: 1;
    padding: 10px 14px;
    font-size: var(--pro-det-fs-lg);
  }

  body.pro-det-landscape-lock .pro-det-camera-drawer {
    max-height: 36vh;
    padding: var(--pro-det-gap);
  }

  body.pro-det-landscape-lock .pro-det-camera-viewport {
    max-height: 28vh;
  }

  /* ??????????4??????????????????? */
  body.pro-det-landscape-lock .pro-det-form-sheet,
  body.pro-det-landscape-lock .pro-det-form-sheet-group {
    display: block;
    grid-template-columns: none;
  }

  body.pro-det-landscape-lock .pro-det-form-row {
    grid-column: auto;
    min-height: 48px;
    padding: 8px 14px;
  }

  body.pro-det-landscape-lock .pro-det-form-label {
    min-width: 110px;
    font-size: 14px;
  }

  body.pro-det-landscape-lock .pro-det-note-block,
  body.pro-det-landscape-lock .pro-det-chip-row,
  body.pro-det-landscape-lock .pro-det-photo-section,
  body.pro-det-landscape-lock .pro-det-records,
  body.pro-det-landscape-lock .pro-det-panel-head,
  body.pro-det-landscape-lock .pro-det-video-list {
    grid-column: auto;
  }
}

@media (orientation: landscape) and (max-height: 400px) {
  body.pro-det-landscape-lock {
    --pro-det-fs: 11px;
    --pro-det-fs-md: 12px;
    --pro-det-fs-lg: 13px;
    --pro-det-fs-title: 14px;
    --pro-det-sidebar-w: 100px;
  }
}

/* ???? */
.pro-det-sanfei-side-hint {
  padding: 10px 10px 6px;
  color: #8e8e93;
  font-size: 11px;
  line-height: 1.4;
}
.pro-det-sanfei-side-title {
  font-size: 13px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 4px;
}
.pro-det-sanfei-progress {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #007aff;
  background: #edf4ff;
  border-radius: 999px;
  padding: 2px 7px;
}
.pro-det-sanfei-form {
  padding: 2px 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pro-det-sanfei-hint {
  font-size: 11px;
  color: #8e8e93;
  line-height: 1.35;
  margin: 0;
}
.pro-det-sanfei-group {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 8px 10px;
}
.pro-det-sanfei-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 6px;
}
.pro-det-sanfei-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c7c7cc;
  flex-shrink: 0;
}
.pro-det-sanfei-dot.done { background: #34c759; }
.pro-det-sanfei-segs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pro-det-sanfei-seg {
  border: 1px solid #d1d1d6;
  background: #f2f2f7;
  color: #3a3a3c;
  border-radius: 8px;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}
.pro-det-sanfei-seg.safe.active {
  background: #e8f8ee;
  border-color: #34c759;
  color: #248a3d;
}
.pro-det-sanfei-seg.problem.active {
  background: #ffeceb;
  border-color: #ff3b30;
  color: #d70015;
}
.pro-det-condition-block {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 10px;
  margin-top: 4px;
}
.pro-det-condition-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 6px;
}
.pro-det-condition-req {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #ff3b30;
  background: #fff0f0;
  border-radius: 999px;
  padding: 2px 8px;
}
.pro-det-condition-phrase-toolbar {
  margin: 6px 0 8px;
}
.pro-det-condition-add-phrase {
  border: 1px dashed #84a9ff;
  background: #eff4ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pro-det-condition-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.pro-det-condition-phrases-empty {
  font-size: 12px;
  color: #98a2b3;
  line-height: 1.4;
}
.pro-det-condition-phrase-wrap {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
}
.pro-det-condition-phrase {
  border: none;
  background: transparent;
  color: #344054;
  padding: 5px 8px 5px 10px;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  max-width: 100%;
  cursor: pointer;
}
.pro-det-condition-phrase-del {
  border: none;
  border-left: 1px solid #e4e7ec;
  background: transparent;
  color: #98a2b3;
  padding: 0 8px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.pro-det-condition-phrase-wrap:active,
.pro-det-condition-phrase:active {
  background: #eff4ff;
  color: #1d4ed8;
}
.pro-det-condition-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #101828;
  resize: vertical;
  font-family: inherit;
}
.pro-det-condition-textarea:focus {
  outline: none;
  border-color: #84a9ff;
  box-shadow: 0 0 0 3px rgba(46, 107, 217, 0.12);
}
.pro-det-condition-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #98a2b3;
  text-align: right;
}
.pro-det-panel-head.compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

@media (orientation: landscape) {
  .pro-det-sanfei-form {
    gap: 6px;
    padding-bottom: 4px;
  }
  .pro-det-sanfei-hint {
    display: none;
  }
  .pro-det-sanfei-group {
    padding: 6px 8px;
  }
  .pro-det-sanfei-label {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .pro-det-sanfei-seg {
    padding: 6px 4px;
    font-size: 12px;
  }
  .pro-det-sanfei-side-hint {
    padding: 8px 8px 4px;
    font-size: 10px;
  }
}

/* ?T?T?T ?1?C3 ?????????? ?T?T?T */
:root {
  --pro-det-brand: #3f45b5;
  --pro-det-brand-soft: #eef0ff;
  --pro-det-sidebar-bg: #eaf2ff;
}

/* ?????????????????????????? */
body.pro-det-group-form .pro-det-sidebar {
  display: none !important;
}
body.pro-det-group-form .pro-det-panel {
  border-radius: 0;
}
body.pro-det-group-form .pro-det-panel-scroll {
  padding: 0 0 72px;
  background: #fff;
}
body.pro-det-group-form .pro-det-form-sheet-group {
  margin: 0;
  border: none;
  border-radius: 0;
}
body.pro-det-group-form .pro-det-form-row {
  min-height: 54px;
  padding: 12px 16px;
}
body.pro-det-group-form .pro-det-form-label {
  min-width: 108px;
  font-size: 15px;
  font-weight: 500;
  color: #1c1c1e;
}
body.pro-det-group-form .pro-det-form-input,
body.pro-det-group-form .pro-det-form-input.pro-det-input {
  font-size: 15px;
}
body.pro-det-group-form .pro-det-panel-head.compact {
  display: none;
}

/* ????????????1/?2?? */
.pro-det-bottom-bar {
  flex-shrink: 0;
  display: none;
  padding: 10px 16px calc(10px + var(--safe-area-bottom, env(safe-area-inset-bottom, 0px)));
  background: #fff;
  border-top: 1px solid #ececf0;
}
body.pro-det-active .pro-det-bottom-bar,
.pro-detection-view.pro-det-active .pro-det-bottom-bar {
  display: block;
}
.pro-det-bottom-save {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border: none;
  background: var(--pro-det-brand, #3f45b5);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
}
.pro-det-bottom-save:active { opacity: 0.88; }

/* ?????? / ????????????????? + ??????????3?? */
body.pro-det-standard-photos .pro-det-sidebar {
  display: none !important;
}
body.pro-det-standard-photos .pro-det-panel-scroll {
  padding: 8px 8px 72px;
  background: #f3f4f8;
}
body.pro-det-standard-photos .pro-det-position-grid,
.pro-det-panel-scroll.pro-det-photo-focus .pro-det-position-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  flex: none !important;
  overflow: visible !important;
  flex-wrap: unset !important;
  align-items: stretch;
}
body.pro-det-standard-photos .pro-det-position-item,
.pro-det-panel-scroll.pro-det-photo-focus .pro-det-position-item {
  width: auto !important;
  flex: none !important;
  gap: 0;
}
body.pro-det-standard-photos .pro-det-position-slot,
.pro-det-panel-scroll.pro-det-photo-focus .pro-det-position-slot {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  border: 1px solid #e1e3ea;
  border-radius: 8px;
  background: #eceef3;
  position: relative;
}
body.pro-det-standard-photos .pro-det-position-slot.has-photo {
  border-color: var(--pro-det-brand, #3f45b5);
}
body.pro-det-standard-photos .pro-det-position-plus {
  font-size: 32px;
  color: #c5c8d2;
  font-weight: 300;
}
body.pro-det-standard-photos .pro-det-position-name,
.pro-det-panel-scroll.pro-det-photo-focus .pro-det-position-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 4px 2px;
  font-size: 10px;
  line-height: 1.2;
  color: #fff;
  background: var(--pro-det-brand, #3f45b5);
  border-radius: 0 0 7px 7px;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.pro-det-standard-photos .pro-det-position-item {
  position: relative;
}
body.pro-det-standard-photos .pro-det-position-item .pro-det-position-name {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  pointer-events: none;
}
body.pro-det-standard-photos .pro-det-position-retake {
  top: 4px;
  left: 4px;
}
body.pro-det-standard-photos .pro-det-position-del {
  top: 4px;
  right: 4px;
}

@media (max-width: 900px) {
  body.pro-det-standard-photos .pro-det-position-grid,
  .pro-det-panel-scroll.pro-det-photo-focus .pro-det-position-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  body.pro-det-standard-photos .pro-det-position-grid,
  .pro-det-panel-scroll.pro-det-photo-focus .pro-det-position-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ???????????? + ?????????2?? */
body.pro-det-landscape-lock:not(.pro-det-standard-photos):not(.pro-det-group-form) .pro-det-photo-item,
body.pro-det-landscape-lock:not(.pro-det-standard-photos):not(.pro-det-group-form) .pro-det-photo-add {
  width: var(--pro-det-thumb, 88px);
  height: var(--pro-det-thumb, 88px);
}

body.pro-det-landscape-lock .pro-det-panel-title {
  font-size: var(--pro-det-fs-title, 16px);
  font-weight: 800;
  color: #1c1c1e;
}

body.pro-det-landscape-lock .pro-det-status-pill {
  border-radius: 999px;
  border: 1px solid #d1d1d6;
  background: #fff;
  color: #636366;
  padding: 4px 12px;
  font-size: 12px;
}
body.pro-det-landscape-lock .pro-det-status-pill.normal {
  border-color: #c8cce8;
  color: var(--pro-det-brand, #3f45b5);
  background: var(--pro-det-brand-soft, #eef0ff);
}

/* ?????????????????????? */
body.pro-det-landscape-lock .pro-det-toolbar {
  padding: 4px 10px;
  min-height: 36px;
}
body.pro-det-landscape-lock .pro-det-title {
  font-size: 15px;
  font-weight: 700;
}
body.pro-det-landscape-lock .pro-det-tab {
  font-size: 13px;
  padding: 11px 14px 9px;
}

/* ????????????????????? */
.pro-det-position-slot {
  position: relative;
}
.pro-det-position-slot > .pro-det-position-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 4px 2px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  background: var(--pro-det-brand, #3f45b5);
  border-radius: 0 0 7px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
  pointer-events: none;
}

/* ??????????????? */
body.pro-det-portrait-mode .pro-det-bottom-bar {
  display: block;
}
body.pro-det-portrait-mode.pro-det-group-form .pro-det-sidebar {
  display: none !important;
}

/* ??????????????? DOM??????? */
.pro-det-bottom-bar,
.pro-det-bottom-save { display: none !important; }

/* ????????? */
.pro-det-form-ym {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  font-size: inherit;
  color: inherit;
  min-height: 40px;
  cursor: pointer;
  padding: 0;
}
.pro-det-form-ym.is-placeholder .pro-det-form-ym-label {
  color: #c7c7cc;
  font-weight: 400;
}
.pro-det-form-ym-label {
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-det-ym-mask {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pro-det-ym-sheet {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.pro-det-ym-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #ececf0;
}
.pro-det-ym-title {
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1e;
}
.pro-det-ym-cancel,
.pro-det-ym-ok {
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}
.pro-det-ym-cancel { color: #8e8e93; }
.pro-det-ym-ok { color: #3f45b5; }
.pro-det-ym-wheels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: 220px;
  padding: 8px 12px 16px;
}
.pro-det-ym-col {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #f5f6fa;
  scroll-snap-type: y mandatory;
}
.pro-det-ym-opt {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 8px;
  font-size: 16px;
  color: #3a3a3c;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: center;
}
.pro-det-ym-opt.on {
  color: #3f45b5;
  font-weight: 800;
  background: rgba(63, 69, 181, 0.1);
}

/* ?????????????? */
.pro-det-photo-retry {
  background: #ff3b30 !important;
}

/* ���Ǽ���Ƕ��Ĥ�� */
.pro-det-cover-paint {
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid #e2e5ec;
  border-radius: 12px;
  background: #f8f9fc;
}
.pro-det-cover-paint-bt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.pro-det-cover-paint-bt {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8e8ed;
  color: #3a3a3c;
}
.pro-det-cover-paint-bt.is-on {
  background: #d4edda;
  color: #1e7e34;
}
.pro-det-cover-paint-current {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.pro-det-cover-paint-part-name {
  color: #2563eb;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.pro-det-cover-paint-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-bottom: 6px;
}
.pro-det-cover-paint-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #636366;
  line-height: 1.3;
}
.pro-det-cover-paint-field.full {
  grid-column: 1 / -1;
}
.pro-det-cover-paint-field strong {
  color: #1c1c1e;
  font-size: 16px;
  font-weight: 700;
  margin-left: 0;
  transition: color 0.15s ease;
}
.pro-det-cover-paint-field strong.tone-normal,
#coverPaintJudgeText.tone-normal {
  color: #1a9f4a;
}
.pro-det-cover-paint-field strong.tone-paint,
#coverPaintJudgeText.tone-paint {
  color: #d68910;
}
.pro-det-cover-paint-field strong.tone-sheet,
#coverPaintJudgeText.tone-sheet {
  color: #c0392b;
}
.pro-det-cover-paint-tone-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 6px 0 8px;
  font-size: 11px;
  color: #636366;
}
.pro-det-cover-paint-tone-hint i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}
.pro-det-cover-paint-tone-hint i.tone-normal { background: #2ecc71; }
.pro-det-cover-paint-tone-hint i.tone-paint { background: #f5a623; }
.pro-det-cover-paint-tone-hint i.tone-sheet { background: #e74c3c; }
.pro-det-cover-paint-field em {
  font-style: normal;
  color: #8e8e93;
  font-size: 11px;
}
.pro-det-cover-paint-rule {
  display: none;
}
.pro-det-cover-paint-prog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.pro-det-cover-paint-bar {
  height: 5px;
  border-radius: 999px;
  background: #e5e5ea;
  overflow: hidden;
  margin-bottom: 6px;
}
.pro-det-cover-paint-bar i {
  display: block;
  height: 100%;
  background: #007aff;
  border-radius: 999px;
}
.pro-det-cover-paint-record-head {
  display: none;
}
.pro-det-cover-paint-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
}
.pro-det-cover-paint-cell {
  min-width: 0;
  padding: 5px 2px;
  border-radius: 4px;
  background: #f2f3f5;
  border: 1px solid #e5e5ea;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: #8e8e93;
}
.pro-det-cover-paint-cell.is-filled {
  background: #fff;
  color: #1c1c1e;
  border-color: #c7c7cc;
}
.pro-det-cover-paint-cell.is-empty {
  color: #c7c7cc;
}
.pro-det-cover-paint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pro-det-cover-paint-actions .pro-det-input {
  width: 110px;
  max-width: 40vw;
}
.pro-det-cover-paint-devices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pro-det-cover-paint-device {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.pro-det-cover-paint-device strong {
  font-size: 13px;
}
.pro-det-cover-paint-device span {
  font-size: 11px;
  color: #8e8e93;
}
.pro-det-cover-paint-probe {
  margin: 6px 0 0;
  max-height: 120px;
  overflow: auto;
  padding: 6px;
  border-radius: 6px;
  background: #111;
  color: #9fe870;
  font-size: 9px;
  line-height: 1.3;
}
.pro-det-cover-paint-probe-wrap {
  margin-top: 8px;
}
.pro-det-cover-paint-probe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #8e8e93;
}
.pro-det-btn-sm.danger {
  color: #e74c3c;
}

/* 覆盖件 / 漆面：左打点 + 右部件列表（无底部独立保存） */
.pro-det-cover-paint-legend {
  display: none;
}
.pro-det-cover-paint-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}
.pro-det-cover-paint-legend .lg-paint { background: #f5a623; }
.pro-det-cover-paint-legend .lg-sheet { background: #e74c3c; }
.pro-det-cover-paint-legend .lg-replace { background: #3498db; }

body.pro-det-cover-paint-mode .pro-det-content {
  background: #f2f3f5;
}
body.pro-det-cover-paint-mode .pro-det-sidebar {
  order: 2;
  flex: 1 1 56%;
  max-width: none;
  width: auto;
  min-width: 0;
  background: #fff;
  border-left: 1px solid #e5e5ea;
  border-right: none;
  padding: 8px 10px;
}
body.pro-det-cover-paint-mode .pro-det-panel {
  order: 1;
  flex: 0 0 34%;
  max-width: 400px;
  min-width: 240px;
  background: #f7f8fa;
}
body.pro-det-cover-paint-mode .pro-det-panel-scroll {
  padding: 10px 12px 16px;
}
body.pro-det-cover-paint-mode .pro-det-cover-paint {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
body.pro-det-cover-paint-mode .pro-det-cover-paint-current {
  margin-bottom: 0;
}
body.pro-det-cover-paint-mode .pro-det-sidebar-cat {
  display: none;
}
body.pro-det-cover-paint-mode .pro-det-sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  height: 100%;
  padding: 0;
}

.pro-det-cover-item-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 8px 10px;
}
.pro-det-cover-item-row.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}
.pro-det-cover-item-main {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.pro-det-cover-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #1c1c1e;
  margin-bottom: 6px;
}
.pro-det-cover-item-name em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}
.pro-det-cover-item-name em.kind-paint { color: #f5a623; }
.pro-det-cover-item-name em.kind-sheet { color: #e74c3c; }
.pro-det-cover-item-name em.kind-replace { color: #3498db; }
.pro-det-cover-item-name em.kind-nopart { color: #8e8e93; }
.pro-det-cover-item-name em.kind-normal { color: #2ecc71; }
.pro-det-cover-mini-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}
.pro-det-cover-mini-cell {
  display: block;
  height: 14px;
  border-radius: 2px;
  background: #ececf0;
  font-size: 8px;
  line-height: 14px;
  text-align: center;
  color: #636366;
  overflow: hidden;
  font-style: normal;
}
.pro-det-cover-mini-cell.is-filled {
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 600;
}
.pro-det-cover-mini-cell.is-filled.tone-normal {
  background: #d8f5e3;
  color: #147a38;
  border: 1px solid #2ecc71;
}
.pro-det-cover-mini-cell.is-filled.tone-paint {
  background: #fff0d6;
  color: #a66b00;
  border: 1px solid #f5a623;
}
.pro-det-cover-mini-cell.is-filled.tone-sheet {
  background: #fde0dc;
  color: #a5281b;
  border: 1px solid #e74c3c;
}
.pro-det-cover-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 112px;
}
.pro-det-cover-status-btn {
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: #3a3a3c;
  cursor: pointer;
}
.pro-det-cover-status-btn.kind-paint.is-on {
  background: #f5a623;
  border-color: #f5a623;
  color: #fff;
}
.pro-det-cover-status-btn.kind-sheet.is-on {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}
.pro-det-cover-status-btn.kind-replace.is-on {
  background: #3498db;
  border-color: #3498db;
  color: #fff;
}
.pro-det-cover-status-btn.kind-normal.is-on {
  background: #2ecc71;
  border-color: #2ecc71;
  color: #fff;
}
.pro-det-cover-status-btn.kind-nopart.is-on {
  background: #8e8e93;
  border-color: #8e8e93;
  color: #fff;
}

@media (max-width: 900px) {
  body.pro-det-cover-paint-mode .pro-det-content {
    flex-direction: column;
  }
  body.pro-det-cover-paint-mode .pro-det-panel,
  body.pro-det-cover-paint-mode .pro-det-sidebar {
    flex: 1 1 auto;
    max-width: none;
    order: 0;
  }
}

body.pro-det-portrait-mode.pro-det-cover-paint-mode .pro-det-content {
  flex-direction: column;
}
body.pro-det-portrait-mode.pro-det-cover-paint-mode .pro-det-panel,
body.pro-det-portrait-mode.pro-det-cover-paint-mode .pro-det-sidebar {
  flex: 1 1 auto;
  max-width: none;
  order: 0;
}
.pro-det-finish-progress {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(3px);
}
.pro-det-finish-progress[hidden] { display: none !important; }
.pro-det-finish-progress-card {
  width: min(82vw, 360px);
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .24);
  text-align: center;
}
.pro-det-finish-progress-card strong { display: block; color: #0784ee; font-size: 32px; }
.pro-det-finish-progress-track { height: 10px; margin: 16px 0 12px; overflow: hidden; border-radius: 999px; background: #e8f1fb; }
.pro-det-finish-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16a8ff, #087ff0); transition: width .25s ease; }
.pro-det-finish-progress-card span { color: #526174; font-size: 15px; }

@media (orientation: landscape) {
  .pro-det-condition-block,
  .pro-det-sanfei-condition-desc,
  .pro-det-condition-phrases,
  .pro-det-condition-textarea,
  .pro-det-condition-footer { display: none !important; }
}
