/* ============================================================
 * editor.css — 编辑器界面
 * ============================================================ */

:root {
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #7c8798;
  --line: #e5e9ef;
  --line-2: #eef1f5;
  --bg: #f7f8fa;
  --bg-2: #eef1f5;
  --accent: #1f4e79;
  --accent-dark: #173b5c;
  --accent-soft: #eaf1f8;
  --radius: 10px;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------------- 应用骨架 ---------------- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: none;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; flex: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 16px; height: 16px; }
.brand-text { font-size: 14.5px; letter-spacing: .3px; }
.tb-sep { width: 1px; height: 22px; background: var(--line); flex: none; }
.tb-spacer { flex: 1; }

.tpl-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex: none;
  transition: .16s;
}
.tpl-picker:hover { border-color: #c6d2df; background: #fbfcfd; }
.tp-label { font-size: 12px; color: var(--ink-3); }
.tpl-picker strong { font-size: 13.5px; font-weight: 600; }
.tp-caret { font-size: 10px; color: var(--ink-3); }

.accents { display: flex; gap: 5px; align-items: center; flex: none; }
.swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dfe4ea;
  cursor: pointer;
  padding: 0;
  transition: .15s;
}
.swatch:hover { transform: scale(1.12); }
.swatch.active { box-shadow: 0 0 0 2px var(--accent); }
.swatch.more {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--ink-3); font-size: 11px; line-height: 1;
  position: relative; overflow: hidden;
}
.swatch.more input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; border: 0; padding: 0;
}

.save-state { font-size: 12px; color: var(--ink-3); white-space: nowrap; margin-right: 2px; }

.zoom {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  background: #fff;
}
.zoom button {
  width: 28px; height: 100%;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.zoom button:hover { background: var(--bg-2); }
.zoom span {
  min-width: 46px; text-align: center;
  font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.zoom .zoom-fit { width: auto; padding: 0 9px; font-size: 12px; border-left: 1px solid var(--line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 12px;
  border-radius: 7px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: .16s; white-space: nowrap;
}
.btn.sm { height: 32px; padding: 0 12px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { background: #fff; border-color: #d9e0e8; color: var(--ink); }
.btn.ghost:hover { background: #f7f9fb; border-color: #c3cfdb; }
.tb-acts { display: flex; gap: 7px; flex: none; }

.icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  cursor: pointer; color: var(--ink-2); font-size: 12px; flex: none;
}
.icon-btn:hover { background: var(--bg-2); }

/* ---------------- 工作区 ---------------- */
.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ---- 左：表单 ---- */
.form-panel {
  width: 432px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
}
.panel-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .5px;
}
.panel-head-acts { display: flex; gap: 12px; }
.link-btn {
  border: 0; background: none; cursor: pointer;
  font-size: 12.5px; color: var(--ink-3); padding: 0;
}
.link-btn:hover { color: var(--accent); text-decoration: underline; }

.form-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 80px;
  scrollbar-width: thin;
}
.form-body::-webkit-scrollbar { width: 10px; }
.form-body::-webkit-scrollbar-thumb { background: #d8dfe8; border-radius: 6px; border: 3px solid #fff; }

/* ---- 表单板块 ---- */
.fsec {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}
.fsec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 8px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line-2);
}
.fsec.collapsed .fsec-head { border-bottom-color: transparent; }
.fsec.collapsed .fsec-body { display: none; }

.chev {
  width: 22px; height: 22px;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 11px; line-height: 1;
  transition: transform .18s;
  flex: none;
}
.fsec.collapsed .chev { transform: rotate(-90deg); }

.sec-name {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  font-family: inherit;
}
.sec-name:hover { border-color: var(--line); }
.sec-name.static {
  border-color: transparent;
  cursor: default;
  padding: 3px 6px;
  font-weight: 600;
  font-size: 13.5px;
}
.sec-name.static:hover { border-color: transparent; }
.sec-name:focus {
  outline: none;
  border-color: #9dc0e0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 78, 121, .08);
}

.fsec-body { padding: 10px; }

/* 开关 */
.switch { position: relative; width: 32px; height: 18px; flex: none; cursor: pointer; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0;
  background: #d9e0e8; border-radius: 999px;
  transition: .18s; pointer-events: none;
}
.switch i::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: .18s;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .2);
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); }

/* 字段网格 */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: span 2; }
.lbl { font-size: 11.5px; color: var(--ink-3); padding-left: 1px; }

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 62px; line-height: 1.65; }
.field input::placeholder,
.field textarea::placeholder { color: #b4bcc7; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #7fa8ce;
  box-shadow: 0 0 0 3px rgba(31, 78, 121, .09);
}

