/* Keep the most-used writing controls in one row and preserve native command states. */
.sceditor-container .hive-editor-toolbar {
  padding: 6px; background: var(--paper); border: 0; border-bottom: 1px solid var(--rule);
}
.hive-editor-primary, .hive-editor-extra {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
}
.hive-editor-extra:not([hidden]) { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--rule); }
.hive-editor-toolbar [hidden], .hive-emoji-picker [hidden] { display: none !important; }
.sceditor-container .hive-editor-toolbar :is(.sceditor-button, button) {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; float: none; width: auto; min-width: 44px; height: 44px;
  padding: 0 8px; margin: 0; border: 0; border-radius: 5px;
  background: transparent; box-shadow: none; color: var(--ink); cursor: pointer;
  font: 650 14px/1.2 Manrope, system-ui, sans-serif;
}
.sceditor-container .hive-editor-toolbar .hive-editor-icon > div {
  padding: 0; margin: 0; width: 20px; height: 20px; background: none !important; text-indent: 0; color: var(--ink);
}
.sceditor-container .hive-editor-toolbar .hive-editor-icon svg { display: block; margin: 0; width: 20px; height: 20px; color: var(--ink); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sceditor-container .hive-editor-toolbar :is(.sceditor-button, button):is(:hover, .active, [aria-expanded=true]) { background: var(--honey); }
.sceditor-container .hive-editor-toolbar .disabled { opacity: .4; cursor: default; }
.sceditor-container .hive-editor-toolbar :focus-visible, .composer-emoji :focus-visible, #dropzone:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.composer-emoji { margin-block: 6px; }
.composer-emoji.toolbar-controlled:not([open]), .composer-emoji.toolbar-controlled > summary { display: none; }
.composer-emoji > summary { padding: 10px 0; font-weight: 650; cursor: pointer; }
.composer-emoji .hive-emoji-picker {
  padding: 12px; border-block: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
}
.composer-emoji .composer-emoji-filters { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }
.composer-emoji .composer-emoji-filters label { display: grid; gap: 4px; min-width: 0; margin: 0; font-size: .85rem; }
.composer-emoji .composer-emoji-filters :is(input, select) {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 4px 8px;
  color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 5px; font: inherit;
}
.hive-emoji-picker button { box-shadow: none; cursor: pointer; color: var(--ink); }
.hive-emoji-more { min-height: 44px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 5px; background: var(--sheet); font: inherit; }
.hive-emoji-results { max-height: min(32vh, 300px); overflow: auto; }
.hive-emoji-picker h3, .hive-emoji-status { margin: 8px 0; font-size: .85rem; }
.hive-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
.hive-emoji-picker .hive-emoji-button {
  min-width: 0; height: 44px; padding: 0; border: 0; border-radius: 5px; background: transparent;
  font: 24px/1 "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
.hive-emoji-picker button.emoji-name {
  grid-column: span 2; height: auto; min-height: 44px; padding: 3px 6px; background: var(--paper);
  font: 600 .75rem/1.2 Manrope, system-ui, sans-serif; overflow-wrap: anywhere;
}
.hive-emoji-grid button:hover { background: var(--paper); }
.composer-emoji .hive-emoji-more { box-sizing: border-box; width: 100%; margin-top: 6px; }
.hive-upload-card .hive-upload-heading { padding: 12px 16px; }
.hive-upload-manage { margin-inline-start: 1em; }
.hive-upload-card .hive-upload-cell { padding: 8px 16px 16px; }
.hive-upload-card #dropzone {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  min-height: 64px; padding: 8px; border: 1px dashed var(--rule); border-radius: 6px; cursor: pointer;
}
.hive-upload-card #dropzone.activated { background: var(--honey); }
.hive-upload-card #dropzone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#upload_bar { height: 3px; background: var(--primary); }
