/* ============================================================
   交付自查 — Self-check view
   ============================================================ */

/* Top-level wrap (hidden by default) */
.selfcheck-view {
  padding: 0;
}
.selfcheck-view .sc-tabs {
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}
.selfcheck-view .sc-tab {
  padding: 14px 4px; font-size: 13px; cursor: pointer;
  border-bottom: 2px solid transparent; color: var(--text-muted);
  transition: color .2s;
}
.selfcheck-view .sc-tab.active {
  color: var(--text); font-weight: 600; border-bottom-color: var(--accent);
}
.selfcheck-view .sc-tab:hover { color: var(--text); }

.sc-panel { display: none; padding: 28px 24px 80px; }
.sc-panel.active { display: block; }

/* Panel header */
.sc-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 20px; flex-wrap: wrap;
}
.sc-head-text h2 {
  font-size: 22px; font-weight: 600; margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.sc-head-text p {
  font-size: 13px; color: var(--text-muted); margin: 0;
  max-width: 640px; line-height: 1.6;
}

/* Buttons & toggles */
.sc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 12px; font-weight: 500;
  background: var(--accent); color: #000;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: inherit; transition: opacity .2s, transform .1s;
}
.sc-btn:hover { opacity: 0.9; }
.sc-btn:active { transform: translateY(1px); }
.sc-btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.sc-btn.ghost:hover { border-color: var(--text-muted); }
.sc-btn input[type=file] { display: none; }

.sc-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.sc-toolbar .sc-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted); cursor: pointer;
  user-select: none;
}
.sc-toolbar .sc-toggle input { accent-color: var(--accent); }

/* ========== Panel 1: 平台预览 ========== */
.sc-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.sc-platform-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sc-platform-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sc-platform-head .name {
  font-size: 13px; font-weight: 600;
}
.sc-platform-head .ratio {
  font-size: 11px; color: var(--text-muted);
}
.sc-stage {
  position: relative;
  background: #000;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sc-stage::before {
  content: ""; display: block; padding-top: var(--ratio, 177.78%);
}
.sc-stage > .sc-stage-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.sc-stage img.sc-userimg {
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
  object-fit: cover;
}
.sc-stage .sc-empty {
  color: rgba(255,255,255,0.35); font-size: 12px;
  text-align: center; padding: 0 16px; line-height: 1.6;
}

/* Safe-zone heatmap overlay */
.sc-safezone {
  position: absolute; inset: 0;
  pointer-events: none;
  display: none;
  mix-blend-mode: normal;
}
.sc-safezone.on { display: block; }
.sc-safezone .zone {
  position: absolute;
  background: rgba(255, 70, 70, 0.32);
  outline: 1px dashed rgba(255, 120, 120, 0.6);
}

