.tools-main { max-width: 980px; margin: 0 auto; padding: 24px 20px 60px; }
.tools-main h1 { font-size: 26px; margin: 18px 0 8px; text-align: center; }
.tools-sub { color: var(--muted); font-size: 13.5px; text-align: center; margin-bottom: 22px; }

.tool-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.tool-tab {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer;
}
.tool-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.tool-panel.hidden { display: none; }

.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 130px; border: 2px dashed var(--line); border-radius: 12px;
  cursor: pointer; text-align: center; padding: 20px;
}
.drop-zone.hover { border-color: var(--accent); background: #f2fbf8; }
.drop-zone b { font-size: 15px; }
.drop-zone span { color: var(--muted); font-size: 12.5px; }
.drop-zone img { max-width: 100%; max-height: 220px; border-radius: 8px; }

.opts { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 14px; font-size: 13.5px; }
.opts label { display: inline-flex; align-items: center; gap: 6px; color: #4a5b55; }
.opts select, .opts input[type="text"], .opts input:not([type]) {
  height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit;
}
.opts input#wmText { width: 180px; }
.opts input[type="color"] { width: 38px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumb {
  position: relative; width: 76px; height: 76px; cursor: grab;
  border-radius: 8px; overflow: hidden; border: 1px solid var(--line);
}
.thumb.dragging { opacity: .4; }
.thumb.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.thumb-no {
  position: absolute; left: 4px; top: 4px;
  min-width: 18px; height: 18px; line-height: 18px; padding: 0 4px;
  border-radius: 9px; background: rgba(15,47,39,.75); color: #fff;
  font-size: 11px; text-align: center;
}

.result { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.result[hidden] { display: none; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.result img { width: 100%; border-radius: 10px; display: block; }

.tools-note { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .tools-main h1 { font-size: 22px; }
  .opts { gap: 10px; }
  .tool-tab { padding: 7px 14px; font-size: 13px; }
}

/* 拼图预览编辑 */
.collage-stage { margin-top: 16px; }
.collage-stage[hidden] { display: none; }
.collage-stage canvas {
  width: 100%; max-width: 720px; display: block; margin: 0 auto;
  border-radius: 10px; background: #f4f6f5; cursor: grab; touch-action: none;
}
.collage-stage canvas:active { cursor: grabbing; }
.collage-hint { margin-top: 8px; text-align: center; color: var(--muted); font-size: 12.5px; }

.collage-tools {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; margin-top: 12px; font-size: 13px;
}
.collage-tools .ghost { height: 30px; padding: 0 12px; }
.collage-tip { color: var(--muted); }
.collage-zoom { min-width: 52px; text-align: center; color: var(--accent); font-weight: 600; }
.collage-stage canvas.zoomable { cursor: grab; }
