@charset "UTF-8";
/* Stitch page — 拼接专属：预览舞台 / 排序条 / 背景控件；其余复用 compress.css */
/* ── 预览舞台 ── */
.stitch-stage {
  margin-top: 20px;
  border: 1px solid #eceae4;
  border-radius: 16px;
  background: linear-gradient(45deg, rgba(28, 28, 28, 0.03) 25%, transparent 25%, transparent 75%, rgba(28, 28, 28, 0.03) 75%), linear-gradient(45deg, rgba(28, 28, 28, 0.03) 25%, transparent 25%, transparent 75%, rgba(28, 28, 28, 0.03) 75%), #fcfbf8;
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
}

.stitch-stage__canvas {
  max-width: 100%;
  max-height: 62vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(28, 28, 28, 0.1);
  cursor: zoom-in;
}
.stitch-stage__canvas:not([hidden]) {
  display: block;
}

/* 1:1 查缝视图：取消缩放限制，舞台变滚动容器 */
.stitch-stage.is-zoom {
  display: block;
  overflow: auto;
  max-height: 72vh;
  padding: 12px;
}
.stitch-stage.is-zoom .stitch-stage__canvas {
  cursor: zoom-out;
  max-width: none;
  max-height: none;
  box-shadow: none;
}

.stitch-stage__placeholder {
  text-align: center;
  color: rgba(28, 28, 28, 0.62);
  font-size: 14px;
  line-height: 1.7;
}
.stitch-stage__placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.5;
  margin-bottom: 10px;
}

.stitch-stage__dims {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  color: #5f5f5d;
  letter-spacing: 0.01em;
  min-height: 1em;
  /* 宫格有空格时的警示态 */
}
.stitch-stage__dims.is-warn {
  color: #b91c1c;
}

/* 导出体积预估：比 dims 更轻一级 */
.stitch-stage__est {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  color: rgba(28, 28, 28, 0.62);
  min-height: 0;
}

/* ── 缩略图排序条 ── */
.stitch-strip {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.stitch-strip:empty {
  display: none;
}

.stitch-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dcd8cc;
  background: #f1eee6;
  cursor: grab;
}
.stitch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stitch-thumb {
  /* 拖拽换位：源项半透明，目标侧品牌色插入线 */
}
.stitch-thumb.is-dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.stitch-thumb.drop-before::before, .stitch-thumb.drop-after::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: #1c1c1c;
  z-index: 2;
}
.stitch-thumb.drop-before::before {
  left: 0;
}
.stitch-thumb.drop-after::after {
  right: 0;
}
.stitch-thumb:focus-visible {
  outline: 2px solid rgba(28, 28, 28, 0.55);
  outline-offset: 2px;
}

.stitch-thumb__idx {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(28, 28, 28, 0.78);
  color: #fcfbf8;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.stitch-thumb__tools {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 3px;
  background: linear-gradient(to top, rgba(28, 28, 28, 0.66), transparent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.stitch-thumb:hover .stitch-thumb__tools,
.stitch-thumb:focus-within .stitch-thumb__tools {
  opacity: 1;
  transform: translateY(0);
}

/* 触屏无 hover：工具条常显（半透明），否则手机上无法旋转/排序/移除 */
@media (hover: none) {
  .stitch-thumb__tools {
    opacity: 0.85;
    transform: none;
  }
}
.stitch-thumb__btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 5px;
  background: rgba(252, 251, 248, 0.92);
  color: #1c1c1c;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.stitch-thumb__btn:hover:not(:disabled) {
  background: #fff;
}
.stitch-thumb__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.stitch-thumb__btn.is-danger:hover {
  background: #b91c1c;
  color: #fff;
}

.stitch-strip__hint {
  font-size: 12px;
  color: rgba(28, 28, 28, 0.62);
  margin-left: 4px;
}

/* ── 背景色控件 ── */
.stitch-bg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.stitch-color-wrap {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stitch-color-wrap.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.stitch-color {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 1px solid #dcd8cc;
  border-radius: 7px;
  background: #f7f4ed;
  cursor: pointer;
}

.stitch-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #5f5f5d;
  cursor: pointer;
  user-select: none;
}
.stitch-check input {
  width: 15px;
  height: 15px;
  accent-color: #1c1c1c;
  cursor: pointer;
}
.stitch-check {
  /* 禁用态（导出 JPEG 时锁定透明背景）：降低对比 + 禁用光标，明确传达不可交互 */
}
.stitch-check:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
  user-select: none;
}
.stitch-check:has(input:disabled) input {
  cursor: not-allowed;
}

/* ── 数字输入行（自包含，不依赖 resize.css） ── */
.st-dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  /* display:flex 会覆盖 UA 的 [hidden]{display:none}，需显式补回 */
}
.st-dim-row[hidden] {
  display: none;
}
.st-dim-row + .st-dim-row {
  margin-top: 10px;
}

/* 自定义行列行：两个窄输入框 + × 分隔，不给整行拉满 */
.st-dim-row--custom .st-input-wrap {
  flex: 0 1 86px;
}

.st-grid-x {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(28, 28, 28, 0.62);
}

.st-dim-row > label {
  flex: 0 0 auto;
  font-size: 13px;
  color: #5f5f5d;
  min-width: 60px;
}

.st-input-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.st-input {
  width: 100%;
  padding: 9px 38px 9px 12px;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  color: #1c1c1c;
  background: #f7f4ed;
  border: 1px solid #dcd8cc;
  border-radius: 8px;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -moz-appearance: textfield;
  appearance: textfield;
}
.st-input::-webkit-outer-spin-button, .st-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.st-input:focus {
  outline: none;
  border-color: rgba(28, 28, 28, 0.45);
  box-shadow: 0 0 0 3px rgba(28, 28, 28, 0.06);
}

.st-unit {
  position: absolute;
  right: 12px;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  color: rgba(28, 28, 28, 0.62);
  pointer-events: none;
}

/* stitch 质量分组禁用态 */
#st-quality-group.is-disabled {
  opacity: 0.5;
}

/* ── 智能宫格「自动」按钮 ── */
.st-auto-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 12px;
  color: #5f5f5d;
  background: #f1eee6;
  border: 1px solid #dcd8cc;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.st-auto-btn:hover {
  color: #1c1c1c;
  background: #e8e5dc;
}

/* ── 风格预设 chips ── */
.st-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.st-preset-chip {
  padding: 6px 12px;
  font-size: 12px;
  color: #5f5f5d;
  background: #f1eee6;
  border: 1px solid #eceae4;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.st-preset-chip:hover {
  color: #1c1c1c;
  border-color: #dcd8cc;
  background: #e8e5dc;
}
.st-preset-chip.is-on {
  color: #1c1c1c;
  font-weight: 600;
  background: #f7f4ed;
  border-color: rgba(28, 28, 28, 0.45);
}

/* 透明缝隙发布提醒：弱化为脚注式提示 */
.st-bg-tip {
  color: #9a3412;
}

/*# sourceMappingURL=stitch.css.map */