/* Platform UI overlays */
.sc-ui {
  position: absolute; inset: 0;
  pointer-events: none;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

/* ---- 小红书 video ---- */
.xhs-ui .top-bar-x {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent);
}
.xhs-ui .top-bar-x .tabs {
  display: flex; gap: 16px; font-size: 14px; font-weight: 500;
}
.xhs-ui .top-bar-x .tabs .t { opacity: 0.6; }
.xhs-ui .top-bar-x .tabs .t.active { opacity: 1; position: relative; }
.xhs-ui .top-bar-x .tabs .t.active::after {
  content: ""; position: absolute; left: 25%; right: 25%; bottom: -4px;
  height: 2px; background: #fff; border-radius: 2px;
}
.xhs-ui .top-bar-x .icons { display: flex; gap: 12px; font-size: 16px; opacity: 0.95; }
.xhs-ui .right-actions {
  position: absolute; right: 10px; bottom: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.xhs-ui .right-actions .ava {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #ff8a3d, #ff2442);
  border: 2px solid #fff;
}
.xhs-ui .right-actions .act {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 11px; opacity: 0.95;
}
.xhs-ui .right-actions .act .ico {
  font-size: 24px; line-height: 1;
}
.xhs-ui .bottom-info {
  position: absolute; left: 0; right: 60px; bottom: 70px;
  padding: 0 14px; font-size: 13px;
}
.xhs-ui .bottom-info .name {
  font-weight: 600; margin-bottom: 4px; opacity: 0.95;
}
.xhs-ui .bottom-info .caption {
  font-size: 12px; opacity: 0.85; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.xhs-ui .progress {
  position: absolute; left: 14px; right: 14px; bottom: 56px;
  height: 2px; background: rgba(255,255,255,0.2); border-radius: 2px;
}
.xhs-ui .progress::before {
  content: ""; display: block; height: 100%; width: 38%;
  background: #fff; border-radius: 2px;
}
.xhs-ui .tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 50px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  display: flex; align-items: center; justify-content: space-around;
  font-size: 11px;
}
.xhs-ui .tabbar .t { opacity: 0.85; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.xhs-ui .tabbar .plus {
  width: 30px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #ff2442, #ff8a3d);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
}

/* ---- 视频号 ---- */
.wx-ui .top-bar-x {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent);
  font-size: 13px;
}
.wx-ui .top-bar-x .left { display: flex; gap: 14px; opacity: 0.95; }
.wx-ui .top-bar-x .left .t { opacity: 0.6; font-weight: 500; }
.wx-ui .top-bar-x .left .t.active { opacity: 1; font-weight: 600; }
.wx-ui .top-bar-x .icons { display: flex; gap: 14px; opacity: 0.95; }
.wx-ui .right-actions {
  position: absolute; right: 10px; bottom: 100px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.wx-ui .right-actions .ava {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #07c160, #2ba0e6);
  border: 1.5px solid #fff;
}
.wx-ui .right-actions .act {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 11px; opacity: 0.95;
}
.wx-ui .right-actions .act .ico { font-size: 24px; line-height: 1; }
.wx-ui .bottom-info {
  position: absolute; left: 0; right: 64px; bottom: 30px;
  padding: 0 14px; font-size: 13px;
}
.wx-ui .bottom-info .name { font-weight: 600; margin-bottom: 4px; }
.wx-ui .bottom-info .caption {
  font-size: 12px; opacity: 0.85; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wx-ui .pill-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.18);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; margin-top: 8px;
  backdrop-filter: blur(6px);
}

/* ---- 抖音 ---- */
.dy-ui .top-bar-x {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent);
}
.dy-ui .top-bar-x .tabs {
  display: flex; gap: 16px; font-size: 14px;
}
.dy-ui .top-bar-x .tabs .t { opacity: 0.6; font-weight: 500; }
.dy-ui .top-bar-x .tabs .t.active { opacity: 1; font-weight: 600; }
.dy-ui .top-bar-x .tabs .t.active::after {
  content: ""; display: block; height: 2px; width: 60%;
  margin: 3px auto 0; background: #fff; border-radius: 2px;
}
.dy-ui .top-bar-x .search {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #fff;
}
.dy-ui .right-actions {
  position: absolute; right: 8px; bottom: 100px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.dy-ui .right-actions .ava {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  border: 2px solid #fff; position: relative;
}
.dy-ui .right-actions .ava::after {
  content: "+"; position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: #fe2c55; color: #fff; font-size: 14px; line-height: 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.dy-ui .right-actions .act {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 11px; font-weight: 600;
}
.dy-ui .right-actions .act .ico { font-size: 28px; line-height: 1; }
.dy-ui .bottom-info {
  position: absolute; left: 0; right: 70px; bottom: 60px;
  padding: 0 14px;
}
.dy-ui .bottom-info .name {
  font-weight: 700; font-size: 14px; margin-bottom: 4px;
}
.dy-ui .bottom-info .caption {
  font-size: 12px; opacity: 0.92; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dy-ui .bottom-info .music {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; opacity: 0.85; margin-top: 6px;
}
.dy-ui .progress {
  position: absolute; left: 0; right: 0; bottom: 44px;
  height: 2px; background: rgba(255,255,255,0.25);
}
.dy-ui .progress::before {
  content: ""; display: block; height: 100%; width: 28%; background: #fff;
}
.dy-ui .tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 44px;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: space-around;
  font-size: 11px; font-weight: 500;
}
.dy-ui .tabbar .t { opacity: 0.6; }
.dy-ui .tabbar .t.active { opacity: 1; }
.dy-ui .tabbar .plus {
  width: 36px; height: 22px; border-radius: 6px;
  background: linear-gradient(90deg, #25f4ee, #fff, #fe2c55);
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 18px; font-weight: 800;
}

/* ========== Panel 2: 封面对比（小红书发现页） ========== */
.sc-cover-stage {
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 420px;
  margin: 0 auto;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}
.sc-cover-stage .xhs-top {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 14px 10px; background: #fff;
  font-size: 14px; font-weight: 500;
}
.sc-cover-stage .xhs-top .t { color: #999; }
.sc-cover-stage .xhs-top .t.active { color: #222; font-weight: 700; position: relative; }
.sc-cover-stage .xhs-top .t.active::after {
  content: ""; position: absolute; left: 30%; right: 30%; bottom: -8px;
  height: 3px; background: #ff2442; border-radius: 2px;
}
.sc-cover-stage .xhs-top .spacer { flex: 1; }
.sc-cover-stage .xhs-top .ico { font-size: 16px; color: #444; }
.sc-cover-stage .xhs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  background: #f5f5f5;
}
.sc-cover-stage .xhs-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  break-inside: avoid;
}
.sc-cover-stage .xhs-cover {
  width: 100%;
  background: #ddd center/cover no-repeat;
  position: relative;
}
.sc-cover-stage .xhs-cover.placeholder {
  background: linear-gradient(135deg, #e8e8e8, #d4d4d4);
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 11px;
}
.sc-cover-stage .xhs-cover-edit {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.5); color: #fff;
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  cursor: pointer; backdrop-filter: blur(4px);
  pointer-events: auto;
}
.sc-cover-stage .xhs-meta {
  padding: 8px 10px 10px;
}
.sc-cover-stage .xhs-title {
  font-size: 13px; line-height: 1.35; color: #222;
  font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  outline: none;
  cursor: text;
  word-break: break-word;
}
.sc-cover-stage .xhs-title[contenteditable="true"]:empty::before {
  content: "点击输入标题";
  color: #bbb;
}
.sc-cover-stage .xhs-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.sc-cover-stage .xhs-author {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #888;
}
.sc-cover-stage .xhs-author .ava {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, #ff8a3d, #ff2442);
}
.sc-cover-stage .xhs-likes {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; color: #888;
}

/* upload row */
.sc-uploads {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.sc-upload-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 11px; color: var(--text-muted);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.sc-upload-slot:hover { border-color: var(--accent); color: var(--text); }
.sc-upload-slot.has-img {
  border-style: solid; border-color: var(--border);
  background-size: cover; background-position: center;
}
.sc-upload-slot .slot-num {
  position: absolute; top: 4px; left: 6px;
  font-size: 10px; padding: 1px 6px;
  background: rgba(0,0,0,0.55); border-radius: 999px;
  color: #fff;
}
.sc-upload-slot .slot-clear {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  display: none; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; cursor: pointer;
}
.sc-upload-slot.has-img .slot-clear { display: flex; }
.sc-upload-slot input { display: none; }

/* responsive */
@media (max-width: 900px) {
  .sc-platforms { grid-template-columns: 1fr; }
  .sc-uploads { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .sc-uploads { grid-template-columns: repeat(2, 1fr); }
  .sc-panel { padding: 20px 14px 60px; }
  .selfcheck-view .sc-tabs { padding: 0 14px; gap: 20px; }
}
