/* 图片/GIF 工具箱 —— 沿用 app.css 主题，补充编辑器专属布局 */

.editor-workspace {
  grid-template-columns: 258px minmax(0, 1fr) 340px;
}

/* 左：工具导航 */
.tool-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.tool-nav button {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 12.5px;
  text-align: left; cursor: pointer; transition: .14s;
}
.tool-nav button:hover { background: #f2f6fe; color: var(--ink); }
.tool-nav button.active { background: var(--accent-soft); color: #2b4d9c; font-weight: 600; }
.tool-nav button .ico {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border-radius: 7px; background: #eef2fb; font-size: 13px;
}
.tool-nav button.active .ico { background: #dbe6ff; }

/* 帧缩略图条 */
.frame-strip {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 240px; overflow-y: auto; padding: 4px 2px;
}
.frame-empty { font-size: 12px; color: var(--muted); padding: 8px 2px; }
.frame-thumb {
  position: relative; width: 74px; border: 1.5px solid var(--line);
  border-radius: 8px; padding: 0; overflow: hidden; background: #f2f5fb;
  cursor: pointer; transition: .14s;
}
.frame-thumb:hover { border-color: #b7caf3; }
.frame-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.frame-thumb canvas { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.frame-thumb .f-idx {
  position: absolute; left: 0; top: 0; background: rgba(17,24,39,.6); color: #fff;
  font-size: 9px; padding: 0 4px; border-radius: 0 0 6px 0;
}
.frame-thumb .f-del {
  position: absolute; right: 0; bottom: 0; background: rgba(229,72,77,.86); color: #fff;
  width: 18px; height: 18px; border: 0; border-radius: 7px 0 0 0;
  font-size: 12px; line-height: 1; cursor: pointer; display: none;
}
.frame-thumb:hover .f-del { display: block; }

/* 中：预览 */
#preview { max-width: 100%; max-height: 66vh; display: none; }
#preview.show { display: block; width: 100%; max-width: 620px; height: auto; }
.transport input[type=range] { flex: 1; accent-color: var(--accent); }

/* 右：参数区 */
.param-body { display: flex; flex-direction: column; gap: 10px; }
.param-body .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.param-body .field > span { display: flex; justify-content: space-between; gap: 8px; }
.param-body .field > span b { color: var(--ink); font-weight: 600; }
.param-body input[type=range] { width: 100%; accent-color: var(--accent); }
.param-body input[type=text],
.param-body input[type=number],
.param-body select,
.param-body textarea {
  width: 100%; padding: 7px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); box-sizing: border-box;
}
.param-body input:focus, .param-body select:focus, .param-body textarea:focus {
  outline: 2px solid rgba(47,109,246,.28); outline-offset: 1px;
}
.param-body input[type=color] {
  width: 40px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.p-row { display: flex; gap: 8px; align-items: center; }
.p-row > * { flex: 1; min-width: 0; }
.p-row .grow { flex: 2; }
.param-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.param-actions .primary-btn { width: auto; margin: 0; padding: 9px 18px; flex: 1 1 auto; }
.param-actions .ghost-btn { width: auto; margin: 0; padding: 8px 14px; flex: 1 1 auto; }
.param-sec-title { font-size: 11px; color: #9aa3b5; text-transform: uppercase; letter-spacing: .4px; margin: 6px 0 2px; }
.param-note { font-size: 11px; color: #97a0b2; margin: 4px 0 0; line-height: 1.5; }

.check-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.check-line input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

.range-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.color-row { display: flex; align-items: center; gap: 8px; }

/* 响应式 */
@media (max-width: 1180px) {
  .editor-workspace { grid-template-columns: 240px minmax(0, 1fr); }
  .panel-params { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .editor-workspace { grid-template-columns: 1fr; }
}