* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

.header {
  background: #1a73e8;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 18px; font-weight: 600; cursor: pointer; }
.header .sub { font-size: 12px; opacity: .8; cursor: pointer; }

.container { padding: 16px; max-width: 600px; margin: 0 auto; }

/* 步骤1：类型选择 */
.step-welcome { text-align: center; padding: 40px 20px 24px; }
.step-welcome .icon { font-size: 56px; margin-bottom: 12px; }
.step-welcome .title { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.step-welcome .desc { font-size: 14px; color: #999; }

.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.type-btn {
  padding: 24px 12px;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  font-size: 15px;
  font-weight: 500;
}
.type-btn:active { transform: scale(.97); }
.type-btn .icon { font-size: 36px; display: block; margin-bottom: 8px; }
.type-btn.delivery:active, .type-btn.delivery.selected { border-color: #34a853; background: #e6f4ea; }
.type-btn.outstock:active, .type-btn.outstock.selected { border-color: #f9ab00; background: #fef7e0; }
.type-btn.after_sale:active, .type-btn.after_sale.selected { border-color: #ea4335; background: #fce8e6; }
.type-btn.return:active, .type-btn.return.selected { border-color: #9334e6; background: #f3e8fd; }

/* 步骤2：拍照 */
.camera-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
}
.camera-header .label { font-size: 17px; font-weight: 600; text-align: center; }
.camera-header .label { font-size: 17px; font-weight: 600; flex: 1; }

.camera-area {
  aspect-ratio: 16/9; max-height: 85vh;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-area video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera-area .placeholder {
  color: #666;
  text-align: center;
  padding: 40px 20px;
}
.camera-area .placeholder .big-icon { font-size: 56px; margin-bottom: 12px; }

.capture-row {
  justify-content: center !important;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.capture-btn {
  width:72px;height:72px;border-radius:50%;
  border:5px solid #1a73e8;
  background:rgba(26,115,232,.15);color:#1a73e8;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:transform .2s;
}
.capture-btn:disabled{opacity:.5;}
.capture-btn:active:not(:disabled){transform:scale(.92);}
.capture-btn .icon{font-size:32px;}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.thumb-item {
  aspect-ratio: 1/1;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #eee;
  border: 2px solid transparent;
}
.thumb-item.active { border-color: #1a73e8; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item .count-badge {
  position: absolute; top: 3px; right: 3px;
  background: #1a73e8; color: #fff;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.thumb-item.empty {
  border: 2px dashed #ddd;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 24px;
}

.submit-bar {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.submit-btn {
  flex: 1; padding: 14px;
  border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.submit-btn.primary { background: #34a853; color: #fff; }
.submit-btn.primary:disabled { opacity: .5; }
.submit-btn.reset { background: #f0f0f0; color: #666; }
.submit-btn:active { transform: scale(.97); }

.note-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; margin-bottom: 12px;
  font-family: inherit; box-sizing: border-box;
}
.note-input:focus { outline: none; border-color: #1a73e8; }

/* 记录列表 */
.section-title {
  font-size: 15px; font-weight: 600; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px; color: #555;
}
.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-card {
  background: #fff; border-radius: 10px; padding: 12px;
  display: flex; gap: 12px; align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  cursor: pointer; transition: all .2s;
}
.record-card:active { transform: scale(.98); }
.record-card .cover {
  width: 60px; height: 60px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0; background: #eee;
}
.record-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.record-card .info { flex: 1; min-width: 0; }
.record-card .info .title { font-size: 14px; font-weight: 600; }
.record-card .info .meta { font-size: 12px; color: #888; margin-top: 2px; }
.record-card .info .note { font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-card .count-badge {
  background: #e8f0fe; color: #1a73e8;
  font-size: 12px; padding: 3px 8px; border-radius: 10px; flex-shrink: 0;
}

/* 大图弹窗 */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.9); z-index: 999;
  flex-direction: column;
}
.modal.show { display: flex; }
.modal .close {
  position: absolute; top: 14px; right: 16px;
  font-size: 28px; color: #fff; background: none; border: none; cursor: pointer; z-index: 10;
}
.modal .nav-area {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 40px 20px;
}
.modal .nav-area .main-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.modal .nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.2); color: #fff; border: none;
  width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer;
}
.modal .nav-arrow.prev { left: 10px; }
.modal .nav-arrow.next { right: 10px; }
.modal .modal-footer {
  padding: 14px 20px; text-align: center; color: #ccc;
  font-size: 13px; display: flex; gap: 10px; justify-content: center;
}

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #323232; color: #fff;
  padding: 10px 24px; border-radius: 8px; font-size: 14px;
  opacity: 0; transition: all .3s; z-index: 9999; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty-state { text-align: center; color: #999; padding: 30px 20px; font-size: 14px; }
