.editor-reference-menu {
  position: absolute;
  z-index: 13050;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 18px 48px #0b142333;
}

.editor-reference-menu[hidden] { display: none; }

.editor-reference-option {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-reference-option:hover,
.editor-reference-option.active { background: var(--soft); color: var(--accent); }

.editor-reference-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--bg);
  color: var(--accent);
  font-weight: 900;
}

.editor-reference-option b,
.editor-reference-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-reference-option small { color: var(--muted); font-size: 11px; font-weight: 500; }
.editor-reference-empty { padding: 16px; color: var(--muted); text-align: center; }

.editor-tag-composer {
  display: flex;
  min-height: 46px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: text;
}

.editor-tag-composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent),transparent 84%);
}

.editor-tag-composer.tag-limit [data-tag-input] { min-width: 80px; }

.editor-tag-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.editor-tag-chip button {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 17px;
}

.editor-tag-chip button:hover { background: color-mix(in srgb,var(--accent),transparent 85%); }

.editor-tag-composer [data-tag-input] {
  flex: 1;
  min-width: 160px;
  width: auto !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 2px 4px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
}

.editor-tag-help { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
.editor-reference-help { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.editor-reference-help i { color: var(--accent); }
.post-mention,.post-hashtag { color: var(--accent); font-weight: 750; }
.post-mention:hover,.post-hashtag:hover { text-decoration: underline; }

@media(max-width:560px) {
  .editor-reference-menu { max-height: 240px; }
  .editor-tag-composer [data-tag-input] { min-width: 120px; }
}
