/* J17：工具台 · 买家秀（六宫格）。复用 tools_cutout.css(.tc-*) + tools_scene.css(.ts-*)。 */

.tb-boards {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

@media (max-width: 900px) {
  .tb-boards { grid-template-columns: 1fr; }
}

.tb-drop { min-height: 160px; }

.tb-count {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--brand-soft, rgba(113,220,104,.14));
  color: var(--brand-strong, #5BC85A);
  font-size: 12px;
  font-weight: 600;
}

.tb-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.tb-thumb {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f9fafb;
}

.tb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.tb-thumb .tb-src {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1px 4px;
  background: rgba(17, 24, 39, 0.6);
  color: #fff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tb-grid img {
  max-width: 100%;
  max-height: 620px;
  border-radius: 6px;
}

.tb-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.tb-tiles .tc-img-box {
  flex-direction: column;
  gap: 6px;
}

.tb-tiles a {
  color: var(--brand-strong, #5BC85A);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}

/* M27-B2：三段式版式（左窄操作 + 中任务队列 + 右本次结果缩略图），照 .rf-layout 写法搬。
   红线：不动现有 .tb-* / .tc-* / .ts-* 基础定义，只追加新规则；其他引用本 CSS 的页面
   （精修 / 主图换场景 等）不主动加 .tb-layout 时不受影响，等各自卡片改造时再加。 */
.tb-three-col {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: start;
  margin-top: 22px;
}
.tb-three-col .tb-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.tb-three-col .tb-left .tb-boards {
  grid-template-columns: 1fr;       /* 在左栏里两块上传卡上下排（覆盖默认 1.15fr 1fr） */
  gap: 10px;
}
.tb-three-col .tb-left .tc-drop {
  min-height: 96px;
  max-height: 120px;
  padding: 8px 10px;
  gap: 4px;
  overflow: hidden;
}
.tb-three-col .tb-left .tc-drop-icon { font-size: 1.2rem; }
.tb-three-col .tb-left .tc-drop-title { font-size: 13px; line-height: 1.3; }
.tb-three-col .tb-left .tc-drop-hint { font-size: 11px; line-height: 1.45; }
.tb-three-col .tb-left .tc-preview { max-height: 90px; margin-bottom: 4px; }
.tb-three-col .tb-left .tc-result { padding: 12px; gap: 8px; }
.tb-three-col .tb-left .tc-go {
  position: sticky;
  bottom: 8px;
  z-index: 1;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06);
}
.tb-three-col .tb-mid { min-width: 0; }
.tb-three-col .tb-side {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: hidden;
}
.tb-three-col .tb-side-head {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.tb-three-col .tb-side-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.tb-three-col .tb-side-empty {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  padding: 18px 4px;
  line-height: 1.6;
}
.tb-three-col .tb-side-thumb {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: border-color 120ms ease;
}
.tb-three-col .tb-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tb-three-col .tb-side-thumb:hover { border-color: var(--brand-line, #A9EFA4); }
.tb-three-col .tb-side-thumb.is-active {
  border-color: var(--brand-strong, #5BC85A);
  box-shadow: 0 0 0 2px var(--brand-soft, rgba(113,220,104,.30));
}
.tb-three-col .tb-side-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.tb-three-col .tb-export {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: var(--brand, #71DC68);
  color: var(--brand-ink, #14331B);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tb-three-col .tb-export:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}
.tb-three-col .tb-export:not(:disabled):hover { background: var(--brand-strong, #5BC85A); }

@media (max-width: 1200px) {
  .tb-three-col { grid-template-columns: 300px minmax(0, 1fr); }
  .tb-three-col .tb-side { display: none; } /* 收两列时右列折叠（B2/B3 右列是缩略图，不是主结果） */
}
@media (max-width: 900px) {
  .tb-three-col { grid-template-columns: 1fr; }
  .tb-three-col .tb-left .tc-drop { max-height: 200px; }
  .tb-three-col .tb-left .tc-go { position: static; box-shadow: none; }
}
