/* 照片修复 · 布局调整（2026-12-01 第二版）
   桌面：左栏 = 上传；右栏 = 服务 + 上色 + 说明；开始执行贴在左栏下方
   手机：单列 = 上传 → 服务/上色 → 开始执行（底部常驻）
*/

/* 服务选择（并入右栏） */
.svc-pick { margin: 0 0 14px; }
.svc-pick-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.svc-pick-opts { display: flex; flex-wrap: wrap; gap: 8px; }

.svc-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
  user-select: none;
}
.svc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.svc-opt b { font-weight: 600; }
.svc-opt:hover { border-color: rgba(15, 125, 85, .45); }
.svc-opt.is-on {
  border-color: var(--green);
  background: var(--green-l);
  color: var(--green-d);
  box-shadow: 0 0 0 3px rgba(15, 125, 85, .10);
}
.svc-opt.is-on::after { content: "✓"; font-size: 12px; color: var(--green); margin-left: 2px; }

/* 桌面：栅格分区 */
@media (min-width: 861px) {
  body.page-repair .studio-grid {
    grid-template-columns: 1.12fr .88fr;
    align-items: start;
    column-gap: 22px;
    row-gap: 0;
  }
  body.page-repair .studio-grid > .panel-input { grid-column: 1; grid-row: 1; }
  body.page-repair .studio-grid > .panel-checkout { grid-column: 2; grid-row: 1 / span 2; }
  body.page-repair .studio-grid > .start-bar { grid-column: 1; grid-row: 2; margin-top: 16px; }
  body.page-repair .start-bar .start-btn { margin: 0; }
}

/* 手机：单列，开始执行常驻底部 */
.start-bar .start-btn { width: 100%; margin: 0; }

@media (max-width: 860px) {
  body.page-repair .studio-grid { display: flex; flex-direction: column; gap: 14px; }
  body.page-repair .start-bar {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 30;
    padding: 10px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 34%);
  }
  .svc-opt { padding: 8px 13px; font-size: 13.5px; }
}

/* ---- v3 覆盖 ---- */
/* 照片修复 · 布局修正 v3（手机单列满宽 + 服务按钮紧凑） */
@media (max-width: 860px) {
  body.page-repair .studio-grid { display: flex !important; flex-direction: column !important; gap: 14px !important; }
  body.page-repair .studio-grid > * {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  body.page-repair .start-bar {
    position: sticky;
    bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 30;
    padding: 10px 0 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 40%);
  }
  body.page-repair .start-bar .start-btn { width: 100% !important; }

  .svc-pick-opts { gap: 8px; }
  .svc-opt { padding: 8px 14px; font-size: 13.5px; }
}

/* 免费徽标：改成跟随内容，不再压住标题 */

@media (max-width: 860px) {
  
}

/* ---- v5 统一按钮 ---- */
/* 服务 / 上色 四颗按钮：统一尺寸与样式，规整 2×2 */
body.page-repair .panel-checkout .svc-pick,
body.page-repair .panel-checkout .tone-row,
body.page-repair .panel-checkout .opt-wrap {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
}

body.page-repair .panel-checkout .opt-wrap {
  grid-template-columns: minmax(0, 1fr) !important;
  display: block !important;
}

body.page-repair .panel-checkout .svc-pick-label,
body.page-repair .panel-checkout .tone-label {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  line-height: 1.2;
  white-space: nowrap;
}

body.page-repair .panel-checkout .svc-pick-opts,
body.page-repair .panel-checkout .tone-opts {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

/* 四颗按钮完全一致 */
body.page-repair .panel-checkout .svc-opt,
body.page-repair .panel-checkout .tone-opt {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 999px !important;
  background: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: var(--ink-2) !important;
  box-shadow: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

body.page-repair .panel-checkout .svc-opt:hover,
body.page-repair .panel-checkout .tone-opt:hover {
  border-color: rgba(15, 125, 85, .45) !important;
}

/* 选中态一致 */
body.page-repair .panel-checkout .svc-opt.is-on,
body.page-repair .panel-checkout .tone-opt.is-active {
  border-color: var(--green) !important;
  background: var(--green-l) !important;
  color: var(--green-d) !important;
  box-shadow: 0 0 0 3px rgba(15, 125, 85, .10) !important;
}

body.page-repair .panel-checkout .svc-opt.is-on::after,
body.page-repair .panel-checkout .tone-opt.is-active::after {
  content: "✓";
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
  color: var(--green);
  line-height: 1;
}

@media (max-width: 860px) {
  body.page-repair .panel-checkout .svc-pick,
  body.page-repair .panel-checkout .tone-row {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }
  body.page-repair .panel-checkout .svc-opt,
  body.page-repair .panel-checkout .tone-opt {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 13px !important;
    padding: 0 6px !important;
  }
}

/* 彻底隐藏原生 radio 圆点 */
body.page-repair .panel-checkout .svc-opt input[type="radio"],
body.page-repair .panel-checkout .svc-opt input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
