/**
 * Manage · PC 宽屏布局
 * 大气：宽版面、主从分栏、少装饰
 */
:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #f5f5f5;
  --card: #ffffff;
  --accent: #14532d;
  --accent-hover: #166534;
  --accent-soft: #f0fdf4;
  --danger: #b91c1c;
  --radius: 6px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --page-pad: 32px 40px 56px;
  --sidebar-w: 232px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body.mg-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* —— 宽屏页面壳 —— */
.mg-page {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: var(--page-pad);
}
.mg-page-fluid {
  max-width: none;
  padding: 28px 32px 48px;
}

.mg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.mg-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mg-head-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* —— 按钮 —— */
.mg-btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  font: inherit; font-size: 13px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.mg-btn-primary { background: var(--accent); color: #fff !important; }
.mg-btn-primary:hover { background: var(--accent-hover); color: #fff !important; }
.mg-btn-ghost {
  background: #fff; color: var(--ink-2) !important; border: 1px solid var(--line);
}
.mg-btn-ghost:hover { border-color: #9ca3af; color: var(--ink) !important; }
.mg-btn-danger {
  background: #fff; color: var(--danger) !important; border: 1px solid #fecaca;
}
.mg-btn-danger:hover { background: #fef2f2; }
.mg-btn-text { background: transparent; color: var(--accent) !important; height: auto; padding: 0; }
.mg-btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.mg-btn-xs { height: 28px; padding: 0 10px; font-size: 12px; }
.mg-btn-lg { height: 44px; padding: 0 28px; font-size: 14px; }

/* —— 表单 —— */
.mg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.mg-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px 20px; }
.mg-field label {
  display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px;
}
.mg-field label .req, .mg-req, .mg-body .layui-form-label .req {
  color: var(--danger); margin-left: 2px;
}
.mg-field input, .mg-field textarea, .mg-field select, .mg-input, .mg-textarea {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 12px; font: inherit; font-size: 14px; background: #fff; outline: none; color: var(--ink);
}
.mg-field textarea, .mg-textarea {
  height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.55;
}
.mg-field input:focus, .mg-field textarea:focus, .mg-field select:focus, .mg-input:focus {
  border-color: var(--accent);
}
.mg-field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.mg-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.mg-field-head label { margin-bottom: 0; }

.mg-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.mg-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.mg-section-title {
  margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--ink);
}

/* —— Layui —— */
.mg-body .layui-form-label {
  width: 100px; padding: 9px 12px; color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.mg-body .layui-input-block { margin-left: 130px; }
.mg-body .layui-input, .mg-body .layui-textarea {
  border-radius: var(--radius) !important; border-color: var(--line) !important; height: 38px;
}
.mg-body .layui-textarea { height: auto; min-height: 88px; }
.mg-body .layui-input:focus, .mg-body .layui-textarea:focus { border-color: var(--accent) !important; }
.mg-body .layui-btn {
  background: var(--accent); border: 0; border-radius: var(--radius);
  font-weight: 500; height: 36px; line-height: 36px; box-shadow: none;
}
.mg-body .layui-btn:hover { background: var(--accent-hover); }
.mg-body .layui-btn-primary { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.mg-body .layui-btn-danger { background: var(--danger); }
.mg-body .layui-btn-normal { background: #1f2937; }
.mg-body .layui-btn-warm { background: #92400e; }
.mg-body .layui-btn-sm { height: 32px; line-height: 32px; }
.mg-body .layui-btn-xs { height: 26px; line-height: 26px; padding: 0 8px; border-radius: 4px; }
.mg-body .layui-table-view {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff;
}
.mg-body table.layui-table {
  background: #fff;
  border: 1px solid var(--line);
}
.mg-body .layui-table th { background: #fafafa !important; color: var(--muted); font-weight: 500; font-size: 12px; }
.mg-body .layui-elem-field { border: 0; margin: 0 0 8px; }
.mg-body .layui-elem-field legend {
  margin: 0; padding: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--ink); border: 0;
}
.mg-body .layui-form-mid.layui-word-aux { display: none !important; }

.mg-search {
  height: 36px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 14px; font: inherit; background: #fff; outline: none; color: var(--ink);
}
.mg-search:focus { border-color: var(--accent); }

.mg-alert {
  border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 20px; display: none;
}
.mg-alert-warn { display: block; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.mg-muted { color: var(--muted); font-size: 13px; }
.mg-empty {
  text-align: center; padding: 72px 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
}
.mg-empty h3 { margin: 0 0 16px; font-size: 15px; color: var(--ink); font-weight: 500; }

.mg-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 4px; font-size: 11px; font-weight: 500;
}
.mg-pill-on { background: var(--accent-soft); color: var(--accent); }
.mg-pill-off { background: #fef2f2; color: var(--danger); }
.mg-pill-queue { background: #fffbeb; color: #92400e; }
.mg-pill-run { background: #eff6ff; color: #1d4ed8; }
.mg-pill-done { background: var(--accent-soft); color: var(--accent); }
.mg-pill-fail { background: #fef2f2; color: var(--danger); }
.mg-pill-idle { background: #f3f4f6; color: var(--muted); }

.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mg-chip {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink-2);
}
.mg-chip:hover { border-color: var(--accent); color: var(--accent); }
.mg-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.mg-chip-add {
  border-style: dashed; color: var(--accent); border-color: var(--accent);
  background: var(--accent-soft);
}
.mg-chip-add:hover { background: #fff; }
.mg-chip-selected { font-size: 13px; color: var(--accent); font-weight: 500; margin: 0 0 12px; min-height: 18px; }

.mg-range { display: flex; align-items: center; gap: 10px; }
.mg-range span { color: var(--muted); flex-shrink: 0; font-size: 13px; }

.mg-size-group { margin: 0 0 12px; }
.mg-size-group:last-child { margin-bottom: 0; }
.mg-size-group em {
  display: block; font-style: normal; font-size: 12px; color: var(--muted);
  margin: 0 0 6px; font-weight: 500;
}
.mg-size-group .mg-chips { margin: 0; }
.mg-size-group .mg-chip { height: 30px; padding: 0 12px; font-size: 12px; }

.mg-check {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; font-size: 14px; color: var(--ink-2);
  cursor: pointer; user-select: none;
}
.mg-check input[type="checkbox"],
.mg-field input[type="checkbox"] {
  width: 16px; height: 16px; padding: 0; margin: 0;
  flex-shrink: 0; accent-color: var(--accent); cursor: pointer;
}

.mg-adv { margin-top: 8px; }
.mg-adv summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  list-style: none;
  user-select: none;
}
.mg-adv summary:hover { color: var(--ink); }
.mg-adv summary::-webkit-details-marker { display: none; }
.mg-adv-ico {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
  margin-top: -3px;
  flex-shrink: 0;
}
.mg-adv[open] summary { color: var(--ink); }
.mg-adv[open] .mg-adv-ico {
  transform: rotate(225deg);
  margin-top: 3px;
}

.mg-del-box .warn {
  background: #fef2f2; border: 1px solid #fecaca; color: var(--danger);
  border-radius: var(--radius); padding: 12px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 16px;
}
.mg-del-box label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.mg-del-box input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; font: inherit;
}

/* ========== 登录：PC 左右对开 ========== */
.mg-login-body {
  margin: 0; min-height: 100vh; display: grid;
  grid-template-columns: minmax(420px, 46vw) 1fr;
  font-family: var(--font);
}
.mg-login-visual {
  background: #0a1f14; color: #fff; padding: 72px 64px;
  display: flex; flex-direction: column;
}
.mg-login-brand {
  margin: 0; font-size: 48px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.15;
  flex-shrink: 0;
}
.mg-login-logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 32px 0;
}
.mg-login-logo {
  display: block;
  width: min(360px, 86%);
  height: auto;
  max-height: 220px;
  object-fit: contain;
}
.mg-login-tag {
  margin: 0; font-size: 15px; color: rgba(255,255,255,.45); line-height: 1.7; max-width: 320px;
  flex-shrink: 0;
}
.mg-login-panel {
  display: flex; align-items: center; justify-content: center; background: #fff; padding: 64px;
}
.mg-login-box { width: 100%; max-width: 360px; }
.mg-login-box h2 { margin: 0 0 40px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.mg-login-box .mg-field { margin-bottom: 22px; }
.mg-login-box .mg-btn { width: 100%; height: 44px; margin-top: 8px; font-size: 14px; }

.ad-login-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #0b1c2e;
}
.ad-login-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 900px) {
  .mg-login-body.ad-login { grid-template-columns: 1fr; }
  .ad-login-hero { min-height: 0; height: 28vh; }
}

/* ========== 一键开站：左表单 + 右摘要 ========== */
.mg-wiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.mg-wiz-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 36px;
  min-height: 560px;
}
.mg-wiz-side {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 24px;
}
.mg-wiz-side h3 {
  margin: 0 0 20px; font-size: 14px; font-weight: 600; color: var(--ink);
}
.mg-wiz-meta {
  list-style: none; margin: 0; padding: 0;
}
.mg-wiz-meta li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.mg-wiz-meta li:last-child { border-bottom: 0; }
.mg-wiz-meta .k { color: var(--muted); flex-shrink: 0; }
.mg-wiz-meta .v {
  color: var(--ink); font-weight: 500; text-align: right;
  word-break: break-all;
}
.mg-wiz-side .mg-btn { width: 100%; margin-top: 24px; }
.mg-wiz-tabs {
  display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; margin-bottom: 20px;
}
.mg-wiz-tab {
  height: 36px; padding: 0 20px; border: 0; background: transparent;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
}
.mg-wiz-tab + .mg-wiz-tab { border-left: 1px solid var(--line); }
.mg-wiz-tab.on { background: var(--accent); color: #fff; }

.mg-progress-wrap { display: none; }
.mg-progress-wrap.on { display: block; }
.mg-job {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.mg-job:last-child { border-bottom: 0; }
.mg-progress-bar { height: 2px; background: var(--line); margin-top: 10px; grid-column: 1 / -1; }
.mg-progress-bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }

/* ========== 客户列表：KPI + 表格式主从 ========== */
.mg-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.mg-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.mg-kpi .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.mg-kpi .value { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }

.mg-toolbar {
  display: flex; gap: 10px; align-items: center; margin-bottom: 16px;
}
.mg-toolbar .mg-search { flex: 1; max-width: 420px; }

/* 站点矩阵：统计 + 搜索同一行 */
.mg-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-wrap: wrap;
}
.mg-kpi-inline {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}
.mg-kpi-i {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 20px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.mg-kpi-i:first-child { padding-left: 4px; }
.mg-kpi-i:last-child { border-right: 0; }
.mg-kpi-i .label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.mg-kpi-i b {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.mg-filter-bar .mg-toolbar {
  flex: 0 0 auto;
  margin: 0;
}
.mg-filter-bar .mg-search {
  width: 240px;
  max-width: 240px;
  flex: none;
}

.mg-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}
.mg-block-hd {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 120px 140px 80px 100px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}
.mg-block-hd .name { font-size: 15px; font-weight: 600; color: var(--ink); }
.mg-block-hd .cell { font-size: 13px; color: var(--muted); }
.mg-block-hd .actions {
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}

.mg-site-table { width: 100%; border-collapse: collapse; }
.mg-site-table th {
  text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff;
}
.mg-site-table td {
  padding: 14px 16px; border-bottom: 1px solid #f3f4f6;
  font-size: 13px; color: var(--ink-2); vertical-align: middle;
}
.mg-site-table tr:last-child td { border-bottom: 0; }
.mg-site-table tr:hover td { background: #fafafa; }
.mg-site-table .site-name { font-weight: 600; color: var(--ink); }
.mg-site-table .url { color: var(--muted); font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-site-table .ops { white-space: nowrap; text-align: right; }
.mg-site-table .ops .mg-btn { margin-left: 4px; }
.mg-site-table .theme-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mg-block-empty {
  padding: 28px; text-align: center; color: var(--muted); font-size: 13px;
}

/* ========== 系统参数：双栏分区 ========== */
.mg-form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.mg-form-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 28px 20px;
}
.mg-form-panel.span-2 { grid-column: 1 / -1; }
.mg-form-panel h3 {
  margin: 0 0 20px; font-size: 14px; font-weight: 600; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.mg-form-actions {
  grid-column: 1 / -1;
  display: flex; justify-content: flex-end;
  padding-top: 8px;
}

/* ========== 列表页工具条 ========== */
.mg-list-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mg-list-bar .left, .mg-list-bar .right {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .mg-wiz-layout { grid-template-columns: 1fr; }
  .mg-wiz-side { position: static; }
  .mg-form-layout { grid-template-columns: 1fr; }
  .mg-block-hd {
    grid-template-columns: 1fr 1fr;
  }
  .mg-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

#editor-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
#editor-toolbar { border-bottom: 1px solid var(--line); }
#editor-text { height: 380px; overflow-y: auto; }
.thumb-preview { max-width: 160px; max-height: 90px; margin-top: 10px; display: block; border-radius: 6px; }

.mg-theme-lead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.mg-theme-lead strong { color: var(--ink); font-weight: 600; }
.mg-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1040px;
}
.mg-theme-shot {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.mg-theme-shot:hover {
  border-color: #d1d5db;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .06);
}
.mg-theme-shot.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.mg-theme-shot .cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #eef2f0;
}
.mg-theme-shot .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mg-theme-shot .cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}
.mg-theme-shot .body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.mg-theme-shot h2 { margin: 0; font-size: 16px; font-weight: 600; }
.mg-theme-shot .desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.mg-theme-shot .body-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mg-theme-shot .meta { font-size: 12px; color: var(--muted); margin-top: 0; }

/* ========== AI作图 ========== */
.mg-img-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.mg-img-form, .mg-img-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 28px 24px;
}
.mg-img-form h3, .mg-img-side h3 {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.mg-img-form .mg-field { margin-bottom: 16px; }
.mg-img-form .mg-chips { margin: 0 0 16px; }
.mg-img-form .mg-size-group .mg-chips { margin: 0; }
.mg-img-side { position: sticky; top: 24px; min-height: 420px; }
.mg-img-preview img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #eef2f0;
}
.mg-img-placeholder {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  background: #fafafa;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.mg-img-placeholder.run { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.mg-img-placeholder.fail { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.mg-img-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}
.mg-img-meta .k, .mg-img-card .k { color: var(--muted); font-size: 12px; }
.mg-img-prompt {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  max-height: 4.8em;
  overflow: hidden;
}
.mg-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.mg-img-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.mg-img-card img, .mg-img-card .ph {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #eef2f0;
}
.mg-img-card .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}
.mg-img-card .body { padding: 14px 16px 16px; }
.mg-img-card .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mg-img-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  max-height: 3.1em;
  overflow: hidden;
}
.mg-img-card .meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.mg-img-card .ops { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-art-result .t {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}
.mg-art-result .s {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}
.mg-img-pane[hidden] { display: none !important; }
.mg-head .mg-wiz-tabs { margin-bottom: 0; }

@media (max-width: 1100px) {
  .mg-img-layout { grid-template-columns: 1fr; }
  .mg-img-side { position: static; }
}
