/* ============================================================
 * M4 运镜预设库（assets.html 新增区块）
 * 浅蓝白体系，零深色；仅新增 .m4-* 命名空间
 * ============================================================ */
.m4-wrap { margin-bottom: 22px; }
.m4-card {
  background: #fff; border: 1px solid rgba(56,189,248,.16);
  border-radius: 16px; padding: 18px;
  box-shadow: 0 6px 22px rgba(29,33,41,.08);
}
.m4-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.m4-head h2 { font-size: 16px; font-weight: 700; color: #1d2129; }
.m4-head .m4-tag { background: #e6f4ff; color: #1d2129; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.m4-sub { font-size: 13px; color: #606266; line-height: 1.7; margin-bottom: 14px; }

.m4-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .m4-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .m4-grid { grid-template-columns: 1fr; } }

.m4-item {
  border: 1px solid #f5f7fa; border-radius: 13px; padding: 13px 14px;
  background: linear-gradient(160deg, #ffffff 0%, #F2F8FE 100%);
  display: flex; flex-direction: column; gap: 7px; transition: box-shadow .18s, transform .18s;
}
.m4-item:hover { box-shadow: 0 8px 20px rgba(91,138,200,.16); transform: translateY(-2px); }
.m4-item-top { display: flex; align-items: center; gap: 8px; }
.m4-ic {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px;
  background: linear-gradient(135deg, #38BDF8, #38BDF8); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.m4-name { font-weight: 700; font-size: 14px; color: #1d2129; }
.m4-en { font-size: 12px; color: #909399; margin-left: 2px; }
.m4-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.m4-chip {
  font-size: 12px; border-radius: 999px; padding: 2px 9px;
  background: #e6f4ff; color: #1d2129; border: 1px solid #f5f7fa;
}
.m4-chip.slow { background: #E8F1FC; }
.m4-chip.fast { background: #DCE9FA; font-weight: 600; }
.m4-scene { font-size: 12px; color: #606266; line-height: 1.55; }
.m4-prompt {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; color: #1d2129; background: #e6f4ff;
  border-radius: 8px; padding: 7px 9px; line-height: 1.5;
  word-break: break-word;
}
.m4-ops { display: flex; gap: 7px; margin-top: auto; padding-top: 4px; }
.m4-btn {
  flex: 1; text-align: center; cursor: pointer; border: 0; border-radius: 8px;
  padding: 6px 8px; font-size: 12px; font-weight: 600; transition: filter .15s, background .15s;
}
.m4-btn-copy { background: #e6f4ff; color: #1d2129; }
.m4-btn-copy:hover { background: #DFEBF9; }
.m4-btn-save { background: linear-gradient(90deg,#38BDF8,#38BDF8); color: #fff; }
.m4-btn-save:hover { filter: brightness(1.07); }

/* 我的预设 */
.m4-mine-sec { margin-top: 18px; border-top: 1px dashed #C9DCF3; padding-top: 14px; }
.m4-mine-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.m4-mine-head h3 { font-size: 14px; font-weight: 700; color: #1d2129; }
.m4-minelist { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
@media (max-width: 900px) { .m4-minelist { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .m4-minelist { grid-template-columns: 1fr; } }
.m4-mine-item {
  border: 1px solid #f5f7fa; border-radius: 12px; padding: 11px 12px; background: #ffffff;
}
.m4-mine-item .nm { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.m4-mine-item .pp { font-size: 12px; color: #606266; font-family: ui-monospace,Menlo,monospace; word-break: break-word; margin-bottom: 8px; line-height: 1.5; }
.m4-mine-empty { text-align: center; color: #909399; font-size: 13px; padding: 18px; }

/* 弹窗 */
.m4-mask { position: fixed; inset: 0; background: rgba(30,42,58,.35); z-index: 120; display: flex; align-items: center; justify-content: center; }
.m4-modal { background: #fff; border-radius: 16px; padding: 22px; width: min(480px, 94vw); box-shadow: 0 20px 60px rgba(29,33,41,.22); }
.m4-modal h3 { font-size: 16px; margin-bottom: 4px; }
.m4-modal .m4-hint { font-size: 12px; color: #606266; line-height: 1.6; margin: 6px 0 12px; }
.m4-lbl { display: block; font-size: 13px; color: #606266; margin: 10px 0 5px; }
.m4-inp {
  width: 100%; padding: 9px 12px; border: 1px solid #f5f7fa; border-radius: 12px;
  font-size: 13px; outline: none; background: #ffffff;
}
.m4-inp:focus { border-color: #38BDF8; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
textarea.m4-inp { resize: vertical; }
.m4-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.m4-toast {
  position: fixed; top: 16px; right: 16px; z-index: 3000;
  background: #fff; color: #1d2129; border: 1px solid #f5f7fa;
  padding: 10px 16px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(29,33,41,.18);
  opacity: 0; transform: translateY(-6px); transition: all .2s;
  border-left: 3px solid #38BDF8;
}
.m4-toast.ok { border-left-color: #38BDF8; }
.m4-toast.err { border-left-color: #f53f3f; color: #f53f3f; }
.m4-toast.show { opacity: 1; transform: translateY(0); }
.m4-mine-form { background: #F4F9FE; border: 1px dashed #B9D3F0; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
