.cm-gap { margin-bottom: 14px; }
.cm-gap-top { margin-top: 16px; }
.cm-count { margin: 0 0 8px 2px; }

.cm-date { width: 54px; flex: none; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; text-align: center; background: #fff; align-self: flex-start; }
.cm-date b { display: block; font-size: 20px; line-height: 1.2; padding-top: 6px; }
.cm-date span { display: block; background: var(--sunk); color: var(--ink2); font-size: 12px; font-weight: 600; padding: 2px 0; }
.cm-notice { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.cm-notice .chev { align-self: center; }
.cm-snippet { color: var(--ink3); font-size: 14px; line-height: 1.5; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 72ch; }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.cm-meta .tag { display: inline-flex; align-items: center; gap: 4px; }
.cm-meta .tag .ico { width: 13px; height: 13px; }
.cm-thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--sunk); border: 1px solid var(--rule); display: grid; place-items: center; color: var(--ink3); align-self: center; }
.cm-thumb.pdf { background: var(--red-wash); color: var(--red); font-size: 12px; font-weight: 700; border-color: #EBC9C4; }

.cm-editor .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.cm-switch-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer; background: var(--ground); }
.cm-switch-row b { display: block; font-weight: 600; font-size: 15px; }
.cm-switch-row span.small { display: block; }
.cm-attach { margin-bottom: 0; }
.cm-attach .drop { padding: 30px 18px; }
.cm-attach.over .cm-file { border-color: var(--board); background: var(--board-wash); }
.cm-attach.has-err .drop, .cm-attach.has-err .cm-file { border-color: var(--red); }
.cm-file { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.cm-file.has-img { flex-wrap: wrap; }
.cm-file-img { display: block; width: 100%; border-radius: 8px; overflow: hidden; background: var(--sunk); border: 1px solid var(--rule); }
.cm-file-img img { width: 100%; max-height: 320px; object-fit: contain; background: #fff; }
.cm-file.has-img > .grow { flex: 1 1 0; }
.cm-file-pdf { width: 56px; height: 56px; border-radius: 8px; background: var(--red-wash); color: var(--red); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.cm-file-name { font-size: 14.5px; color: var(--ink2); overflow-wrap: anywhere; font-weight: 600; }
.cm-file-acts { margin-top: 8px; gap: 8px; }
.cm-file-acts label.btn { cursor: pointer; }
.cm-actions { margin-top: 18px; }

.cm-design .section-title:first-child { margin-top: 0; }
.cm-design .section-title { align-items: center; min-height: 34px; }
.cm-tpls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cm-tpl { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.cm-tpl:hover { border-color: var(--rule2); box-shadow: var(--shadow); }
.cm-tpl.on { border-color: var(--board); box-shadow: 0 0 0 1.5px var(--board); }
.cm-tpl-pick { display: flex; flex-direction: column; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; flex: 1; width: 100%; }
.cm-tpl-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunk); border-bottom: 1px solid var(--rule); }
.cm-tpl-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cm-tpl-body { display: block; padding: 12px 14px 4px; }
.cm-tpl-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-tpl-name b { font-size: 18px; }
.cm-gov { background: #F6ECD2; color: #6B4A00; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.cm-tpl-blurb { display: block; color: var(--ink2); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.cm-radio { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rule2); background: #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.cm-radio.on { background: var(--board); border-color: var(--board); }
.cm-tpl-pv { margin: 6px 10px 10px; align-self: flex-start; }

.cm-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cm-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1px solid transparent; border-radius: 12px; background: none; cursor: pointer; }
.cm-sw:hover { background: var(--ground); }
.cm-sw.on { border-color: var(--rule); background: var(--ground); }
.cm-sw-dot { width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--rule2), 0 1px 3px rgba(0,0,0,.15); display: grid; place-items: center; color: #fff; }
.cm-sw.on .cm-sw-dot { box-shadow: 0 0 0 2.5px var(--ink); }
.cm-sw-name { font-size: 13.5px; }
.cm-sw.on .cm-sw-name { font-weight: 700; }

.cm-logos { display: grid; gap: 0; padding-top: 6px; padding-bottom: 6px; }
.cm-logo-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-radius: 12px; }
.cm-logo-row + .cm-logo-row { border-top: 1px solid var(--rule); }
.cm-logo-row.over { background: var(--board-wash); box-shadow: 0 0 0 8px var(--board-wash); }
.cm-logo-row b { display: block; font-size: 15px; }
.cm-logo-row .small { line-height: 1.45; }
.cm-drop-note { margin-top: 2px; font-size: 12.5px; }
.cm-logo-box { width: 68px; height: 68px; border-radius: 12px; border: 1px solid var(--rule); background: var(--sunk); display: grid; place-items: center; color: var(--ink3); flex: none; overflow: hidden; padding: 5px; }
.cm-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.cm-logo-box .spinner { width: 22px; height: 22px; border-width: 2.5px; }
.cm-logo-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }

.cm-hero { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--sunk); border: 1px solid var(--rule); }
.cm-hero img { width: 100%; height: 100%; object-fit: cover; }
.cm-hero.over { outline: 3px dashed var(--board); outline-offset: -3px; }
.cm-hero-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.6); }
.cm-hero-acts { margin: 12px 0 4px; }
.cm-sub { font-weight: 600; color: var(--ink2); font-size: 14.5px; margin: 14px 0 8px; }
.cm-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cm-lib-item { position: relative; padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 2; cursor: pointer; background: var(--sunk); }
.cm-lib-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.cm-lib-item:hover { border-color: var(--rule2); }
.cm-lib-item.on { border-color: var(--board); }
.cm-lib-check { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--board); color: #fff; display: grid; place-items: center; }
.cm-lib-check .ico { width: 14px; height: 14px; }

.cm-live { max-width: 880px; margin: 0 auto; }
.cm-seal { width: 96px; height: 96px; border-radius: 50%; background: var(--seal); color: #fff; display: grid; place-items: center; margin: 12px auto 18px; box-shadow: 0 0 0 7px var(--seal-wash); }
.cm-seal .ico { width: 50px; height: 50px; }
.cm-seal.draft { background: var(--board); box-shadow: 0 0 0 7px var(--board-wash); }
.cm-seal.pop { animation: cm-pop .65s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cm-pop { from { transform: scale(.3) rotate(-15deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cm-title { text-align: center; font-size: 26px; line-height: 1.3; margin-top: 6px; }
.cm-lead { text-align: center; color: var(--ink2); margin: 6px 0 20px; }
.cm-addr { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; max-width: 560px; margin: 0 auto 20px; }
.cm-addr > .ico { color: var(--board); flex: none; }
.cm-host { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; }
.cm-center { justify-content: center; }
.cm-center-text { text-align: center; margin-top: 14px; }
.cm-live-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cm-live-grid .sheet + .sheet { margin-top: 0; }
.cm-h { font-size: 17px; margin-bottom: 6px; }
.cm-qr-card { display: flex; gap: 18px; align-items: flex-start; }
.cm-qr-frame { padding: 6px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; flex: none; }
.cm-qr { display: block; width: 168px; height: 168px; image-rendering: pixelated; }
.cm-qr-url { margin-top: 8px; color: var(--ink3); direction: ltr; text-align: left; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.cm-qr-acts { margin-top: 14px; gap: 8px; }
.cm-quote { margin: 4px 0 14px; padding: 12px 14px; border-left: 3px solid var(--board); background: var(--ground); border-radius: 0 10px 10px 0; color: var(--ink2); font-size: 14.5px; overflow-wrap: anywhere; }
.cm-share-acts { margin-top: 10px; gap: 8px; }
.cm-pause { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--rule2); border-radius: var(--radius); }
.cm-live > .banner { margin-top: 18px; }
.cm-print-frame { position: fixed; width: 0; height: 0; border: 0; left: -9999px; }

@media (max-width: 1100px) {
  .cm-editor .split { grid-template-columns: 1fr; }
  .cm-editor .split > .stack { order: -1; }
}
@media (max-width: 900px) {
  .cm-live-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cm-tpls { grid-template-columns: 1fr; gap: 10px; }
  .cm-tpl-pick { flex-direction: row; align-items: stretch; }
  .cm-tpl-img { width: 96px; aspect-ratio: auto; min-height: 132px; flex: none; border-bottom: 0; border-right: 1px solid var(--rule); }
  .cm-tpl-body { padding: 12px 40px 4px 14px; flex: 1; min-width: 0; }
  .cm-tpl-pv { margin: 0 10px 10px 110px; }
  .cm-tpl-name b { font-size: 17px; }
  .cm-snippet { display: none; }
  .cm-thumb { width: 44px; height: 44px; }
  .cm-qr-card { flex-direction: column; align-items: center; text-align: center; }
  .cm-qr-card .cm-qr-url { text-align: center; }
  .cm-qr-card .row { justify-content: center; }
  .cm-qr { width: 200px; height: 200px; }
  .cm-title { font-size: 22px; }
  .cm-addr .label { display: none; }
  .cm-pause { flex-direction: column; align-items: stretch; }
  .cm-logo-row { align-items: flex-start; }
  .cm-drop-note { display: none; }
  .cm-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
