/* Neutral city-news workspace. Keep this surface in the graphite/mint editorial system. */
.em-rich, .em-preview-body, .em-preview-lead, .em-preview h4,
.em-field [data-em-field="title"], .em-field [data-em-field="short_text"] {
  font-family: 'Golos Text', system-ui, sans-serif;
}
.editorial-materials {
  --em-bg: var(--ed-bg, #0a0a0c);
  --em-panel: var(--ed-panel, #101013);
  --em-raised: var(--ed-raised, #19191e);
  --em-line: var(--ed-line, #29292f);
  --em-text: var(--ed-text, #ededf0);
  --em-muted: var(--ed-muted, #a2a2ad);
  --em-accent: var(--ed-accent, #bdd3c8);
  color: var(--em-text);
  max-width: 1390px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.55;
}
.editorial-materials h1,
.editorial-materials h2,
.editorial-materials h3,
.editorial-materials p { margin: 0; }
.em-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid var(--em-line);
  padding-bottom: 22px;
}
.em-header h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; }
.em-eyebrow { color: var(--em-accent); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px !important; }
.em-subtitle, .em-toolbar p, .em-help, .em-schedule-note { color: var(--em-muted); }
.em-subtitle { margin-top: 7px !important; max-width: 680px; }
.em-header-state { min-height: 24px; color: var(--em-muted); font-size: 12px; }
.em-header-state.error { color: #edb1a3; }
.em-sections, .em-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--em-line);
  padding: 17px 0;
}
.em-sections button, .em-subnav button, .em-monthbar button, .em-card button,
.em-toolbar button, .em-rich-toolbar button, .em-save-panel button, .em-targets + button,
.em-actions-stack button, .em-editor-head button, .em-search button, .em-trends-table button, .em-panel .em-toolbar-actions button {
  font: inherit;
  border: 1px solid var(--em-line);
  border-radius: 8px;
  background: transparent;
  color: var(--em-text);
  min-height: 40px;
  padding: 8px 13px;
  cursor: pointer;
}
.em-sections button[aria-selected="true"], .em-subnav button[aria-selected="true"] { background: #24242a; border-color: #666670; }
.em-sections button:hover, .em-subnav button:hover, .em-card button:hover, .em-toolbar button:hover,
.em-monthbar button:hover, .em-rich-toolbar button:hover { background: #222227; }
.editorial-materials button:disabled { opacity: .45; cursor: not-allowed; }
.editorial-materials :is(button, a, input, select, textarea, [contenteditable="true"]):focus-visible { outline: 2px solid #a1c7b7; outline-offset: 3px; }
.em-notice { min-height: 24px; padding: 12px 0 0; color: var(--em-accent); }
.em-notice:empty { display: none; }
.em-notice.error { color: #edb1a3; }
.em-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 26px 0 15px; }
.em-toolbar h2 { font-size: 21px; }
.em-toolbar p { margin-top: 4px; }
.em-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.editorial-materials .ed-primary { background: var(--em-accent); color: #18251e; border-color: var(--em-accent); font-weight: 650; }
.editorial-materials .ed-primary:hover:not(:disabled) { background: #abc6b8; border-color: #abc6b8; }
.em-subnav { padding: 0 0 14px; border-bottom: 0; }
.em-search { display: grid; gap: 6px; margin: 0 0 16px; max-width: 540px; color: var(--em-muted); font-size: 12px; }
.em-search > div { display: flex; gap: 8px; }
.em-search input, .em-monthbar input, .em-field input, .em-field select, .em-field textarea,
.em-target-option + .em-category-row select, .em-editorial-materials input {
  font: inherit; color: var(--em-text); background: #0b0b0e; border: 1px solid #3a3a43; border-radius: 7px; padding: 10px 12px; color-scheme: dark;
}
.em-search input { flex: 1; min-width: 0; }
.em-progress { display: grid; grid-template-columns: auto minmax(120px, 260px) auto; gap: 12px; align-items: center; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--em-line); background: var(--em-panel); color: var(--em-muted); border-radius: 8px; }
.em-progress strong { color: var(--em-text); }
.em-progress progress { width: 100%; accent-color: var(--em-accent); }
.em-list { display: grid; gap: 12px; }
.em-card { padding: 17px 18px; border: 1px solid var(--em-line); border-radius: 10px; background: var(--em-panel); }
.em-card:hover { border-color: #4a4a52; }
.em-card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--em-muted); }
.em-kind { color: var(--em-accent); }
.em-state { color: var(--em-muted); white-space: nowrap; }
.em-card h3 { font-size: 18px; margin-top: 8px; line-height: 1.35; }
.em-reason { color: var(--em-muted); margin-top: 7px !important; }
.em-card time { display: inline-block; margin-top: 8px; color: #c2c2ca; font-size: 12px; }
.em-card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--em-line); }
.em-source { color: var(--em-muted); font-size: 12px; }
.em-target-hints, .em-context-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.em-target-hints span, .em-context-line span { border: 1px solid #3a3a43; border-radius: 999px; color: var(--em-muted); padding: 3px 8px; font-size: 11px; }
.em-context-line span:first-child { color: var(--em-accent); }
.em-empty, .em-loading, .em-error { padding: 38px 20px; border: 1px solid var(--em-line); border-radius: 10px; background: var(--em-panel); display: grid; gap: 7px; }
.em-empty span, .em-loading, .em-error { color: var(--em-muted); }
.em-error { color: #edb1a3; }
.em-more { margin-top: 15px; }
.em-monthbar { display: flex; align-items: center; gap: 9px; margin: 6px 0 17px; }
.em-monthbar label, .em-field { display: grid; gap: 6px; color: var(--em-muted); font-size: 12px; }
.em-monthbar input { min-height: 40px; margin-left: 5px; }
.em-trends-table-wrap { overflow-x: auto; border: 1px solid var(--em-line); border-radius: 10px; }
.em-plan-scope { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--em-line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--em-panel); color: var(--em-muted); }
.em-plan-scope strong { color: var(--em-text); }
.em-trends-table-wrap table { width: 100%; border-collapse: collapse; min-width: 1020px; }
.em-trends-table-wrap th, .em-trends-table-wrap td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--em-line); }
.em-trends-table-wrap th { color: var(--em-muted); font-size: 11px; font-weight: 600; white-space: nowrap; background: #0e0e11; }
.em-trends-table-wrap td { color: #d7d7db; font-size: 13px; }
.em-trends-table-wrap td small { display: block; color: var(--em-muted); margin-top: 4px; max-width: 245px; }
.em-editor-head { display: flex; align-items: center; gap: 15px; margin: 26px 0 20px; }
.em-editor-head > div { flex: 1; }
.em-editor-head .em-state { margin-left: auto; }
.em-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.em-editor-main, .em-editor-side { display: grid; gap: 16px; min-width: 0; }
.em-panel { display: grid; gap: 13px; padding: 17px; border: 1px solid var(--em-line); border-radius: 10px; background: var(--em-panel); }
.em-panel h3 { font-size: 16px; }
.em-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.em-field input, .em-field textarea, .em-field select { width: 100%; }
.em-field textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.em-rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.em-rich-toolbar button { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.em-rich { min-height: 270px; padding: 14px; border: 1px solid #3a3a43; border-radius: 7px; background: #0b0b0e; line-height: 1.7; overflow-wrap: anywhere; }
.em-rich:empty::before { content: 'Введіть текст матеріалу…'; color: #6f6f78; }
.em-preview { display: grid; gap: 8px; margin-top: 14px; padding: 14px; border: 1px solid var(--em-line); border-radius: 8px; background: #0b0b0e; }
.em-preview-label { color: var(--em-accent); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.em-preview h4 { font-size: 20px; line-height: 1.3; }
.em-preview-lead { color: #c2c2ca; }
.em-preview-body { color: #d7d7db; line-height: 1.7; overflow-wrap: anywhere; }
.em-preview-body img { max-width: 100%; height: auto; border-radius: 6px; }
.em-preview > img { width: 100%; max-height: 250px; object-fit: cover; border-radius: 6px; }
.em-preview-media-credits { display: grid; gap: 5px; padding-top: 8px; border-top: 1px solid var(--em-line); color: var(--em-muted); font-size: 11px; overflow-wrap: anywhere; }
.em-preview-media-credits .em-media-credit { display: flex; }
.em-counter { color: var(--em-muted); font-size: 11px; }
.em-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.em-tags:empty { display: none; }
.em-tags span { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #3a3a43; border-radius: 999px; padding: 4px 8px; color: var(--em-text); }
.em-tags button { min-height: 22px; padding: 0 4px; border: 0; color: var(--em-muted); }
.em-source-facts { display: grid; gap: 6px; color: var(--em-muted); font-size: 13px; overflow-wrap: anywhere; }
.em-source-facts a { color: var(--em-accent); }
.em-targets { display: grid; gap: 9px; }
.em-target-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--em-line); border-radius: 8px; cursor: pointer; }
.em-target-option input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--em-accent); width: 17px; height: 17px; }
.em-target-option span { display: grid; gap: 2px; }
.em-target-option small { color: var(--em-muted); }
.em-home-pin-picker { width: 180px; min-height: 110px; display: grid; gap: 5px; margin-top: 4px; }
.em-home-pin-grid { width: 180px; height: 110px; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 5px; }
.em-home-pin-slot { min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--em-muted); border-radius: 7px; background: var(--em-bg); color: var(--em-muted); font-size: 21px; line-height: 1; }
.em-home-pin-slot:first-child { grid-row: 1 / span 2; }
.em-home-pin-slot:not(:disabled) { cursor: pointer; border-color: var(--em-muted); }
.em-home-pin-slot.is-selected { border-color: var(--em-accent); background: var(--em-panel); color: var(--em-text); box-shadow: inset 0 0 0 1px var(--em-accent); }
.editorial-materials .em-home-pin-slot:disabled { opacity: .7; border-color: var(--em-muted); }
.em-home-pin-picker .em-help { font-size: 11px; }
.em-home-pin-dialog form { display: block; margin: 0; min-width: 0; }
.em-home-pin-dialog .em-dialog-inner { min-width: 0; box-sizing: border-box; overflow-wrap: anywhere; }
.em-home-pin-dialog .em-field { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 12px; }
.em-home-pin-dialog .em-field input { width: 100%; box-sizing: border-box; }
.em-home-pin-dialog .em-home-pin-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.em-home-pin-dialog .em-dialog-actions { flex-wrap: wrap; }
.em-home-pin-dialog button { min-height: 44px; }
.em-category-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; margin: -3px 0 3px 28px; color: var(--em-muted); font-size: 12px; }
.em-category-row select { width: 100%; }
.em-category-error { grid-column: 2; color: #edb1a3; }
.em-feed-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 8px; }
.em-feed-filters label { display: grid; gap: 5px; color: var(--em-muted); font-size: 12px; }
.em-feed-filters input, .em-feed-filters select { min-height: 40px; font: inherit; color: var(--em-text); background: #0b0b0e; border: 1px solid #3a3a43; border-radius: 7px; padding: 8px 10px; color-scheme: dark; }
.em-schedule-preview { min-height: 42px; padding: 10px; border: 1px solid var(--em-line); border-radius: 8px; color: var(--em-muted); font-size: 12px; }
.em-schedule-preview ul { list-style: none; display: grid; gap: 7px; padding: 0; margin: 0; }
.em-schedule-preview li { display: flex; justify-content: space-between; gap: 8px; }
.em-schedule-status { color: var(--em-text); text-align: right; }
.em-schedule-status.is-error { color: #edb1a3; }
.em-actions-stack { display: grid; gap: 8px; }
.em-save-panel { position: sticky; top: 14px; }
.em-save-panel button { width: 100%; }
.em-receipts { margin-top: 18px; }
.em-receipts ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.em-receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--em-line); color: var(--em-muted); }
.em-receipt-row.success span:last-child { color: var(--em-accent); }
.em-receipt-row.failed span:last-child { color: #edb1a3; }
.em-receipt-row.pending span:last-child { color: #c4c4cc; }
.em-dialog-inner { padding: 22px; background: var(--em-panel, #101013); color: var(--em-text, #ededf0); }
.em-action-dialog { max-width: 520px; width: calc(100% - 28px); padding: 0; border: 1px solid var(--em-line, #29292f); border-radius: 10px; background: var(--em-panel, #101013); }
.em-action-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.em-dialog-inner h3 { font-size: 20px; margin: 4px 0 8px; }
.em-dialog-inner p { color: var(--em-muted, #a2a2ad); }
.em-dialog-inner ul { margin: 14px 0; padding-left: 20px; color: var(--em-muted, #a2a2ad); }
.em-action-review { display: grid; gap: 8px; }
.em-action-review li { display: grid; gap: 2px; }
.em-action-review li strong { color: var(--em-text); }
.em-action-review li span { font-size: 12px; }
.em-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.em-dialog-actions button { font: inherit; border: 1px solid var(--em-line, #29292f); border-radius: 8px; background: transparent; color: inherit; min-height: 40px; padding: 8px 13px; }
.em-dialog-actions .ed-primary { background: var(--em-accent, #bdd3c8); color: #18251e; border-color: var(--em-accent, #bdd3c8); }
.em-gallery { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.em-gallery li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--em-line); color: var(--em-muted); }
.em-gallery .em-toolbar-actions { flex-basis: 100%; }
.em-gallery .em-field { flex: 1; min-width: min(220px, 100%); }
.em-gallery img { width: 72px; height: 48px; object-fit: cover; border-radius: 5px; flex: 0 0 auto; }
.em-gallery a { color: var(--em-accent); }
.em-media-group { display: grid; gap: 7px; }
.em-media-group h4, .em-commons-search h4 { font-size: 13px; }
.em-commons-chooser { display: flex; }
.em-commons-chooser button { min-height: 44px; padding: 7px 11px; }
.em-commons-search { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--em-line); border-radius: 8px; background: var(--em-bg); }
.em-commons-search form { display: grid; gap: 7px; }
.em-commons-search-row { display: flex; gap: 8px; align-items: stretch; }
.em-commons-search-row input { flex: 1 1 auto; min-width: 0; }
.em-commons-search-row button { flex: 0 0 auto; }
.em-commons-results { display: grid; gap: 10px; }
.em-commons-candidate { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid var(--em-line); border-radius: 8px; background: var(--em-panel); min-width: 0; }
.em-commons-preview { min-height: 96px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: var(--em-bg); color: var(--em-muted); font-size: 11px; text-align: center; }
.em-commons-preview img { display: block; width: 100%; height: 96px; object-fit: contain; }
.em-commons-no-preview { padding: 8px; }
.em-commons-candidate-body { display: grid; gap: 6px; min-width: 0; }
.em-commons-candidate-body h4 { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.em-commons-description, .em-commons-caption { color: var(--em-muted); font-size: 12px; overflow-wrap: anywhere; }
.em-commons-meta, .em-commons-links { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--em-muted); font-size: 11px; }
.em-commons-links a, .em-media-credit a { color: var(--em-accent); }
.em-commons-candidate-body button { justify-self: start; min-height: 44px; padding: 7px 11px; font-size: 12px; }
.em-media-credit { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 3px 12px; color: var(--em-muted); font-size: 11px; overflow-wrap: anywhere; }
.em-media-caption { flex-basis: 100%; color: var(--em-text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .em-editor-grid { grid-template-columns: 1fr; }
  .em-save-panel { position: static; }
}
@media (max-width: 640px) {
  .em-header, .em-toolbar, .em-editor-head { display: grid; }
  .em-toolbar-actions, .em-toolbar-actions button { width: 100%; }
  .em-form-grid { grid-template-columns: 1fr; }
  .em-card-foot { align-items: center; flex-direction: row; flex-wrap: wrap; }
  .em-card-foot button { width: auto; }
  .em-card-foot > .em-source { flex-basis: 100%; }
  .em-progress { grid-template-columns: 1fr; }
  .em-editor-head .em-state { margin-left: 0; }
  .em-commons-search-row { display: grid; }
  .em-commons-candidate { grid-template-columns: 1fr; }
  .em-commons-preview img { height: 150px; }
}

.em-collection-sites { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.em-collection-sites li { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }

/* Keep the two incoming actions together at the right edge. */
.em-card-foot > .em-source { margin-right: auto; }

/* Form controls have one contiguous focus indicator; keep button/link outlines. */
.editorial-materials :is(input, select, textarea, [contenteditable="true"]):is(:focus, :focus-visible) {
  border-color: #a1c7b7; outline: none; outline-offset: 0;
  box-shadow: 0 0 0 1px #a1c7b7;
}
.em-tag-results { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.em-tag-results:empty { display: none; }
.em-tag-results button { text-align: left; color: var(--em-text); background: transparent; border: 1px solid var(--em-line); border-radius: 8px; padding: 10px 12px; min-height: 40px; font: inherit; cursor: pointer; }
.em-tag-results button:is(:hover, [aria-selected="true"]) { background: #24242a; }

/* Owner: destinations below editing, publication actions in the bottom bar. */
.em-publication-panel { display: grid; gap: 16px; margin-top: 16px; }
.em-publication-panel .em-targets { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: start; }
.em-publication-panel .em-site-choice { display: grid; gap: 9px; min-width: 0; }
.em-publication-panel .em-save-panel { position: static; display: flex; flex-wrap: wrap; align-items: center; }
.em-publication-panel .em-save-panel > button { width: auto; }
.em-publication-panel .em-save-panel > p { flex-basis: 100%; }

/* Owner-approved editor: source → text → assets/SEO/tags → destinations. */
.em-editor-flow, .em-editor-flow *, .em-editor-flow *::before, .em-editor-flow *::after { box-sizing: border-box; }
.em-editor-flow { display: grid; gap: 18px; min-width: 0; }
.em-editor-flow .em-panel { padding: 18px; gap: 14px; min-width: 0; }
.em-editor-flow .em-field { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 7px; min-width: 0; color: var(--em-text); font-size: 13px; }
.em-editor-flow .em-field > small { color: var(--em-muted); font-size: 12px; }
.em-editor-flow .em-field :is(input,textarea,select) { min-width: 0; max-width: 100%; font-size: 14px; }
.em-editor-flow .em-form-grid { align-items: start; gap: 14px; }
.em-editor-flow .em-source-facts { padding: 12px; background: var(--em-bg); border-radius: 7px; gap: 8px; }
.em-editor-flow .em-source-facts a { color: var(--em-text); }
.em-editor-flow .em-source-facts input[readonly] { color: var(--em-muted); }
.em-editor-flow .em-rich { min-height: 240px; }
.em-editor-flow .em-rich-toolbar { margin: 0; gap: 8px; }
.em-editor-flow .em-rich-toolbar button { padding: 9px 12px; min-height: 42px; font-size: 14px; }
.em-block-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--em-line); padding-top: 14px; }
.em-block-actions button { font: inherit; min-height: 42px; padding: 10px 13px; border: 1px solid var(--em-line); background: transparent; color: var(--em-text); border-radius: 8px; cursor: pointer; }
.em-block-actions .em-help { flex: 1 1 220px; }
.em-cover-preview { min-height: 130px; border: 1px solid var(--em-line); border-radius: 8px; background: var(--em-bg); display: grid; place-items: center; overflow: hidden; color: var(--em-muted); }
.em-cover-preview img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.em-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.em-destinations .em-targets { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.em-destinations .em-site-choice { display: grid; align-content: start; gap: 12px; min-width: 0; border: 1px solid var(--em-line); border-radius: 8px; padding: 13px; }
.em-destinations .em-target-option { border: 0; padding: 0; align-items: center; }
.em-destinations .em-target-option input { margin: 0; }
.em-destinations .em-field select:disabled { opacity: .55; }
.em-editor-flow input:is([type=checkbox],[type=radio]) { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; accent-color: var(--em-accent); }
.em-publish-modes { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.em-publish-modes label { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 42px; }
.em-time-fields { display: grid; gap: 12px; }
.em-editor-flow [hidden] { display: none !important; }
.em-field-error { color: #edb1a3; }
.em-editor-footer.em-save-panel { position: static; display: grid; }
.em-footer-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.em-secondary-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.em-editor-footer.em-save-panel button { width: auto; min-height: 46px; }
.em-local-feedback { padding-top: 10px; border-top: 1px solid var(--em-line); color: var(--em-accent); }
.em-local-feedback:empty { display: none; }
.em-local-feedback.em-field-error { color: #edb1a3; }
.em-ready-state { color: var(--em-muted); }
.em-ready-state.em-field-error { color: #edb1a3; }
.em-link-dialog { width: min(560px,calc(100% - 24px)); }
.em-dialog-inner input { min-width: 0; max-width: 100%; }

/* Colleague collaboration stays in the editor's existing bottom flow. */
.em-editor-context { display: block; margin-top: 5px; color: var(--em-muted); font-size: 12px; }
.em-editor-context strong { color: var(--em-text); }
.em-workspace-context { display: block; margin-top: 7px; color: var(--em-muted); font-size: 12px; }
.em-workspace-context strong { color: var(--em-text); }
.em-workspace-context select { min-height: 44px; margin-left: 7px; padding: 8px 10px; color: var(--em-text); background: var(--em-bg); border: 1px solid var(--em-line); border-radius: 7px; font: inherit; }
.em-context-switch { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.em-context-switch select { min-height: 44px; max-width: 280px; padding: 8px 10px; color: var(--em-text); background: var(--em-bg); border: 1px solid var(--em-line); border-radius: 7px; font: inherit; }
.em-own-target-label { display: grid; gap: 3px; min-height: 44px; }
.em-own-target-label small, .em-optional { color: var(--em-muted); font-size: 12px; }
.em-offer-panel { display: grid; gap: 14px; }
.em-offer-panel > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--em-text); font-weight: 650; }
.em-offer-panel-body { display: grid; gap: 14px; }
.em-offer-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.em-offer-target { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--em-line); border-radius: 7px; }
.em-offer-target input { width: 17px; height: 17px; accent-color: var(--em-accent); }
.em-offer-panel textarea { min-height: 80px; resize: vertical; }
.em-offers-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.em-offer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px solid var(--em-line); border-radius: 8px; background: var(--em-panel); }
.em-offer-row > div:first-child { display: grid; gap: 4px; min-width: 220px; }
.em-offer-row > div:first-child span, .em-offer-row > div:first-child small { color: var(--em-muted); font-size: 12px; }
.em-offer-row .em-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.em-offer-row button, .em-offer-preview button, .em-offers-list + button { min-height: 44px; }
.em-offer-preview { margin-top: 16px; }
.em-offer-preview-body { display: grid; gap: 15px; }
.em-offer-media { display: grid; gap: 9px; }
.em-offer-media h4 { margin: 0; font-size: 14px; }
.em-offer-media ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.em-offer-media li { display: grid; gap: 7px; align-content: start; padding: 10px; border: 1px solid var(--em-line); border-radius: 7px; color: var(--em-muted); font-size: 12px; overflow-wrap: anywhere; }
.em-offer-media img, .em-offer-media video { width: 100%; height: 130px; object-fit: contain; border-radius: 5px; background: var(--em-bg); }
.em-offer-media .em-media-credit { display: block; }
@media(max-width:650px) {
  .em-editor-flow .em-panel { padding: 14px; }
  .em-destinations .em-targets { grid-template-columns: 1fr; }
  .em-footer-actions, .em-secondary-actions { width: 100%; }
  .em-editor-footer .em-footer-actions > .ed-primary { width: 100%; }
  .em-secondary-actions > button { flex: 1 1 180px; }
  .em-editor-flow :is(input,select,textarea) { font-size: 16px !important; }
  .em-editor-flow .em-form-grid { grid-template-columns: minmax(0,1fr); }
  .em-offer-targets { grid-template-columns: 1fr; }
  .em-offer-row .em-toolbar-actions { width: 100%; }
  .em-offer-row .em-toolbar-actions button { flex: 1 1 100%; }
}
.em-publication-panel .em-actions-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.em-preview-dialog { width: min(920px, calc(100vw - 32px)); }
.em-preview-dialog .em-preview { margin-top: 16px; }

.em-pin-choice { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; }
.em-seo-candidate { display: grid; gap: 12px; border: 1px solid var(--em-line); border-radius: 8px; padding: 14px; background: var(--em-bg); }
.em-seo-candidate p { margin: 0; overflow-wrap: anywhere; }