/* 条目卡片 */
.item-card {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fafbfc;
  padding: 8px 9px 10px;
  margin-bottom: 8px;
}
.item-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  height: 20px;
}
.item-idx {
  font-size: 11px;
  color: #9aa4b1;
  font-variant-numeric: tabular-nums;
  background: #eef1f5;
  border-radius: 4px;
  padding: 0 5px;
  line-height: 18px;
}
.item-acts { display: flex; gap: 3px; opacity: .55; transition: opacity .15s; }
.item-card:hover .item-acts { opacity: 1; }
.mini {
  width: 22px; height: 20px;
  border: 1px solid transparent;
  background: none; border-radius: 5px;
  cursor: pointer; color: var(--ink-2);
  font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.mini:hover:not(:disabled) { background: #fff; border-color: var(--line); }
.mini:disabled { opacity: .3; cursor: default; }
.mini.danger:hover { color: #c0392b; border-color: #f0c9c4; background: #fdf3f2; }

.add-item {
  width: 100%;
  border: 1px dashed #d3dce6;
  background: #fff;
  border-radius: 7px;
  height: 32px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: .15s;
}
.add-item:hover { border-color: #9dc0e0; color: var(--accent); background: #f8fbfe; }

/* 添加板块 */
.fsec-add { background: #fbfcfd; }
.fsec-add .fsec-head { border-bottom: 0; padding-bottom: 4px; }
.fsec-add .fsec-head h3 { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 12px; }
.chip {
  border: 1px solid #dde4ec;
  background: #fff;
  border-radius: 999px;
  height: 28px;
  padding: 0 11px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: .15s;
}
.chip:hover { border-color: #9dc0e0; color: var(--accent); background: #f6fafd; }

/* 基本信息里的头像 */
.avatar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar-preview {
  width: 40px; height: 50px;
  border-radius: 6px;
  background: #eef1f5;
  object-fit: cover;
  display: block;
}
.avatar-preview.ph {
  display: flex; align-items: center; justify-content: center;
  color: #b3bdc9; font-size: 17px; font-weight: 300;
  border: 1px dashed #dbe2ea;
  background: #f7f9fb;
}
.avatar-actions { display: flex; gap: 6px; }

/* ---- 右：预览 ---- */
.preview-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #eceff3;
}
.preview-toolbar {
  flex: none;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid #e1e6ec;
  background: #f6f8fa;
  font-size: 12px;
  color: var(--ink-2);
}
.pt-sep { width: 1px; height: 14px; background: #dbe1e8; }
.pt-hint { color: var(--ink-3); }
.pt-hint.dim { margin-left: auto; font-size: 11.5px; }
.pt-spacer { flex: 1; }
.page-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  color: #2f7d4f;
  background: #eaf6ee;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.page-info b { font-weight: 600; }
.page-info span { font-weight: 400; opacity: .8; }
.page-info i { font-style: normal; opacity: .5; margin-left: -2px; }
.page-info:hover { border-color: currentColor; }
.page-info.warn { color: #a35f13; background: #fdf3e5; }
.page-info.low { color: var(--ink-2); background: #eef2f7; }

/* ---------------- 超页处理面板 ---------------- */
.preview-pane { position: relative; }

.fit-pop {
  position: absolute;
  top: 48px;
  left: 16px;
  width: 384px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 86px);
  overflow: auto;
  padding: 14px 14px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16, 32, 64, .16);
  z-index: 30;
}
.fit-head { display: flex; align-items: flex-start; gap: 10px; }
.fit-head > div { flex: 1; min-width: 0; }
.fit-head strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.fit-sub { margin-top: 3px; font-size: 12px; line-height: 1.55; color: var(--ink-3); }
.fit-block { margin-top: 15px; }
.fit-lbl {
  margin-bottom: 7px;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .3px;
}
.fit-now { color: var(--ink-2); }

.dens-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.dens-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.dens-opt b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.dens-opt span { font-size: 11px; color: var(--ink-3); }
.dens-opt:hover { border-color: #c3cdd9; }
.dens-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.dens-opt.on b { color: var(--accent-dark); }

.fit-list { display: flex; flex-direction: column; gap: 6px; }
.fit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  background: #fcfdfe;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.fit-item:hover { background: #fff; border-color: #c3cdd9; }
.fit-item-txt { flex: 1; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.fit-item-save {
  flex: none;
  padding: 1px 6px;
  font-size: 11px;
  color: #a35f13;
  background: #fdf3e5;
  border-radius: 4px;
  white-space: nowrap;
}
.fit-note {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #7a4c14;
  background: #fdf6ec;
  border: 1px solid #f0e0c4;
  border-radius: 7px;
}
.fit-empty { font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.fit-foot { margin-top: 14px; }
.fit-foot .btn { width: 100%; justify-content: center; }

/* 建议项定位后的高亮 */
.item-card.flash,
.fsec.flash {
  animation: cvFlash 1.9s ease;
}
@keyframes cvFlash {
  0%, 40% {
    box-shadow: 0 0 0 2px #f0b429;
    background: #fffaf0;
  }
  100% {
    box-shadow: 0 0 0 2px rgba(240, 180, 41, 0);
    background: transparent;
  }
}

.preview-stage {
  flex: 1;
  overflow: auto;
  padding: 26px 28px 60px;
  background-image: radial-gradient(#d9dfe7 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
}
.scaler-box { position: relative; margin: 0 auto; }
.doc-scaler { position: absolute; top: 0; left: 0; transform-origin: top left; }
.doc-scaler .doc { box-shadow: none; }
.doc-scaler .page {
  box-shadow: 0 6px 28px rgba(16, 32, 64, .16), 0 0 0 1px rgba(16, 32, 64, .04);
}

/* ---------------- 模态框 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
}
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .48); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(16, 24, 40, .3);
}
.modal-card.narrow { width: min(520px, 100%); }
.modal-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; }
.modal-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.modal-body { padding: 18px; overflow: auto; background: #f4f6f9; }
.modal-body.plain { background: #fff; padding: 20px 22px 22px; }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tpl-opt {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
  transition: .16s;
  display: block;
  width: 100%;
}
.tpl-opt:hover { border-color: #b7cadb; box-shadow: 0 6px 18px rgba(16, 32, 64, .09); }
.tpl-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 78, 121, .1); }
.tpl-opt .thumb-inner {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(16, 32, 64, .1);
  margin-bottom: 9px;
}
.tpl-opt .thumb-inner > .doc {
  position: absolute; top: 0; left: 0;
  transform-origin: top left;
  gap: 0;
}
.tpl-opt-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 2px; }
.tpl-opt-meta strong { font-size: 13px; }
.tpl-opt-meta span { font-size: 11.5px; color: var(--ink-3); }
.tpl-opt .check {
  display: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.tpl-opt.active .check { display: inline; }

/* 打印说明 */
.print-warn {
  margin-bottom: 14px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #7a4c14;
  background: #fdf6ec;
  border: 1px solid #f0e0c4;
  border-radius: 8px;
}
.print-warn b { color: #8a5a12; }
.print-steps { counter-reset: ps; display: grid; gap: 9px; }.print-steps li {
  counter-increment: ps;
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.print-steps li::before {
  content: counter(ps);
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.print-steps strong { color: var(--ink); }
.print-tip { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.print-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  background: rgba(16, 24, 40, .9);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .25);
  max-width: 80vw;
}
.toast[hidden] { display: none; }

/* ---------------- 移动端 ---------------- */
.mobile-tabs { display: none; }

@media (max-width: 980px) {
  .form-panel { width: 380px; }
  .accents { display: none; }
  .pt-hint.dim { display: none; }
}

@media (max-width: 820px) {
  .topbar { gap: 6px; padding: 0 8px; }
  .brand-text, .tp-label, .save-state { display: none; }
  .zoom { display: none; }
  .btn.sm { padding: 0 9px; font-size: 12.5px; }
  .tpl-picker { padding: 0 8px; gap: 5px; min-width: 0; }
  .tpl-picker strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace { position: relative; min-width: 0; }
  .form-panel { width: 100%; border-right: 0; }
  .preview-pane { display: none; }
  body.show-preview .form-panel { display: none; }
  body.show-preview .preview-pane { display: flex; }
  .mobile-tabs {
    display: flex;
    flex: none;
    height: 54px;
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .mobile-tabs button {
    flex: 1;
    border: 0;
    background: none;
    font-size: 13.5px;
    color: var(--ink-3);
    cursor: pointer;
  }
  .mobile-tabs button.active { color: var(--accent); font-weight: 600; }
  .preview-toolbar { padding: 0 12px; }
  .preview-stage { padding: 16px 12px 40px; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  #importBtn, #exportBtn { display: none; }
  .fields { gap: 7px; }
  .fsec-body { padding: 8px; }
  .form-body { padding: 10px 10px 70px; }
}

/* ---------------- 打印 ---------------- */
@media print {
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .topbar, .form-panel, .preview-toolbar, .toast, .modal, .mobile-tabs,
  .fit-pop { display: none !important; }
  .app { display: block !important; height: auto !important; overflow: visible !important; }
  .workspace { display: block !important; }
  .preview-pane {
    display: block !important;
    background: #fff !important;
    height: auto !important;
  }
  .preview-stage {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    background-image: none !important;
  }
  .scaler-box {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
  .doc-scaler {
    position: static !important;
    transform: none !important;
  }
  .doc-scaler .page { box-shadow: none !important; }
}

/* 56 套模板弹窗：缩略图未渲染时先占位，保证懒渲染的滚动区间正确 */
.tpl-opt .thumb-inner:empty {
  min-height: 200px;
  background: linear-gradient(100deg, #f4f6f9 30%, #eef1f6 50%, #f4f6f9 70%);
  background-size: 220% 100%;
  animation: thumb-shimmer 1.3s ease-in-out infinite;
}
@media (min-width: 1280px) {
  .modal-card .tpl-grid { grid-template-columns: repeat(4, 1fr); }
}
@keyframes thumb-shimmer {
  from { background-position: 120% 0; }
  to   { background-position: -20% 0; }
}
