.bulletin-map-workspace {
  --bm-border: #2c4257;
  --bm-panel: #0d1c2d;
  --bm-page: #081624;
  --bm-text: #e2ebf5;
  --bm-muted: #a8bfd3;
  --bm-accent: #12b9e8;
  --bm-warning: #ffc56d;
  --bm-danger: #fca5a5;
  --bm-print-mask: #0f172a55;
  --bm-sidebar-width: 344px;
  --bm-control-height: 36px;
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  color: var(--bm-text);
  background: var(--bm-page);
  font-size: 14px;
  line-height: 1.4;
}
.bulletin-map-workspace[hidden], .bulletin-map-workspace [hidden] { display: none !important; }
body.bulletin-map-editor-open { overflow: hidden; }
.bulletin-map-workspace *, .bulletin-map-workspace *::before, .bulletin-map-workspace *::after { box-sizing: border-box; }
.bulletin-map-workspace button, .bulletin-map-workspace input, .bulletin-map-workspace select {
  color: var(--bm-text);
  background: var(--bm-panel);
  border: 1px solid var(--bm-border);
  border-radius: 4px;
  font: inherit;
  min-height: var(--bm-control-height);
  padding: 8px 12px;
}
.bulletin-map-workspace button { cursor: pointer; }
.bulletin-map-workspace button:hover { border-color: var(--bm-accent); }
.bulletin-map-workspace button:disabled { opacity: .55; cursor: wait; }
.bulletin-map-workspace :focus-visible { outline: 2px solid var(--bm-accent); outline-offset: 2px; }
.bulletin-map-workspace input[type="checkbox"] { min-height: 0; width: 18px; height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--bm-accent); }
.bulletin-map-workspace .bm-primary { background: var(--bm-accent); color: #061824; border-color: var(--bm-accent); font-weight: 600; }
.bm-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--bm-border); }
.bm-header h1 { font-size: 24px; font-weight: 600; margin: 4px 0 0; line-height: 1.25; }
.bulletin-map-workspace .bm-link { color: var(--bm-muted); background: transparent; padding: 0; border: 0; min-height: 24px; }
.bm-state { color: var(--bm-warning); font-size: 12px; }
.bm-map-navigation { display: flex; align-items: center; gap: 8px; padding-left: 12px; min-width: 0; border-bottom: 1px solid var(--bm-border); }
.bm-map-navigation > button { flex-shrink: 0; }
.bm-map-navigation .bm-map-tabs { border: 0; padding-left: 0; min-width: 0; }
.bm-panel-collapsed .bm-workspace { grid-template-columns: minmax(0, 1fr); }
.bm-map-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 24px 0; border-bottom: 1px solid var(--bm-border); }
.bm-map-tabs button { flex-shrink: 0; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-map-tabs [aria-current="page"] { border-bottom: 3px solid var(--bm-accent); }
.bm-map-tabs [data-map-editor-action="remove-map"] { margin-left: auto; color: var(--bm-danger); }
.bm-workspace { min-height: 0; min-width: 0; display: grid; grid-template-columns: var(--bm-sidebar-width) minmax(0, 1fr); }
.bm-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--bm-border); }
.bm-sidebar-tabs { display: flex; padding: 8px; border-bottom: 1px solid var(--bm-border); }
.bm-sidebar-tabs button { flex: 1; border: 0; border-radius: 0; background: transparent; }
.bm-sidebar-tabs [aria-selected="true"] { border-bottom: 3px solid var(--bm-accent); }
.bm-catalog-search { padding: 12px; }
.bm-catalog-search input { width: 100%; }
.bm-layer-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; scrollbar-width: thin; }
.bm-layer-list h2 { font-size: 14px; margin: 16px 0 8px; }
.bulletin-map-workspace .bm-add-layer { color: var(--bm-accent); border-color: var(--bm-accent); width: 100%; }
.bm-overlays { border: 0; margin: 16px 0 0; padding: 0; }
.bm-overlays legend { font-weight: 600; font-size: 12px; }
.bm-overlays label { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.bm-active-layer { border-top: 1px solid var(--bm-border); padding: 12px 0; }
.bm-active-heading { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.bm-active-heading label { display: flex; gap: 12px; align-items: center; min-height: 32px; }
.bm-active-heading button { min-height: 28px; padding: 0 8px; font-size: 20px; }
.bm-active-layer small { color: var(--bm-muted); display: block; margin: 4px 0 8px 28px; }
.bm-layer-levels { display: grid; min-width: 0; gap: 8px; margin: 12px 0; padding: 0; border: 0; color: var(--bm-muted); font-size: 12px; }
.bm-layer-levels legend { padding: 0 0 8px; font-weight: 600; }
.bm-level-groups { display: flex; flex-wrap: wrap; gap: 4px; }
.bulletin-map-workspace .bm-level-groups button { min-width: 0; min-height: 32px; padding: 4px 8px; font-size: 12px; white-space: normal; text-align: left; }
.bulletin-map-workspace .bm-level-groups [aria-pressed="true"] { color: var(--bm-accent); border-color: var(--bm-accent); font-weight: 600; }
.bm-level-group-name { color: var(--bm-text); }
.bm-level-all, .bm-contours { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--bm-text); }
.bm-contour-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; }
.bm-contours { margin: 0; font-size: 12px; }
.bm-contour-interval { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--bm-muted); }
.bm-contour-interval > span { white-space: nowrap; }
#bulletin-document-section .bm-inline .bm-contour-interval input, .bulletin-map-workspace .bm-contour-interval input { width: 80px; min-width: 0; flex: 0 0 80px; min-height: 32px; padding: 4px 8px; font-size: 12px; }
.bm-contour-unit { white-space: nowrap; }
.bm-contour-interval input[aria-invalid="true"] { border-color: var(--bm-warning); }
.bm-level-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-height: 192px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.bm-level-option { display: flex; align-items: center; gap: 4px; padding-right: 8px; border: 1px solid var(--bm-border); border-radius: 4px; }
.bm-level-option.is-selected { border-color: var(--bm-accent); }
.bulletin-map-workspace .bm-level-option button { flex: 1; min-width: 0; min-height: 32px; padding: 4px 8px; border: 0; background: transparent; text-align: left; font-size: 12px; overflow-wrap: anywhere; }
.bulletin-map-workspace .bm-level-option button[aria-pressed="true"] { color: var(--bm-accent); font-weight: 600; }
.bm-opacity { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 12px; color: var(--bm-muted); }
.bm-opacity input { grid-column: 1/-1; min-height: 24px; padding: 0; width: 100%; accent-color: var(--bm-accent); }
.bm-source-group { border-bottom: 1px solid var(--bm-border); }
.bm-source-group summary { cursor: pointer; padding: 12px 4px; font-weight: 600; }
.bm-source-group summary small { float: right; font-size: 12px; font-weight: 400; color: var(--bm-muted); }
.bm-source-group .bm-source-group { margin-left: 12px; border: 0; }
.bm-catalog-layer { display: flex; align-items: start; gap: 12px; padding: 12px 8px; overflow-wrap: anywhere; }
.bm-catalog-layer small { display: block; margin-top: 4px; }
.bm-layer-warning { font-size: 12px; color: var(--bm-warning); margin: 8px 0 0; }
.bm-muted { color: var(--bm-muted); }
.bm-map-area { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.bm-toolbar { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(200px, 1.2fr) minmax(140px, .8fr) minmax(140px, .8fr); align-items: end; gap: 12px; padding: 12px 16px; }
.bm-toolbar > :is(label, .bm-name-field, .bm-time-field) { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--bm-muted); min-width: 0; }
.bm-toolbar input:not([type="checkbox"]), .bm-toolbar select { width: 100%; min-width: 0; }
.bm-canvas-wrap { position: relative; min-width: 0; min-height: 0; }
.bm-canvas { position: absolute; inset: 0; }
.bulletin-map-workspace .bm-fit { position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--bm-panel); }
.bulletin-map-workspace .maplibregl-ctrl-group button { background-color: #fff; color: #172331; width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 0; }
.bulletin-map-workspace .maplibregl-ctrl-group button + button { border-top: 1px solid #ddd; }
.bulletin-map-workspace .maplibregl-ctrl-attrib-button { min-height: 0; padding: 0; border: 0; width: 24px; height: 24px; background-color: #fff; }
.bulletin-map-workspace .maplibregl-ctrl-attrib { color: #333; }
.bm-load, .bm-error { position: absolute; bottom: 16px; left: 16px; z-index: 4; display: flex; gap: 12px; align-items: center; max-width: min(520px, calc(100% - 32px)); padding: 12px; border: 1px solid var(--bm-border); border-radius: 4px; background: var(--bm-panel); font-size: 12px; }
.bm-load .bulletin-progress-ring { width: 48px; height: 48px; flex: 0 0 48px; }
.bm-error { color: var(--bm-warning); }
.bm-error span { overflow-wrap: anywhere; }
.bm-time-note { padding: 8px 16px; margin: 0; font-size: 12px; color: var(--bm-muted); }
.bm-layer-period { color: var(--bm-muted); font-size: 12px; margin: 8px 0 0; }
.bm-legends { position: absolute; right: 12px; bottom: 40px; z-index: 3; max-width: min(420px, calc(100% - 24px)); max-height: 40%; overflow: auto; padding: 8px 12px; color: #20364b; background: #ffffffed; border: 1px solid #cad3dc; border-radius: 4px; font-size: 12px; }
.bm-legends summary { cursor: pointer; font-weight: 600; }
.bm-legends section { margin-top: 8px; }
.bm-legend-stops { display: flex; margin-top: 4px; }
.bm-legend-stops span { flex: 1; min-width: 24px; text-align: center; }
.bm-legend-stops i { display: block; height: 16px; background: #fff; }
.bm-legend-stops small { font-size: 10px; }
.bm-time-strip { display: flex; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--bm-border); }
.bm-time-strip label { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 12px; color: var(--bm-muted); }
.bm-time-strip select { min-width: 0; max-width: 280px; min-height: 28px; padding: 4px; font-size: 12px; }
.bm-footer { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--bm-border); }
.bm-footer span { flex: 1; color: var(--bm-muted); font-size: 12px; }
.bm-leave-dialog { color: var(--bm-text); background: var(--bm-panel); border: 1px solid var(--bm-border); padding: 24px; border-radius: 4px; max-width: min(560px, calc(100vw - 32px)); }
.bm-leave-dialog::backdrop { background: #0008; }
.bm-leave-dialog h2 { font-size: 20px; margin-top: 0; }
.bm-leave-dialog > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bulletin-section-map-thumbnail { width: 176px; height: 96px; object-fit: cover; border: 1px solid var(--bulletin-border); border-radius: 4px; }
.bulletin-section-map-row .bulletin-section-map-select { display: flex; align-items: center; gap: 16px; min-width: 0; }
.bulletin-section-map-copy { display: grid; gap: 8px; min-width: 0; }
.bulletin-section-map-open-label { color: var(--bulletin-accent); font-size: 12px; }
.bulletin-block-dialog .is-editing-block .bulletin-section-maps { display: grid; gap: 8px; }
.bulletin-section-map-panel:has(#section-map-editor:empty) { display: none; }
@media (max-width: 1120px) {
  .bulletin-map-workspace { --bm-sidebar-width: 288px; }
  .bm-toolbar { grid-template-columns: 1fr 1fr; padding: 8px 12px; gap: 8px; }
}
@media (max-width: 700px) {
  .bm-header { padding: 8px 12px; gap: 8px; }
  .bm-header h1 { font-size: 16px; }
  .bm-state { max-width: 100px; text-align: right; }
  .bm-map-tabs { padding: 4px 8px 0; }
  .bm-map-tabs button { max-width: 220px; }
  .bm-workspace { display: flex; flex-direction: column-reverse; }
  .bm-map-area { flex: 1; min-height: 180px; }
  .bm-sidebar { flex: 0 1 34vh; max-height: 34vh; border-right: 0; border-top: 1px solid var(--bm-border); }
  .bm-sidebar-tabs { padding: 0 8px; }
  .bm-layer-list { padding: 8px 12px; }
  .bm-catalog-search { padding: 4px 12px; }
  .bm-toolbar { gap: 4px 8px; padding: 4px 8px; }
  .bm-toolbar label { font-size: 10px; }
  .bm-toolbar input:not([type="checkbox"]), .bm-toolbar select { font-size: 12px; min-height: 32px; padding: 4px; }
  .bm-time-note { display: none; }
  .bm-time-strip { gap: 4px; padding: 4px; }
  .bm-time-strip label { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0; font-size: 10px; }
  .bm-time-strip select { width: 100%; max-width: none; font-size: 10px; }
  .bm-footer { padding: 8px; gap: 8px; }
  .bm-footer span { display: none; }
  .bm-footer button { flex: 1; min-height: 40px; font-size: 12px; }
  .bulletin-section-map-thumbnail { width: 96px; height: 64px; }
}
@media (max-height: 560px) {
  .bm-header { padding-top: 4px; padding-bottom: 4px; }
  .bm-header h1 { font-size: 16px; }
  .bm-time-note { display: none; }
  .bm-footer { padding-top: 4px; padding-bottom: 4px; }
  .bm-workspace { overflow: auto; }
  .bm-map-area { min-height: 200px; }
}

.bm-paper-controls, .bm-edit-name, .bm-sidebar-heading, .bm-layer-chips, .bm-caption-controls, .bm-legend-area, .bm-map-zoom, .bm-period-button { display: none; }
.bm-paper-viewport, .bm-paper-stage { display: contents; }
.bm-print-area { display: none; }
.bm-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* Map editing uses the full content width; page decoration belongs to preview. */
.bulletin-map-workspace.bm-inline {
  --bm-border: var(--bulletin-border, #d6e0ec);
  --bm-panel: var(--bulletin-surface, #fff);
  --bm-page: var(--bulletin-surface-raised, #f3f6fa);
  --bm-text: var(--bulletin-text, #172b45);
  --bm-muted: var(--bulletin-muted, #586b82);
  --bm-accent: var(--bulletin-accent, #1763dc);
  --bm-warning: #875607;
  --bm-danger: #b42318;
  --bm-control-height: 36px;
  position: relative; inset: auto; z-index: auto; grid-column: 1 / -1;
  width: 100%; height: auto; min-width: 0; margin: 0; border: 0; border-radius: 0;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; color-scheme: light;
}
.bm-inline .bm-header { min-width: 0; min-height: 56px; padding: 8px 20px; gap: 12px; }
.bm-inline .bm-header h1 { min-width: 0; font-size: 20px; margin: 0; color: var(--bm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-inline .bm-heading { flex: 1; }
.bm-inline .bm-primary { color: #fff; }
.bm-inline .bm-header .bm-link { flex: none; }
.bm-inline .bm-edit-name { display: inline-flex; align-items: center; justify-content: center; padding: 4px; width: 32px; height: 32px; min-height: 32px; flex: none; border-color: transparent; color: var(--bm-accent); background: transparent; font-size: 22px; line-height: 1; }
.bm-inline .bm-map-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; }
.bm-inline .bm-map-tabs { padding: 0; flex: 1; }
.bm-inline .bm-map-tabs button { max-width: 180px; min-height: 36px; padding: 6px 12px; }
.bm-inline .bm-map-tabs [aria-current="page"] { border: 1px solid var(--bm-accent); background: #eff6ff; color: var(--bm-accent); }
.bm-inline .bm-paper-controls { display: flex; align-items: center; gap: 12px; }
.bm-inline .bm-paper-controls > div { display: flex; }
.bm-inline .bm-paper-controls button { min-height: 36px; padding: 6px 12px; border-radius: 0; }
.bm-inline .bm-paper-controls button:first-child { border-radius: 4px 0 0 4px; }
.bm-inline .bm-paper-controls button:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.bm-inline [data-map-orientation][aria-pressed="true"] { position: relative; color: var(--bm-accent); border-color: var(--bm-accent); background: #eff6ff; }
.bm-inline .bm-workspace { position: relative; display: block; overflow: visible; }
.bm-inline .bm-map-area { display: block; min-height: 0; height: auto; }
.bm-inline .bm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px 8px; margin: 0; }
.bm-inline .bm-toolbar label { display: flex; flex-direction: row; align-items: center; gap: 4px; min-width: 0; }
.bm-inline .bm-toolbar label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#bulletin-document-section .bm-inline .bm-toolbar :is(input:not([type="checkbox"]), select), .bm-inline .bm-toolbar :is(input:not([type="checkbox"]), select) {
  width: auto; min-width: 0; height: 36px; min-height: 36px; padding: 6px 8px; font-size: 13px; line-height: 1.3; font-family: inherit;
}
.bm-inline .bm-toolbar button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
#bulletin-document-section .bm-inline .bm-level-field select { width: 124px; }
#bulletin-document-section .bm-inline .bm-base-field select { width: 188px; }
.bm-caption-controls:empty { display: none; }
.bm-inline .bm-caption-controls { display: flex; flex: 1 1 416px; align-items: center; gap: 12px; min-width: 0; }
.bm-caption-controls > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bm-caption-controls .bm-name-field { flex: 1 1 160px; }
.bm-caption-controls .bm-time-field { flex: 0 1 256px; }
.bm-caption-controls label { flex: 0 0 18px; }
.bm-caption-controls label, .bm-legend-toggle { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--bm-muted); font-size: 12px; }
#bulletin-document-section .bm-inline .bm-caption-controls input:not([type="checkbox"]) { flex: 1; width: 100%; min-width: 0; min-height: 36px; padding: 4px 8px; font-size: 13px; }
.bulletin-map-workspace:not(.bm-inline) [data-map-paper-option] { display: none; }
.bm-inline .bm-legend-area { display: block; padding: 8px 16px; }
.bm-inline .bm-legends { position: static; max-width: none; max-height: none; padding: 0; border: 0; color: var(--bm-text); background: transparent; }
.bm-inline .bm-legends > summary { display: none; }
.bm-inline [data-map-editor-legends] { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; padding-block: 8px; }
.bm-inline .bm-legends section { margin: 0; font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
.bm-legend-palette { display: flex; height: 12px; margin-top: 8px; }
.bm-legend-palette i { flex: 1; }
.bm-legend-range { display: flex; justify-content: space-between; margin-top: 4px; color: var(--bm-muted); }
.bm-inline .bm-legends section[data-map-legend-kind="route"] strong::before { content: ''; display: inline-block; width: 24px; border-top: 3px solid var(--bm-accent); margin-right: 8px; vertical-align: middle; }
.bm-inline .bm-legends section[data-map-legend-kind="contour"] strong::before { content: ''; display: inline-block; width: 24px; border-top: 2px solid var(--bm-contour-color); margin-right: 8px; vertical-align: middle; }
.bulletin-map-workspace.bm-inline .bm-fit { position: static; z-index: auto; }
.bm-inline .bm-map-zoom { display: inline-flex; }
.bm-inline .bm-map-zoom button { width: 32px; padding: 4px; font-size: 18px; }
.bm-inline .bm-period-button { display: inline-block; color: var(--bm-muted); }
.bm-inline .bm-layer-chips { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0 16px 8px; }
.bm-inline .bm-layer-chips:empty { display: none; }
.bm-inline .bm-layer-chip { display: inline-flex; max-width: 100%; background: #f1f5f9; border: 1px solid var(--bm-border); border-radius: 4px; }
.bm-inline .bm-layer-chip button { min-height: 28px; padding: 4px 8px; border: 0; background: transparent; font-size: 12px; }
.bm-inline .bm-layer-chip button:first-child { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.bm-inline .bm-layer-chip.is-hidden button:first-child { color: var(--bm-muted); text-decoration: line-through; }
.bm-inline .bm-paper-viewport { display: block; position: relative; width: 100%; margin: 0; }
.bm-inline .bm-paper-stage { display: block; position: relative; width: 100%; }
.bm-inline .bm-paper { position: relative; width: 100%; min-height: 0; margin: 0; overflow: hidden; background: var(--bm-page); }
.bm-inline .bm-paper > .bm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bm-inline .bm-print-area { display: block; position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; transform: translateX(-50%); z-index: 3; pointer-events: none; border: 2px dashed var(--bm-accent); box-shadow: 0 0 0 100vmax var(--bm-print-mask); }
.bm-print-area > span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 16px); padding: 4px 8px; color: var(--bm-text); background: var(--bm-panel); border: 1px solid var(--bm-border); border-radius: 4px; font-size: 11px; line-height: 1.4; text-align: center; }
.bm-inline .bm-time-note { display: none; }
.bm-inline :is(.bm-load, .bm-error) { top: 16px; bottom: auto; }
.bm-inline .bm-time-strip { display: none; }
.bm-inline.bm-periods-open .bm-time-strip { display: flex; flex-wrap: wrap; border-top: 0; border-bottom: 1px solid var(--bm-border); }
.bm-inline .bm-sidebar { position: absolute; top: 56px; left: 16px; z-index: 10; width: calc(100% - 32px); max-height: 560px; height: auto; border: 1px solid var(--bm-border); border-radius: 4px; background: var(--bm-panel); box-shadow: 0 8px 24px #1e293b22; }
.bm-inline .bm-sidebar-heading { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; }
.bm-sidebar-heading [data-map-editor-action="close-panel"] { min-height: 32px; width: 32px; padding: 0; border-color: transparent; font-size: 22px; }
.bm-inline .bm-sidebar-tabs { padding: 0 8px; }
.bm-inline .bm-catalog-search { padding: 8px 12px; }
.bm-inline .bm-layer-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px; }
#bulletin-document-section .bm-inline h2 { font-size: 14px; }
#bulletin-document-section .bm-inline .bm-leave-dialog h2 { font-size: 20px; }
#bulletin-document-section .bm-inline input[type="range"] { height: 28px; min-height: 28px; padding: 0; border: 0; }
.bm-inline .bm-footer { padding: 8px 16px; gap: 12px; }
.bm-inline .bm-footer > span:not(.bm-state) { display: none; }
.bm-inline .bm-footer .bm-state { display: block; flex: 1; max-width: none; text-align: left; color: var(--bm-warning); }
.bm-inline .bm-footer button { min-height: 36px; padding: 6px 12px; }
.is-bulletin-route .bm-inline .maplibregl-ctrl-top-right { top: 0; right: 0; }
.is-bulletin-route .bm-inline .maplibregl-ctrl-bottom-right { bottom: 0; right: 0; }

/* Keep section ordering and menu available without repeating the map heading. */
.has-inline-map-editor > .bulletin-map-fields, .has-inline-map-editor > .bulletin-inline-settings { display: none; }
.has-inline-map-editor > .bulletin-composer-row { position: absolute; inset: 0 0 auto; z-index: 4; min-height: 56px; height: 56px; padding-block: 8px; pointer-events: none; }
.has-inline-map-editor > .bulletin-composer-row .bulletin-row-title { display: none; }
.has-inline-map-editor > .bulletin-composer-row .bulletin-row-source { display: none; }
.has-inline-map-editor > .bulletin-composer-row .bulletin-row-actions { grid-column: -2 / -1; grid-row: 1; justify-content: flex-end; }
.has-inline-map-editor > .bulletin-composer-row .bulletin-row-menu > summary { height: 40px; min-height: 40px; padding: 0; line-height: 1; }
.has-inline-map-editor > .bulletin-composer-row .bulletin-row-order,
.has-inline-map-editor > .bulletin-composer-row .bulletin-row-actions { pointer-events: auto; }
.has-inline-map-editor > .bulletin-composer-row [data-block-action="map"] { display: none; }
.has-inline-map-editor .bm-inline .bm-header { padding-left: 100px; padding-right: 120px; }
@media (max-width: 900px) {
  .bm-inline .bm-map-navigation { align-items: flex-start; }
  .bm-inline .bm-paper-controls { gap: 8px; }
}
@media (max-width: 700px) {
  .bulletin-map-workspace .bm-level-groups button, .bulletin-map-workspace .bm-level-option button, .bm-level-all, .bm-contours { min-height: 40px; }
  .bm-inline .bm-header { min-height: 52px; padding: 8px 12px; }
  .bm-inline .bm-header h1 { font-size: 16px; }
  .bm-inline .bm-header .bm-link { font-size: 12px; }
  .bm-inline .bm-map-navigation { padding: 8px; gap: 8px; }
  .bm-inline .bm-map-tabs { flex-basis: 100%; width: 100%; }
  .bm-inline .bm-paper-controls { margin-left: auto; max-width: 100%; min-width: 0; }
  .bm-inline .bm-paper-controls > div { min-width: 0; }
  .bm-inline .bm-paper-controls button { padding: 6px 8px; font-size: 12px; min-height: 40px; }
  .bm-inline .bm-toolbar { padding: 8px; gap: 8px; }
  #bulletin-document-section .bm-inline .bm-toolbar :is(input:not([type="checkbox"]), select), .bm-inline .bm-toolbar button { min-height: 40px; height: 40px; }
  .bm-inline .bm-caption-controls { flex-basis: 100%; flex-wrap: wrap; gap: 8px; }
  .bm-inline .bm-caption-controls > div { flex: 1 1 100%; }
  .bm-caption-controls label, .bm-legend-toggle { min-height: 40px; }
  #bulletin-document-section .bm-inline .bm-caption-controls input:not([type="checkbox"]) { min-height: 40px; }
  .bm-inline .bm-legend-area { padding: 8px; }
  #bulletin-document-section .bm-inline .bm-base-field select { width: 160px; }
  #bulletin-document-section .bm-inline .bm-level-field select { width: 104px; }
  .bm-inline .bm-layer-chips { padding-inline: 8px; }
  .bm-inline .bm-sidebar { left: 8px; width: calc(100% - 16px); max-height: 440px; }
  .bm-inline .bm-footer { flex-wrap: wrap; padding: 8px; gap: 8px; }
  .bm-inline .bm-footer .bm-state { flex-basis: 100%; font-size: 11px; }
  .bm-inline .bm-footer button { flex: 1; min-height: 40px; }
  .has-inline-map-editor .bm-inline .bm-header { padding-left: 76px; padding-right: 16px; flex-wrap: wrap; }
  .has-inline-map-editor .bm-inline .bm-heading { flex-basis: 100%; padding-right: 96px; box-sizing: border-box; }
  .has-inline-map-editor .bm-inline .bm-header .bm-link { margin-left: auto; }
}
@media (max-width: 380px) {
  .bm-inline .bm-paper-controls { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .bm-inline .bm-paper-controls > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-inline .bm-paper-controls button { padding-inline: 4px; font-size: 11px; white-space: nowrap; }
  .has-inline-map-editor .bm-inline .bm-header { padding-left: 68px; }
}

/* Layer table: source, level, display and interval stay on the same desktop row. */
.bm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bm-sidebar-heading { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: center; padding: 12px; }
.bm-sidebar-heading > strong { min-width: 0; }
.bm-sidebar-heading .bm-catalog-search { grid-column: 1 / -1; padding: 0; }
.bm-sidebar-heading .bm-catalog-search input { width: 100%; min-width: 0; }
.bm-sidebar-heading .bm-add-layer { grid-column: 1 / -1; width: auto; }
.bm-sidebar-heading [data-map-editor-action="close-panel"] { grid-column: 2; grid-row: 1; }
.bm-inline .bm-sidebar-heading { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 300px) auto 32px; padding: 12px 16px; gap: 12px; }
.bm-inline .bm-sidebar-heading > strong { font-size: 16px; }
.bm-inline .bm-sidebar-heading .bm-catalog-search { grid-column: auto; }
.bm-inline .bm-sidebar-heading .bm-add-layer { grid-column: auto; width: auto; min-height: 36px; padding: 8px 12px; white-space: nowrap; }
.bm-inline .bm-sidebar-heading [data-map-editor-action="close-panel"] { grid-column: 4; }
.bm-inline .bm-sidebar-tabs { padding: 0 16px; gap: 16px; }
.bm-inline .bm-sidebar-tabs button { flex: none; min-height: 32px; padding: 4px 8px; font-size: 12px; }
.bm-inline .bm-layer-list { padding: 8px 16px 12px; }
.bm-layer-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--bm-text); font-size: 13px; }
.bm-layer-table th { color: var(--bm-muted); background: var(--bm-page); font-size: 12px; font-weight: 600; text-align: left; padding: 8px; }
.bm-layer-table th:nth-child(1) { width: 27%; }
.bm-layer-table th:nth-child(2) { width: 22%; }
.bm-layer-table th:nth-child(3) { width: 25%; }
.bm-layer-table th:nth-child(4) { width: 22%; }
.bm-layer-table th:last-child { width: 40px; }
.bm-layer-table td { padding: 12px 8px; vertical-align: middle; min-width: 0; }
.bm-layer-table .bm-active-layer { border-top: 0; border-bottom: 1px solid var(--bm-border); }
.bm-layer-name label { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.bm-layer-name label > input { margin-top: 4px; }
.bm-layer-name label > span { min-width: 0; }
.bm-layer-name strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.bm-layer-table .bm-layer-name small { display: block; margin: 4px 0 0; font-size: 11px; color: var(--bm-muted); overflow-wrap: anywhere; }
.bm-layer-row.is-hidden .bm-layer-name strong { color: var(--bm-muted); }
.bm-cell-label { display: none; }
.bm-level-control { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bulletin-map-workspace .bm-layer-table select { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; font-size: 13px; }
.bulletin-map-workspace .bm-layer-expand, .bulletin-map-workspace .bm-layer-remove-cell button { flex: 0 0 28px; width: 28px; min-height: 32px; padding: 0; background: transparent; }
.bulletin-map-workspace .bm-layer-expand { border-color: transparent; color: var(--bm-accent); font-size: 16px; }
.bulletin-map-workspace .bm-layer-remove-cell button { border-color: transparent; font-size: 22px; }
.bm-layer-table .bm-contour-interval { display: flex; align-items: center; gap: 8px; margin: 0; }
.bm-contour-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.bm-contour-color { display: inline-flex; align-items: center; gap: 8px; color: var(--bm-muted); font-size: 12px; white-space: nowrap; }
#bulletin-document-section .bm-inline .bm-contour-color input, .bulletin-map-workspace .bm-contour-color input { flex: 0 0 36px; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 4px; cursor: pointer; }
.bm-contour-color input::-webkit-color-swatch-wrapper { padding: 0; }
.bm-contour-color input::-webkit-color-swatch { border: 0; border-radius: 2px; }
.bm-contour-color input::-moz-color-swatch { border: 0; border-radius: 2px; }
.bm-contour-color:has(input:disabled) { opacity: .55; }
.bm-contour-color input:disabled { cursor: default; }
.bm-interval-stepper { display: flex; min-width: 0; align-items: stretch; }
.bulletin-map-workspace .bm-interval-stepper button { flex: 0 0 28px; width: 28px; min-height: 36px; padding: 0; border-radius: 0; font-size: 16px; }
.bulletin-map-workspace .bm-interval-stepper button:first-child { border-radius: 4px 0 0 4px; }
.bulletin-map-workspace .bm-interval-stepper button:last-child { border-radius: 0 4px 4px 0; }
#bulletin-document-section .bm-inline .bm-interval-stepper input, .bulletin-map-workspace .bm-interval-stepper input { flex: 1 1 64px; width: 64px; min-width: 0; min-height: 36px; padding: 4px; border-radius: 0; border-inline: 0; text-align: center; font-size: 13px; appearance: textfield; -moz-appearance: textfield; }
.bm-interval-stepper input::-webkit-inner-spin-button, .bm-interval-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bm-layer-table .bm-layer-details > td { padding: 0 8px 12px; }
.bm-layer-detail-content { padding: 8px 12px; border: 1px solid var(--bm-border); border-radius: 4px; background: var(--bm-page); }
.bm-layer-detail-content .bm-layer-levels { margin: 0; }
.bm-layer-detail-content .bm-layer-levels legend { font-size: 12px; padding: 0 0 8px; }
.bm-layer-detail-content .bm-level-groups { gap: 4px; }
.bm-layer-detail-content .bm-multiple-levels { min-width: 0; margin-top: 4px; }
.bm-multiple-levels > summary { width: fit-content; cursor: pointer; min-height: 32px; padding: 8px 0; color: var(--bm-accent); }
.bm-layer-detail-content .bm-level-options { display: flex; flex-wrap: wrap; max-height: none; overflow: visible; }
.bm-layer-detail-content .bm-level-option { flex: 0 1 132px; }
.bm-layer-detail-content .bm-opacity { max-width: 320px; margin-top: 8px; }
.bm-layer-table .bm-layer-notices td { padding: 0 8px 8px; }
.bm-layer-table .bm-layer-notices p { margin: 4px 0; font-size: 12px; }
.bm-sidebar .bm-overlays { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 0; padding-top: 8px; border-top: 1px solid var(--bm-border); }
.bm-sidebar .bm-overlays legend { font-size: 11px; color: var(--bm-muted); padding: 0; }
.bm-sidebar .bm-overlays label { margin: 0; min-height: 32px; font-size: 12px; gap: 8px; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-table, .bulletin-map-workspace:not(.bm-inline) .bm-layer-table tbody, .bulletin-map-workspace:not(.bm-inline) .bm-layer-table tr, .bulletin-map-workspace:not(.bm-inline) .bm-layer-table td { display: block; width: auto; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-table thead { display: none; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-row { position: relative; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-name { padding-right: 40px; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-remove-cell { position: absolute; right: 0; top: 4px; }
.bulletin-map-workspace:not(.bm-inline) .bm-cell-label { display: block; margin-bottom: 4px; color: var(--bm-muted); font-size: 12px; }
@media (max-width: 1000px) {
  .bm-inline .bm-sidebar-heading { grid-template-columns: minmax(0, 1fr) auto 32px; }
  .bm-inline .bm-sidebar-heading .bm-catalog-search { grid-column: 1 / -1; grid-row: 2; }
  .bm-inline .bm-sidebar-heading [data-map-editor-action="close-panel"] { grid-column: 3; }
  .bm-inline .bm-layer-table, .bm-inline .bm-layer-table tbody { display: block; width: 100%; }
  .bm-inline .bm-layer-table thead { display: none; }
  .bm-inline .bm-layer-table .bm-layer-row { display: grid; position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 0; }
  .bm-inline .bm-layer-table td { display: block; width: auto; padding: 0; }
  .bm-inline .bm-layer-name { grid-column: 1 / -1; padding-right: 40px; }
  .bm-inline .bm-layer-table .bm-layer-remove-cell { position: absolute; top: 8px; right: 0; }
  .bm-inline .bm-cell-label { display: block; margin-bottom: 4px; color: var(--bm-muted); font-size: 12px; }
  .bm-inline .bm-layer-details, .bm-inline .bm-layer-notices { display: block; }
  .bm-inline .bm-layer-table .bm-layer-details > td { padding: 0 0 12px; }
}
@media (max-width: 700px) {
  .bm-inline .bm-sidebar-heading { padding: 8px; gap: 8px; grid-template-columns: minmax(0, 1fr) 32px; }
  .bm-inline .bm-sidebar-heading > strong { font-size: 14px; }
  .bm-inline .bm-sidebar-heading [data-map-editor-action="close-panel"] { grid-column: 2; }
  .bm-inline .bm-sidebar-heading .bm-add-layer { grid-column: 1 / -1; grid-row: 3; min-height: 40px; }
  .bm-inline .bm-sidebar-heading .bm-catalog-search { grid-row: 2; }
  .bm-inline .bm-sidebar-heading .bm-catalog-search input { min-height: 40px; }
  .bm-inline .bm-sidebar-tabs { padding: 0 8px; gap: 8px; }
  .bm-inline .bm-sidebar-tabs button { min-height: 40px; }
  .bm-inline .bm-layer-list { padding: 8px; }
  .bm-inline .bm-layer-table .bm-layer-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bm-inline .bm-layer-table select, .bm-inline .bm-layer-table button, #bulletin-document-section .bm-inline .bm-interval-stepper input { min-height: 40px; }
  .bm-inline .bm-layer-table .bm-contour-interval { max-width: 240px; }
  #bulletin-document-section .bm-inline .bm-contour-color input { flex-basis: 40px; width: 40px; height: 40px; min-height: 40px; }
  .bm-inline .bm-layer-detail-content { padding: 8px; }
  .bm-inline .bm-level-option { flex: 1 1 100px; }
}

.bm-layer-detail-content .bm-layer-levels { grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); align-items: start; }
.bm-group-level { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; font-size: 12px; }
.bm-group-level > span { color: var(--bm-muted); }
.bm-layer-detail-content .bm-multiple-levels, .bm-layer-levels > .bm-layer-warning { grid-column: 1 / -1; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-detail-content .bm-layer-levels { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) {
  .bm-inline .bm-layer-detail-content .bm-layer-levels { grid-template-columns: minmax(0, 1fr); }
}

.bm-layer-detail-content .bm-layer-period { margin: 8px 0 0; color: var(--bm-muted); font-size: 12px; }
.bulletin-map-workspace:not(.bm-inline) .bm-layer-step-cell.is-unavailable { display: none; }
@media (max-width: 1000px) {
  .bm-inline .bm-layer-table .bm-layer-step-cell.is-unavailable { display: none; }
}
